mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 15:47:00 +02:00
Use <script> instead of inline event handler in print_fieldset()
This commit is contained in:
@@ -200,11 +200,14 @@ function confirm($selector = "qsl('input')") {
|
|||||||
* @param string
|
* @param string
|
||||||
* @param string
|
* @param string
|
||||||
* @param bool
|
* @param bool
|
||||||
* @param string
|
|
||||||
* @return null
|
* @return null
|
||||||
*/
|
*/
|
||||||
function print_fieldset($id, $legend, $visible = false, $onclick = "") {
|
function print_fieldset($id, $legend, $visible = false) {
|
||||||
echo "<fieldset><legend><a href='#fieldset-$id' onclick=\"" . h($onclick) . "return toggle('fieldset-$id');\">$legend</a></legend><div id='fieldset-$id'" . ($visible ? "" : " class='hidden'") . ">\n";
|
echo "<fieldset><legend>";
|
||||||
|
echo "<a href='#fieldset-$id'>$legend</a>";
|
||||||
|
echo "<script>qsl('a').onclick = partial(toggle, 'fieldset-$id');</script>";
|
||||||
|
echo "</legend>";
|
||||||
|
echo "<div id='fieldset-$id'" . ($visible ? "" : " class='hidden'") . ">\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Return class='active' if $bold is true
|
/** Return class='active' if $bold is true
|
||||||
|
Reference in New Issue
Block a user