Merge branch 'master' of https://github.com/devcode-it/openstamanager
This commit is contained in:
commit
ef4d9fe9df
|
@ -71,7 +71,6 @@ class ChoicesHandler implements HandlerInterface
|
||||||
// Generazione del codice HTML
|
// Generazione del codice HTML
|
||||||
// "+ this.checked" rende il valore booleano un numero
|
// "+ this.checked" rende il valore booleano un numero
|
||||||
$result = '
|
$result = '
|
||||||
<div class="form-group checkbox-group">
|
|
||||||
<input type="hidden" name="|name|" value="|value|" class="openstamanager-input">
|
<input type="hidden" name="|name|" value="|value|" class="openstamanager-input">
|
||||||
<input type="checkbox" id="|id|" value="|value|" class="hidden" |attr| onchange="$(this).parent().find(\'[type = hidden]\').val(+this.checked).trigger(\'change\')"/>
|
<input type="checkbox" id="|id|" value="|value|" class="hidden" |attr| onchange="$(this).parent().find(\'[type = hidden]\').val(+this.checked).trigger(\'change\')"/>
|
||||||
<div class="btn-group checkbox-buttons">
|
<div class="btn-group checkbox-buttons">
|
||||||
|
@ -83,7 +82,6 @@ class ChoicesHandler implements HandlerInterface
|
||||||
<span class="text-success">'.tr('Attivato').'</span>
|
<span class="text-success">'.tr('Attivato').'</span>
|
||||||
<span class="text-danger">'.tr('Disattivato').'</span>
|
<span class="text-danger">'.tr('Disattivato').'</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
|
||||||
</div>';
|
</div>';
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
|
|
|
@ -30,6 +30,10 @@ class HTMLWrapper implements WrapperInterface
|
||||||
{
|
{
|
||||||
$result = '';
|
$result = '';
|
||||||
|
|
||||||
|
if( $values['type']=='checkbox' ){
|
||||||
|
$values['class'] = 'checkbox-group';
|
||||||
|
}
|
||||||
|
|
||||||
// Valori particolari
|
// Valori particolari
|
||||||
$values['icon-before'] = isset($values['icon-before']) ? $this->parser($values, $extras, $values['icon-before']) : null;
|
$values['icon-before'] = isset($values['icon-before']) ? $this->parser($values, $extras, $values['icon-before']) : null;
|
||||||
$values['icon-after'] = isset($values['icon-after']) ? $this->parser($values, $extras, $values['icon-after']) : null;
|
$values['icon-after'] = isset($values['icon-after']) ? $this->parser($values, $extras, $values['icon-after']) : null;
|
||||||
|
@ -37,7 +41,7 @@ class HTMLWrapper implements WrapperInterface
|
||||||
// Generazione dell'etichetta
|
// Generazione dell'etichetta
|
||||||
if (!empty($values['label'])) {
|
if (!empty($values['label'])) {
|
||||||
$result .= '
|
$result .= '
|
||||||
<div class="form-group">
|
<div class="form-group '.$values['class'].'">
|
||||||
<label for="'.prepareToField($values['id']).'">'.(empty($values['help']) ? $values['label'] : '<span class="tip" title="'.prepareToField($values['help']).'">'.$values['label'].' <i class="fa fa-question-circle-o"></i></span>').'</label>';
|
<label for="'.prepareToField($values['id']).'">'.(empty($values['help']) ? $values['label'] : '<span class="tip" title="'.prepareToField($values['help']).'">'.$values['label'].' <i class="fa fa-question-circle-o"></i></span>').'</label>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue