aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2017-05-31 23:42:11 +0200
committerThomas Lange <code@nerdmind.de>2017-05-31 23:42:11 +0200
commit8cafd4967655a996d0d2b71073f884e2f28cf6ac (patch)
tree599e859df5ddd869842e5b2d96a922390b2707fd
parent816959215dff92ee0af295be6d801b4cfa150269 (diff)
downloadblog-8cafd4967655a996d0d2b71073f884e2f28cf6ac.tar.gz
blog-8cafd4967655a996d0d2b71073f884e2f28cf6ac.tar.xz
blog-8cafd4967655a996d0d2b71073f884e2f28cf6ac.zip
Optimizations and tiny design update for the admin template:
+ The form buttons for insert, update and delete are now having a corresponding background color (green, blue and red). + The information messages are now displayed within the <form> element and with a red background color around the text.
-rw-r--r--template/admin/html/auth.php16
-rw-r--r--template/admin/html/database.php18
-rw-r--r--template/admin/html/page/form.php22
-rw-r--r--template/admin/html/post/form.php22
-rw-r--r--template/admin/html/user/form.php22
-rw-r--r--template/admin/rsrc/main.css19
6 files changed, 78 insertions, 41 deletions
diff --git a/template/admin/html/auth.php b/template/admin/html/auth.php
index f5852c1..0435f72 100644
--- a/template/admin/html/auth.php
+++ b/template/admin/html/auth.php
@@ -1,15 +1,19 @@
<h1><?=$Language->template('authentication_text')?></h1>
<p><?=$Language->template('authentication_desc')?></p>
-<?php if(isset($FORM['INFO'])): ?>
- <?php foreach($FORM['INFO'] as $message): ?>
- <div class="red"><?=$message?></div>
- <?php endforeach; ?>
-<?php endif; ?>
-
<form action="" method="POST">
<input type="hidden" name="token" value="<?=Application::getSecurityToken()?>" />
+ <?php if($FORM['INFO']): ?>
+ <div class="flex flex-direction-column">
+ <ul id="message-list">
+ <?php foreach($FORM['INFO'] as $message): ?>
+ <li><?=$message?></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
+ <?php endif; ?>
+
<div class="flex">
<div class="flex-item">
<div class="form-icon-flex"><i class="fa fa-user-secret"></i></div>
diff --git a/template/admin/html/database.php b/template/admin/html/database.php
index 69dce0a..319bf02 100644
--- a/template/admin/html/database.php
+++ b/template/admin/html/database.php
@@ -1,15 +1,19 @@
<h1><i class="fa fa-database"></i><?=$Language->template('overview_database_text')?></h1>
<p><?=$Language->template('overview_database_desc')?></p>
-<?php if(isset($FORM['INFO'])): ?>
- <?php foreach($FORM['INFO'] as $message): ?>
- <div class="red"><?=$message?></div>
- <?php endforeach; ?>
-<?php endif; ?>
-
<form action="" method="POST">
<input type="hidden" name="token" value="<?=$FORM['TOKEN']?>" />
+ <?php if($FORM['INFO']): ?>
+ <div class="flex flex-direction-column">
+ <ul id="message-list">
+ <?php foreach($FORM['INFO'] as $message): ?>
+ <li><?=$message?></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
+ <?php endif; ?>
+
<div class="flex">
<textarea id="content-editor" placeholder="<?=$Language->template('database_warning')?>" name="command"><?=escapeHTML($FORM['COMMAND'])?></textarea>
</div>
@@ -21,6 +25,6 @@
<?php endif; ?>
<div class="flex flex-padding background">
- <input type="submit" name="execute" value="Execute" />
+ <input id="insert-button" type="submit" name="execute" value="Execute" />
</div>
</form> \ No newline at end of file
diff --git a/template/admin/html/page/form.php b/template/admin/html/page/form.php
index 8930ec3..c0bc7e4 100644
--- a/template/admin/html/page/form.php
+++ b/template/admin/html/page/form.php
@@ -1,12 +1,16 @@
-<?php if(isset($FORM['INFO'])): ?>
- <?php foreach($FORM['INFO'] as $message): ?>
- <div class="red"><?=$message?></div>
- <?php endforeach; ?>
-<?php endif; ?>
-
<form action="" method="POST">
<input type="hidden" name="token" value="<?=$FORM['TOKEN']?>" />
+ <?php if($FORM['INFO']): ?>
+ <div class="flex flex-direction-column">
+ <ul id="message-list">
+ <?php foreach($FORM['INFO'] as $message): ?>
+ <li><?=$message?></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
+ <?php endif; ?>
+
<?php if($FORM['TYPE'] !== 'DELETE'): ?>
<div class="flex flex-responsive">
<div class="flex-item">
@@ -84,11 +88,11 @@
<div class="flex flex-padding background">
<?php if($FORM['TYPE'] === 'INSERT'): ?>
- <input type="submit" name="insert" value="<?=$Language->text('insert')?>" />
+ <input id="insert-button" type="submit" name="insert" value="<?=$Language->text('insert')?>" />
<?php elseif($FORM['TYPE'] === 'UPDATE'): ?>
- <input type="submit" name="update" value="<?=$Language->text('update')?>" />
+ <input id="update-button" type="submit" name="update" value="<?=$Language->text('update')?>" />
<?php elseif($FORM['TYPE'] === 'DELETE'): ?>
- <input type="submit" name="delete" value="<?=$Language->text('delete')?>" id="delete-button" data-text="<?=$Language->template('sure')?>" />
+ <input id="delete-button" type="submit" name="delete" value="<?=$Language->text('delete')?>" data-text="<?=$Language->template('sure')?>" />
<?php endif; ?>
</div>
</form> \ No newline at end of file
diff --git a/template/admin/html/post/form.php b/template/admin/html/post/form.php
index 1f69529..89d4478 100644
--- a/template/admin/html/post/form.php
+++ b/template/admin/html/post/form.php
@@ -1,12 +1,16 @@
-<?php if(isset($FORM['INFO'])): ?>
- <?php foreach($FORM['INFO'] as $message): ?>
- <div class="red"><?=$message?></div>
- <?php endforeach; ?>
-<?php endif; ?>
-
<form action="" method="POST">
<input type="hidden" name="token" value="<?=$FORM['TOKEN']?>" />
+ <?php if($FORM['INFO']): ?>
+ <div class="flex flex-direction-column">
+ <ul id="message-list">
+ <?php foreach($FORM['INFO'] as $message): ?>
+ <li><?=$message?></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
+ <?php endif; ?>
+
<?php if($FORM['TYPE'] !== 'DELETE'): ?>
<div class="flex flex-responsive">
<div class="flex-item">
@@ -84,11 +88,11 @@
<div class="flex flex-padding background">
<?php if($FORM['TYPE'] === 'INSERT'): ?>
- <input type="submit" name="insert" value="<?=$Language->text('insert')?>" />
+ <input id="insert-button" type="submit" name="insert" value="<?=$Language->text('insert')?>" />
<?php elseif($FORM['TYPE'] === 'UPDATE'): ?>
- <input type="submit" name="update" value="<?=$Language->text('update')?>" />
+ <input id="update-button" type="submit" name="update" value="<?=$Language->text('update')?>" />
<?php elseif($FORM['TYPE'] === 'DELETE'): ?>
- <input type="submit" name="delete" value="<?=$Language->text('delete')?>" id="delete-button" data-text="<?=$Language->template('sure')?>" />
+ <input id="delete-button" type="submit" name="delete" value="<?=$Language->text('delete')?>" data-text="<?=$Language->template('sure')?>" />
<?php endif; ?>
</div>
</form> \ No newline at end of file
diff --git a/template/admin/html/user/form.php b/template/admin/html/user/form.php
index 8156496..2d3625c 100644
--- a/template/admin/html/user/form.php
+++ b/template/admin/html/user/form.php
@@ -1,12 +1,16 @@
-<?php if(isset($FORM['INFO'])): ?>
- <?php foreach($FORM['INFO'] as $message): ?>
- <div class="red"><?=$message?></div>
- <?php endforeach; ?>
-<?php endif; ?>
-
<form action="" method="POST">
<input type="hidden" name="token" value="<?=$FORM['TOKEN']?>" />
+ <?php if($FORM['INFO']): ?>
+ <div class="flex flex-direction-column">
+ <ul id="message-list">
+ <?php foreach($FORM['INFO'] as $message): ?>
+ <li><?=$message?></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
+ <?php endif; ?>
+
<?php if($FORM['TYPE'] !== 'DELETE'): ?>
<div class="flex flex-responsive">
<div class="flex-item">
@@ -90,11 +94,11 @@
<div class="flex flex-padding background">
<?php if($FORM['TYPE'] === 'INSERT'): ?>
- <input type="submit" name="insert" value="<?=$Language->text('insert')?>" />
+ <input id="insert-button" type="submit" name="insert" value="<?=$Language->text('insert')?>" />
<?php elseif($FORM['TYPE'] === 'UPDATE'): ?>
- <input type="submit" name="update" value="<?=$Language->text('update')?>" />
+ <input id="update-button" type="submit" name="update" value="<?=$Language->text('update')?>" />
<?php elseif($FORM['TYPE'] === 'DELETE'): ?>
- <input type="submit" name="delete" value="<?=$Language->text('delete')?>" id="delete-button" data-text="<?=$Language->template('sure')?>" />
+ <input id="delete-button" type="submit" name="delete" value="<?=$Language->text('delete')?>" data-text="<?=$Language->template('sure')?>" />
<?php endif; ?>
</div>
</form> \ No newline at end of file
diff --git a/template/admin/rsrc/main.css b/template/admin/rsrc/main.css
index e19aa31..68cb272 100644
--- a/template/admin/rsrc/main.css
+++ b/template/admin/rsrc/main.css
@@ -191,18 +191,35 @@ form{border:0.05rem solid #AAA;}
#content-editor{border:none;margin:0;}
+
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
/* Form elements
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
input,select,textarea{width:100%;box-sizing:padding-box;background:#EEE;color:#404040;font-family:inherit;font-size:0.7rem;padding:0.25rem;border:0.05rem solid #AAA;}
textarea{font-family:Kadwa,sans-serif;box-sizing:border-box;display:inline-block;resize:vertical;min-height:15rem;line-height:1.3rem;padding:0.5rem;-webkit-hyphens:none;hyphens:none;}
-input[type="submit"]{text-transform:uppercase;}
+input[type="submit"]{text-transform:uppercase;border-radius:0.1rem;}
input:disabled{background:#DDD;color:#888;}
input:disabled:hover{cursor:not-allowed;}
label{text-transform:uppercase;font-weight:normal;}
label:after{content:":";}
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+/* Form buttons
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#insert-button,
+#update-button,
+#delete-button{color:#EEE;border:0.05rem solid #404040;}
+
+#insert-button{background:#4D8D5D;}
+#update-button{background:#6A8AA5;}
+#delete-button{background:#C45C66;}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+/* Form message list
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
+#message-list{margin:0;padding:0.5rem;list-style:none;background:#C45C66;color:#EEE;font-size:0.6rem;}
+
+/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
/* FontAwesome Main
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
.fa{display:inline-block;font:normal normal normal 14px/1 "FontAwesome";font-size:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}