diff options
-rw-r--r-- | admin/page/insert.php | 3 | ||||
-rw-r--r-- | admin/post/insert.php | 3 | ||||
-rw-r--r-- | admin/user/insert.php | 3 | ||||
-rw-r--r-- | theme/admin/html/page/form.php | 27 | ||||
-rw-r--r-- | theme/admin/html/post/form.php | 27 | ||||
-rw-r--r-- | theme/admin/html/user/form.php | 27 | ||||
-rw-r--r-- | theme/admin/rsrc/css/import/_responsive.scss | 5 | ||||
-rw-r--r-- | theme/admin/rsrc/css/main.css | 8 | ||||
-rw-r--r-- | theme/admin/rsrc/css/main.scss | 5 |
9 files changed, 51 insertions, 57 deletions
diff --git a/admin/page/insert.php b/admin/page/insert.php index 5d4339a..979dbd9 100644 --- a/admin/page/insert.php +++ b/admin/page/insert.php @@ -12,8 +12,7 @@ require '../../core/application.php'; $Attribute = new Page\Attribute(); -if(HTTP::issetPOST('id', 'user', 'slug', 'name', 'body', 'argv', 'time_insert', 'time_update', 'insert')) { - $Attribute->set('id', HTTP::POST('id') ? HTTP::POST('id') : FALSE); +if(HTTP::issetPOST('user', 'slug', 'name', 'body', 'argv', 'time_insert', 'time_update', 'insert')) { $Attribute->set('user', HTTP::POST('user')); $Attribute->set('slug', HTTP::POST('slug') ? HTTP::POST('slug') : generateSlug(HTTP::POST('name'))); $Attribute->set('name', HTTP::POST('name') ? HTTP::POST('name') : NULL); diff --git a/admin/post/insert.php b/admin/post/insert.php index 5b2ec52..6b1876e 100644 --- a/admin/post/insert.php +++ b/admin/post/insert.php @@ -12,8 +12,7 @@ require '../../core/application.php'; $Attribute = new Post\Attribute(); -if(HTTP::issetPOST('id', 'user', 'slug', 'name', 'body', 'argv', 'time_insert', 'time_update', 'insert')) { - $Attribute->set('id', HTTP::POST('id') ? HTTP::POST('id') : FALSE); +if(HTTP::issetPOST('user', 'slug', 'name', 'body', 'argv', 'time_insert', 'time_update', 'insert')) { $Attribute->set('user', HTTP::POST('user')); $Attribute->set('slug', HTTP::POST('slug') ? HTTP::POST('slug') : generateSlug(HTTP::POST('name'))); $Attribute->set('name', HTTP::POST('name') ? HTTP::POST('name') : NULL); diff --git a/admin/user/insert.php b/admin/user/insert.php index 9a84fa9..acb49ad 100644 --- a/admin/user/insert.php +++ b/admin/user/insert.php @@ -12,8 +12,7 @@ require '../../core/application.php'; $Attribute = new User\Attribute(); -if(HTTP::issetPOST('id', 'slug', 'username', 'password', 'fullname', 'mailaddr', 'body', 'argv', 'time_insert', 'time_update', 'insert')) { - $Attribute->set('id', HTTP::POST('id') ? HTTP::POST('id') : FALSE); +if(HTTP::issetPOST('slug', 'username', 'password', 'fullname', 'mailaddr', 'body', 'argv', 'time_insert', 'time_update', 'insert')) { $Attribute->set('slug', HTTP::POST('slug') ? HTTP::POST('slug') : generateSlug(HTTP::POST('username'))); $Attribute->set('username', HTTP::POST('username') ? HTTP::POST('username') : NULL); $Attribute->set('password', HTTP::POST('password') ? password_hash(HTTP::POST('password'), PASSWORD_BCRYPT, ['cost' => 10]) : FALSE); diff --git a/theme/admin/html/page/form.php b/theme/admin/html/page/form.php index eee61bf..c0ffe2f 100644 --- a/theme/admin/html/page/form.php +++ b/theme/admin/html/page/form.php @@ -13,11 +13,18 @@ <?php if($FORM['TYPE'] !== 'DELETE'): ?> <div class="form-grid"> - <label for="form_id"> - <i class="fa fa-database"></i>ID</label> + <label for="form_name"> + <i class="fa fa-file-text-o"></i><?=$Language->text('label_name')?></label> + + <div class="form-grid-item first"> + <input id="form_name" name="name" value="<?=escapeHTML($FORM['DATA']['NAME'])?>" /> + </div> + + <label for="form_slug"> + <i class="fa fa-link"></i><?=$Language->text('label_slug')?></label> <div class="form-grid-item"> - <input<?=($FORM['TYPE'] === 'UPDATE') ? ' disabled="disabled"' : '';?> id="form_id" name="id" type="number" placeholder="AUTO_INCREMENT" value="<?=escapeHTML($FORM['DATA']['ID'])?>" /> + <input id="form_slug" name="slug" value="<?=escapeHTML($FORM['DATA']['SLUG'])?>" /> </div> <label for="form_user"> @@ -31,20 +38,6 @@ </select> </div> - <label for="form_name"> - <i class="fa fa-file-text-o"></i><?=$Language->text('label_name')?></label> - - <div class="form-grid-item"> - <input id="form_name" name="name" value="<?=escapeHTML($FORM['DATA']['NAME'])?>" /> - </div> - - <label for="form_slug"> - <i class="fa fa-link"></i><?=$Language->text('label_slug')?></label> - - <div class="form-grid-item"> - <input id="form_slug" name="slug" value="<?=escapeHTML($FORM['DATA']['SLUG'])?>" /> - </div> - <label for="form_time_insert"> <i class="fa fa-clock-o"></i><?=$Language->text('label_insert')?></label> diff --git a/theme/admin/html/post/form.php b/theme/admin/html/post/form.php index 58ac122..dbf0ab5 100644 --- a/theme/admin/html/post/form.php +++ b/theme/admin/html/post/form.php @@ -13,11 +13,18 @@ <?php if($FORM['TYPE'] !== 'DELETE'): ?> <div class="form-grid"> - <label for="form_id"> - <i class="fa fa-database"></i>ID</label> + <label for="form_name"> + <i class="fa fa-newspaper-o"></i><?=$Language->text('label_name')?></label> + + <div class="form-grid-item first"> + <input id="form_name" name="name" value="<?=escapeHTML($FORM['DATA']['NAME'])?>" /> + </div> + + <label for="form_slug"> + <i class="fa fa-link"></i><?=$Language->text('label_slug')?></label> <div class="form-grid-item"> - <input<?=($FORM['TYPE'] === 'UPDATE') ? ' disabled="disabled"' : '';?> id="form_id" name="id" type="number" placeholder="AUTO_INCREMENT" value="<?=escapeHTML($FORM['DATA']['ID'])?>" /> + <input id="form_slug" name="slug" value="<?=escapeHTML($FORM['DATA']['SLUG'])?>" /> </div> <label for="form_user"> @@ -31,20 +38,6 @@ </select> </div> - <label for="form_name"> - <i class="fa fa-newspaper-o"></i><?=$Language->text('label_name')?></label> - - <div class="form-grid-item"> - <input id="form_name" name="name" value="<?=escapeHTML($FORM['DATA']['NAME'])?>" /> - </div> - - <label for="form_slug"> - <i class="fa fa-link"></i><?=$Language->text('label_slug')?></label> - - <div class="form-grid-item"> - <input id="form_slug" name="slug" value="<?=escapeHTML($FORM['DATA']['SLUG'])?>" /> - </div> - <label for="form_time_insert"> <i class="fa fa-clock-o"></i><?=$Language->text('label_insert')?></label> diff --git a/theme/admin/html/user/form.php b/theme/admin/html/user/form.php index 7e370e5..54e21a1 100644 --- a/theme/admin/html/user/form.php +++ b/theme/admin/html/user/form.php @@ -13,25 +13,25 @@ <?php if($FORM['TYPE'] !== 'DELETE'): ?> <div class="form-grid"> - <label for="form_id"> - <i class="fa fa-database"></i>ID</label> + <label for="form_fullname"> + <i class="fa fa-user"></i><?=$Language->text('label_fullname')?></label> - <div class="form-grid-item"> - <input<?=($FORM['TYPE'] === 'UPDATE') ? ' disabled="disabled"' : '';?> id="form_id" name="id" type="number" placeholder="AUTO_INCREMENT" value="<?=escapeHTML($FORM['DATA']['ID'])?>" /> + <div class="form-grid-item first"> + <input id="form_fullname" name="fullname" value="<?=escapeHTML($FORM['DATA']['FULLNAME'])?>" /> </div> - <label for="form_password"> - <i class="fa fa-key"></i><?=$Language->text('label_password')?></label> + <label for="form_username"> + <i class="fa fa-user-secret"></i><?=$Language->text('label_username')?></label> <div class="form-grid-item"> - <input id="form_password" name="password" placeholder="NO CHANGE" type="password" /> + <input id="form_username" name="username" value="<?=escapeHTML($FORM['DATA']['USERNAME'])?>" /> </div> - <label for="form_fullname"> - <i class="fa fa-user"></i><?=$Language->text('label_fullname')?></label> + <label for="form_password"> + <i class="fa fa-key"></i><?=$Language->text('label_password')?></label> <div class="form-grid-item"> - <input id="form_fullname" name="fullname" value="<?=escapeHTML($FORM['DATA']['FULLNAME'])?>" /> + <input id="form_password" name="password" placeholder="NO CHANGE" type="password" /> </div> <label for="form_mailaddr"> @@ -41,13 +41,6 @@ <input id="form_mailaddr" name="mailaddr" value="<?=escapeHTML($FORM['DATA']['MAILADDR'])?>" /> </div> - <label for="form_username"> - <i class="fa fa-user-secret"></i><?=$Language->text('label_username')?></label> - - <div class="form-grid-item"> - <input id="form_username" name="username" value="<?=escapeHTML($FORM['DATA']['USERNAME'])?>" /> - </div> - <label for="form_slug"> <i class="fa fa-link"></i><?=$Language->text('label_slug')?></label> diff --git a/theme/admin/rsrc/css/import/_responsive.scss b/theme/admin/rsrc/css/import/_responsive.scss index e387c98..2a7cebb 100644 --- a/theme/admin/rsrc/css/import/_responsive.scss +++ b/theme/admin/rsrc/css/import/_responsive.scss @@ -60,6 +60,11 @@ .form-grid { grid-template-columns: auto auto; + + &-item.first { + grid-column-start: 2; + grid-column-end: 3; + } } .actions { diff --git a/theme/admin/rsrc/css/main.css b/theme/admin/rsrc/css/main.css index 73a9e6a..cfc6db9 100644 --- a/theme/admin/rsrc/css/main.css +++ b/theme/admin/rsrc/css/main.css @@ -518,6 +518,10 @@ table, td { border-top: 0.05rem solid #AAA; border-right: 0.05rem solid #AAA; } +.form-grid-item.first { + grid-column-start: 2; + grid-column-end: 5; +} .form-border-box { border: 0.05rem solid #AAA; @@ -745,6 +749,10 @@ label:after { .form-grid { grid-template-columns: auto auto; } + .form-grid-item.first { + grid-column-start: 2; + grid-column-end: 3; + } .actions { float: none; diff --git a/theme/admin/rsrc/css/main.scss b/theme/admin/rsrc/css/main.scss index 6cfaf05..d1f43c9 100644 --- a/theme/admin/rsrc/css/main.scss +++ b/theme/admin/rsrc/css/main.scss @@ -578,6 +578,11 @@ table, td { border-top: 0.05rem solid #AAA; border-right: 0.05rem solid #AAA; } + + &-item.first { + grid-column-start: 2; + grid-column-end: 5; + } } .form-border-box { |