mirror of
https://github.com/devcode-it/openstamanager.git
synced 2024-12-26 07:44:02 +01:00
Correzioni sulle nuove checkbox
This commit is contained in:
parent
ef31110afa
commit
b93c4dd259
@ -43,6 +43,11 @@ class ChoicesHandler implements HandlerInterface
|
|||||||
$extras[] = 'disabled';
|
$extras[] = 'disabled';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$class = '';
|
||||||
|
if (in_array('disabled', $extras)){
|
||||||
|
$class = ' disabled';
|
||||||
|
}
|
||||||
|
|
||||||
// Gestione dei placeholder
|
// Gestione dei placeholder
|
||||||
$values['placeholder'] = isset($values['placeholder']) ? $values['placeholder'] : $values['label'];
|
$values['placeholder'] = isset($values['placeholder']) ? $values['placeholder'] : $values['label'];
|
||||||
|
|
||||||
@ -53,12 +58,13 @@ class ChoicesHandler implements HandlerInterface
|
|||||||
<input type="hidden" name="|name|" value="|value|">
|
<input type="hidden" name="|name|" value="|value|">
|
||||||
<input type="checkbox" id="|id|" value="|value|" autocomplete="off" class="hidden" |attr| onchange="$(this).parent().find(\'[type = hidden]\').val(+this.checked)"/>
|
<input type="checkbox" id="|id|" value="|value|" autocomplete="off" class="hidden" |attr| onchange="$(this).parent().find(\'[type = hidden]\').val(+this.checked)"/>
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<label for="|id|" class="btn btn-default">
|
<label for="|id|" class="btn btn-default'.$class.'">
|
||||||
<span class="fa fa-check text-success"></span>
|
<span class="fa fa-check text-success"></span>
|
||||||
<span class="fa fa-close text-danger"></span>
|
<span class="fa fa-close text-danger"></span>
|
||||||
</label>
|
</label>
|
||||||
<label for="|id|" class="btn btn-default active">
|
<label for="|id|" class="btn btn-default active'.$class.'">
|
||||||
|placeholder|
|
<span class="text-success">'.tr('Attivato').'</span>
|
||||||
|
<span class="text-danger">'.tr('Disattivato').'</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>';
|
</div>';
|
||||||
|
Loading…
Reference in New Issue
Block a user