diff --git a/js/config.js b/js/config.js index fa68d7034..5a6a98cf9 100644 --- a/js/config.js +++ b/js/config.js @@ -299,6 +299,13 @@ function displayErrors(error_list) { return item != ''; }); + // CSS error class + if (!isFieldset) { + // checkboxes uses parent for marking + var fieldMarker = (field.attr('type') == 'checkbox') ? field.parent() : field; + fieldMarker[errors.length ? 'addClass' : 'removeClass']('field-error'); + } + if (errors.length) { // if error container doesn't exist, create it if (errorCnt.length == 0) { diff --git a/libraries/config/Form.class.php b/libraries/config/Form.class.php index fbc5237e2..c0d4db086 100644 --- a/libraries/config/Form.class.php +++ b/libraries/config/Form.class.php @@ -10,7 +10,7 @@ * Base class for forms, loads default configuration options, checks allowed * values etc. * - * @package phpMyAdmin-setup + * @package phpMyAdmin */ class Form { diff --git a/libraries/config/FormDisplay.tpl.php b/libraries/config/FormDisplay.tpl.php index 1fced4a60..68fe9f58c 100644 --- a/libraries/config/FormDisplay.tpl.php +++ b/libraries/config/FormDisplay.tpl.php @@ -98,6 +98,7 @@ function display_fieldset_top($title = '', $description = '', $errors = null, $a * o errors - error array * o setvalue - (string) shows button allowing to set poredefined value * o show_restore_default - (boolean) whether show "restore default" button + * o userprefs_allow - whether show user preferences allow/deny checkbox (null - no, true/false - yes) * o values - key - value paris for '; break; @@ -192,8 +203,8 @@ function display_input($path, $name, $description = '', $type, $value, $value_is "; foreach ($opts['errors'] as $error) { echo '
' . htmlspecialchars($error) . '
'; diff --git a/setup/styles.css b/setup/styles.css index 63fc47884..23364177b 100644 --- a/setup/styles.css +++ b/setup/styles.css @@ -319,6 +319,10 @@ span.checkbox { border: 1px #EDEC90 solid; } +.field-error { + border-color: #C11 !important; +} + input[type="text"], select, textarea { border: 1px #A7A6AA solid; } diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php index 69df8b387..26f231eb0 100644 --- a/themes/original/css/theme_right.css.php +++ b/themes/original/css/theme_right.css.php @@ -1362,6 +1362,10 @@ table#serverconnection_trg_local { background: #FFC; } +.config-form .field-error { + border-color: #A11 !important; +} + .config-form input[type="text"], .config-form select, .config-form textarea { @@ -1376,10 +1380,10 @@ table#serverconnection_trg_local { } /* error list */ -dd { +.config-form dd { margin-left: 0.5em; } -dd:before { +.config-form dd:before { content: "\25B8 "; }