no custom color picker if JS is not active
This commit is contained in:
@@ -124,8 +124,11 @@ function PMA_getHiddenFields($values, $pre = '')
|
|||||||
if (is_array($value)) {
|
if (is_array($value)) {
|
||||||
$fields .= PMA_getHiddenFields($value, $name);
|
$fields .= PMA_getHiddenFields($value, $name);
|
||||||
} else {
|
} else {
|
||||||
|
// do not generate an ending "\n" because
|
||||||
|
// PMA_generate_common_hidden_inputs() is sometimes called
|
||||||
|
// from a JS document.write()
|
||||||
$fields .= '<input type="hidden" name="' . htmlspecialchars($name)
|
$fields .= '<input type="hidden" name="' . htmlspecialchars($name)
|
||||||
. '" value="' . htmlspecialchars($value) . '" />' . "\n";
|
. '" value="' . htmlspecialchars($value) . '" />';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
26
main.php
26
main.php
@@ -149,16 +149,22 @@ if ($GLOBALS['cfg']['ThemeManager']) {
|
|||||||
echo '<li id="li_select_theme">';
|
echo '<li id="li_select_theme">';
|
||||||
echo $_SESSION['PMA_Theme_Manager']->getHtmlSelectBox();
|
echo $_SESSION['PMA_Theme_Manager']->getHtmlSelectBox();
|
||||||
echo '</li>';
|
echo '</li>';
|
||||||
echo '<li id="li_custom_color">';
|
?>
|
||||||
echo $strCustomColor . ': ';
|
<script type="text/javascript">
|
||||||
echo '<img id="myRainbow" src="js/mooRainbow/images/rainbow.png" alt="[r]" width="16" height="16" />';
|
//<![CDATA[
|
||||||
echo '<form name="rainbowform" id="rainbowform" method="post" action="index.php" target="_parent">';
|
document.write('<li id="li_custom_color">');
|
||||||
echo PMA_generate_common_hidden_inputs();
|
document.write('<?php echo $strCustomColor . ': '; ?>');
|
||||||
echo '<input type="hidden" name="custom_color" />';
|
document.write('<img id="myRainbow" src="js/mooRainbow/images/rainbow.png" alt="[r]" width="16" height="16" />');
|
||||||
echo '<input type="hidden" name="custom_color_rgb" />';
|
document.write('<form name="rainbowform" id="rainbowform" method="post" action="index.php" target="_parent">');
|
||||||
echo '<input type="submit" name="custom_color_reset" value="' . $strReset . '" />';
|
document.write('<?php echo PMA_generate_common_hidden_inputs(); ?>');
|
||||||
echo '</form>';
|
document.write('<input type="hidden" name="custom_color" />');
|
||||||
echo '</li>';
|
document.write('<input type="hidden" name="custom_color_rgb" />');
|
||||||
|
document.write('<input type="submit" name="custom_color_reset" value="<?php echo $strReset; ?>" />');
|
||||||
|
document.write('</form>');
|
||||||
|
document.write('</li>');
|
||||||
|
//]]>
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
}
|
}
|
||||||
echo '<li id="li_select_fontsize">';
|
echo '<li id="li_select_fontsize">';
|
||||||
echo PMA_Config::getFontsizeForm();
|
echo PMA_Config::getFontsizeForm();
|
||||||
|
Reference in New Issue
Block a user