mirror of https://gitee.com/karson/fastadmin.git
修复 checkboxs
parent
a97d0c9a68
commit
f8a1c3975f
|
|
@ -870,7 +870,7 @@ EOD;
|
||||||
$checked = is_array($checked) ? $checked : explode(',', $checked);
|
$checked = is_array($checked) ? $checked : explode(',', $checked);
|
||||||
foreach ($list as $k => $v) {
|
foreach ($list as $k => $v) {
|
||||||
$options['id'] = "{$name}-{$k}";
|
$options['id'] = "{$name}-{$k}";
|
||||||
$html[] = sprintf(Form::label("{$name}-{$k}", "%s {$v}"), Form::checkbox("{$name}[{$k}}]", $k, in_array($k, $checked), $options));
|
$html[] = sprintf(Form::label("{$name}-{$k}", "%s {$v}"), Form::checkbox("{$name}[{$k}]", $k, in_array($k, $checked), $options));
|
||||||
}
|
}
|
||||||
return '<div class="checkbox">' . implode(' ', $html) . '</div>';
|
return '<div class="checkbox">' . implode(' ', $html) . '</div>';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue