mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 15:47:00 +02:00
Avoid duplicate values of HTML id attributes (bug #3614245)
Unsupports <label> in IE6.
This commit is contained in:
@@ -99,14 +99,12 @@ function nl_br($string) {
|
||||
* @return string
|
||||
*/
|
||||
function checkbox($name, $value, $checked, $label = "", $onclick = "", $class = "") {
|
||||
static $id = 0;
|
||||
$id++;
|
||||
$return = "<input type='checkbox' name='$name' value='" . h($value) . "'"
|
||||
. ($checked ? " checked" : "")
|
||||
. ($onclick ? ' onclick="' . h($onclick) . '"' : '')
|
||||
. " id='checkbox-$id'>"
|
||||
. ">"
|
||||
;
|
||||
return ($label != "" || $class ? "<label for='checkbox-$id'" . ($class ? " class='$class'" : "") . ">$return" . h($label) . "</label>" : $return);
|
||||
return ($label != "" || $class ? "<label" . ($class ? " class='$class'" : "") . ">$return" . h($label) . "</label>" : $return);
|
||||
}
|
||||
|
||||
/** Generate list of HTML options
|
||||
|
Reference in New Issue
Block a user