mirror of
https://github.com/vrana/adminer.git
synced 2026-03-19 02:51:07 +01:00
Increase click target for checkboxes (thanks to Roman)
This commit is contained in:
@@ -95,14 +95,18 @@ function nl_br($string) {
|
||||
* @param bool
|
||||
* @param string
|
||||
* @param string
|
||||
* @param bool
|
||||
* @param string
|
||||
* @return string
|
||||
*/
|
||||
function checkbox($name, $value, $checked, $label = "", $onclick = "", $jsonly = false) {
|
||||
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) . '"' : '') . ($jsonly ? " class='jsonly'" : "") . " id='checkbox-$id'>";
|
||||
return ($label != "" ? "<label for='checkbox-$id'>$return" . h($label) . "</label>" : $return);
|
||||
$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);
|
||||
}
|
||||
|
||||
/** Generate list of HTML options
|
||||
|
||||
Reference in New Issue
Block a user