Added disabled status to switches
Former-commit-id: 7fee49f58e4be84bfb8bad08303b203d71dafe16
This commit is contained in:
parent
6ddcfcbb19
commit
37d02ddf59
|
@ -2593,9 +2593,10 @@ function html_print_switch ($attributes = array()) {
|
|||
|
||||
$name_html = isset($attributes['name']) ? "name = {$attributes['name']}" : '';
|
||||
$checked_html = (bool)$attributes['value'] ? 'checked' : '';
|
||||
$disabled_html = (bool)$attributes['disabled'] ? 'disabled' : '';
|
||||
return
|
||||
"<label class='p-switch'>
|
||||
<input type='checkbox' $name_html $checked_html>
|
||||
<input type='checkbox' $name_html $checked_html $disabled_html>
|
||||
<span class='p-slider'></span>
|
||||
</label>";
|
||||
}
|
||||
|
|
|
@ -5290,4 +5290,8 @@ input:checked + .p-slider:before {
|
|||
transform: translateX(13px);
|
||||
}
|
||||
|
||||
input:disabled + .p-slider {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
/* --- END SWITCH --- */
|
||||
|
|
Loading…
Reference in New Issue