Support for forcing one of two bool/bgroups.

This commit is contained in:
Michal Čihař
2006-04-26 16:10:38 +00:00
parent a4c95b7e71
commit b021ff9c12
2 changed files with 19 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ $Source$
- Be more verbose on error. - Be more verbose on error.
- Drop tables used for layout. - Drop tables used for layout.
- Add support for groupping options. - Add support for groupping options.
- Support for forcing one of two bool/bgroups.
* css/phpmyadmin.css.php, themes/darkblue_orange/css/theme_right.css.php, * css/phpmyadmin.css.php, themes/darkblue_orange/css/theme_right.css.php,
themes/original/css/theme_right.css.php: New style for non table forms themes/original/css/theme_right.css.php: New style for non table forms
used in plugins. used in plugins.

View File

@@ -175,7 +175,15 @@ function PMA_pluginGetOneOption($section, $plugin_name, $id, &$opt)
$ret .= '<div class="formelementrow">' . "\n"; $ret .= '<div class="formelementrow">' . "\n";
$ret .= '<input type="checkbox" name="' . $plugin_name . '_' . $opt['name'] . '"' $ret .= '<input type="checkbox" name="' . $plugin_name . '_' . $opt['name'] . '"'
. ' value="something" id="checkbox_' . $plugin_name . '_' . $opt['name'] . '"' . ' value="something" id="checkbox_' . $plugin_name . '_' . $opt['name'] . '"'
. ' ' . PMA_pluginCheckboxCheck($section, $plugin_name . '_' . $opt['name']) .' />'; . ' ' . PMA_pluginCheckboxCheck($section, $plugin_name . '_' . $opt['name']);
if (isset($opt['force'])) {
/* Same code is also few lines lower, update both if needed */
$ret .= ' onclick="if (!this.checked &amp;&amp; '
. '(!document.getElementById(\'checkbox_' . $plugin_name . '_' .$opt['force'] . '\') '
. '|| !document.getElementById(\'checkbox_' . $plugin_name . '_' .$opt['force'] . '\').checked)) '
. 'return false; else return true;"';
}
$ret .= ' />';
$ret .= '<label for="checkbox_' . $plugin_name . '_' . $opt['name'] . '">' $ret .= '<label for="checkbox_' . $plugin_name . '_' . $opt['name'] . '">'
. PMA_getString($opt['text']) . '</label>'; . PMA_getString($opt['text']) . '</label>';
$ret .= '</div>' . "\n"; $ret .= '</div>' . "\n";
@@ -214,7 +222,15 @@ function PMA_pluginGetOneOption($section, $plugin_name, $id, &$opt)
if (!empty($opt['name'])) { if (!empty($opt['name'])) {
$ret .= '<input type="checkbox" name="' . $plugin_name . '_' . $opt['name'] . '"' $ret .= '<input type="checkbox" name="' . $plugin_name . '_' . $opt['name'] . '"'
. ' value="something" id="checkbox_' . $plugin_name . '_' . $opt['name'] . '"' . ' value="something" id="checkbox_' . $plugin_name . '_' . $opt['name'] . '"'
. ' ' . PMA_pluginCheckboxCheck($section, $plugin_name . '_' . $opt['name']) .' />'; . ' ' . PMA_pluginCheckboxCheck($section, $plugin_name . '_' . $opt['name']);
if (isset($opt['force'])) {
/* Same code is also few lines higher, update both if needed */
$ret .= ' onclick="if (!this.checked &amp;&amp; '
. '(!document.getElementById(\'checkbox_' . $plugin_name . '_' .$opt['force'] . '\') '
. '|| !document.getElementById(\'checkbox_' . $plugin_name . '_' .$opt['force'] . '\').checked)) '
. 'return false; else return true;"';
}
$ret .= ' />';
$ret .= '<label for="checkbox_' . $plugin_name . '_' . $opt['name'] . '">' $ret .= '<label for="checkbox_' . $plugin_name . '_' . $opt['name'] . '">'
. PMA_getString($opt['text']) . '</label>'; . PMA_getString($opt['text']) . '</label>';
} else { } else {