Skip to content

Commit

Permalink
Configuration forms styling
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrp committed Jun 12, 2010
1 parent b2ecf17 commit 2e1fd26
Show file tree
Hide file tree
Showing 4 changed files with 152 additions and 12 deletions.
6 changes: 3 additions & 3 deletions libraries/config/FormDisplay.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ function display_input($path, $name, $description = '', $type, $value, $value_is
$name_id = 'name="' . $path . '" id="' . $path . '"';
$base_dir = defined('PMA_SETUP') ? '../' : '';
$img_path = defined('PMA_SETUP')
? $GLOBALS['cfg']['ThemePath'] . '/original/img/'
? '../' . ltrim($GLOBALS['cfg']['ThemePath'], './') . '/original/img/'
: $_SESSION['PMA_Theme']->img_path;
d?>
?>
<tr>
<th>
<label for="<?php echo htmlspecialchars($path) ?>"><?php echo $name ?></label>
Expand Down Expand Up @@ -188,7 +188,7 @@ function display_input($path, $name, $description = '', $type, $value, $value_is
}
if (isset($opts['show_restore_default']) && $opts['show_restore_default']) {
?>
<a class="restore-default" href="#<?php echo $path ?>" title="<?php echo __('Restore default value') ?>" style="display:none"><img alt="restore-default" src="../<?php echo $img_path ?>s_reload.png" width="16" height="16" /></a>
<a class="restore-default" href="#<?php echo $path ?>" title="<?php echo __('Restore default value') ?>" style="display:none"><img alt="restore-default" src="<?php echo $img_path ?>s_reload.png" width="16" height="16" /></a>
<?php
}
// this must match with displayErrors() in scripts.js
Expand Down
9 changes: 3 additions & 6 deletions setup/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,6 @@ fieldset th {
vertical-align: top;
}

fieldset th small {
display: block;
}

fieldset .doc {
margin-left: 1em;
}
Expand All @@ -267,6 +263,7 @@ fieldset td {
}

fieldset th small {
display: block;
font-weight: normal;
font-family: sans-serif;
font-size: x-small;
Expand Down Expand Up @@ -314,16 +311,16 @@ fieldset.simple .lastrow {

span.checkbox {
padding: 2px;
display: inline-block;
}

.custom { /* customized field */
background: #FFC;
}

span.checkbox.custom {
.checkbox.custom {
padding: 1px;
border: 1px #EDEC90 solid;
background: #FFC;
}

input[type="text"], select, textarea {
Expand Down
145 changes: 144 additions & 1 deletion themes/original/css/theme_right.css.php
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@
/* specific elements */

/* topmenu */
ul#topmenu {
ul#topmenu, ul.tabs {
font-weight: bold;
list-style-type: none;
margin: 0;
Expand Down Expand Up @@ -1232,3 +1232,146 @@
*/
.invalid_value
{background:#F00;}

/* config forms */
.config-form ul.tabs {
margin: 1em 0.2em 0;
padding: 0 0 0.3em 0;
list-style: none;
font-weight: bold;
}

.config-form ul.tabs li {
float: <?php echo $left; ?>;
}

.config-form ul.tabs li a {
display: block;
margin: 0.1em 0.2em 0;
padding: 0.1em 0.4em;
white-space: nowrap;
text-decoration: none;
background-color: <?php echo $GLOBALS['cfg']['BgOne']; ?>;
border: 1px solid <?php echo $GLOBALS['cfg']['BgTwo']; ?>;
border-bottom: none;
}

.config-form ul.tabs li a:hover,
.config-form ul.tabs li a:active,
.config-form ul.tabs li a.active {
margin: 0;
padding: 0.1em 0.6em 0.2em;
}

.config-form ul.tabs li a.active {
background-color: <?php echo $GLOBALS['cfg']['BgTwo']; ?>;
}

.config-form fieldset {
margin-top: 0;
padding: 0;
clear: both;
border-color: <?php echo $GLOBALS['cfg']['BgTwo']; ?>;
}

.config-form legend {
display: none;
}

.config-form fieldset p {
margin: 0;
padding: 0.5em;
}

.config-form fieldset .errors { /* form error list */
margin: 0 -2px 1em -2px;
padding: 0.5em 1.5em;
background: #FBEAD9;
border: 1px #C83838 solid;
border-width: 1px 0;
list-style: none;
font-family: sans-serif;
font-size: small;
}

.config-form fieldset .inline_errors { /* field error list */
margin: 0.3em 0.3em 0.3em 0;
padding: 0;
list-style: none;
color: #9A0000;
font-size: small;
}

.config-form fieldset th {
padding: 0.3em 0.3em 0.3em 0.5em;
text-align: left;
vertical-align: top;
width: 40%;
background: transparent;
}

.config-form fieldset .doc {
margin-left: 1em;
}

.config-form fieldset td {
padding-top: 0.3em;
padding-bottom: 0.3em;
vertical-align: top;
}

.config-form fieldset th small {
display: block;
font-weight: normal;
font-family: sans-serif;
font-size: x-small;
color: #444;
}

.config-form fieldset th, fieldset td {
border-top: 1px #666 dotted;
}

.config-form .lastrow {
background: <?php echo $GLOBALS['cfg']['ThBackground']; ?>;;
padding: 0.5em;
text-align: center;
}

.config-form .form .lastrow {
border-top: 1px #555 dotted;
}

.config-form .lastrow input {
font-weight: bold;
}

/* form elements */

.config-form span.checkbox {
padding: 2px;
display: inline-block;
}

.config-form .custom { /* customized field */
background: #FFC;
}

.config-form span.checkbox.custom {
padding: 1px;
border: 1px #EDEC90 solid;
background: #FFC;
}

.config-form input[type="text"],
.config-form select,
.config-form textarea {
border: 1px #A7A6AA solid;
}

.config-form input[type="text"]:focus,
.config-form select:focus,
.config-form textarea:focus {
border: 1px #6676FF solid;
background: #F7FBFF;
}
4 changes: 2 additions & 2 deletions user_preferences.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
require_once './libraries/config/Form.class.php';
require_once './libraries/config/FormDisplay.class.php';

$GLOBALS['js_include'][] = 'js/config.js';
$GLOBALS['js_include'][] = 'config.js';

require_once './libraries/header.inc.php';

Expand Down Expand Up @@ -84,7 +84,7 @@
exit;
}
}
print_r($_SESSION);

/**
* Displays the footer
*/
Expand Down

0 comments on commit 2e1fd26

Please sign in to comment.