issue #0001797: add Checkbox and Radio buttons

This commit is contained in:
Michael RICOIS 2013-12-06 13:36:44 +00:00
parent 85aa5af7fe
commit 4c30dae316
2 changed files with 6 additions and 8 deletions

View File

@ -217,13 +217,13 @@ class Zend_View_Helper_Field extends Zend_View_Helper_Abstract
$selected = "active";
}
}
$return .= '<label class="btn btn-primary '.$selected.'">
<input type="checkbox" name="options" value="'.$value.'" id="option1">'.$label.'
$return .= '<label class="btn btn-default '.$selected.'">
<input type="checkbox" name="'.$name.'" value="'.$value.'" id="option1">'.$label.'
</label>';
}
$return .= '</div>';
$return .= '<a href="#" class="selectMultiple">Sélectionner</a>';
$return .= '&nbsp;<a href="#" class="selectMultipleEx">Exclure</a>';
$return .= '<button type="button" class="btn btn-primary btn-block selectMultiple">Sélectionner</button>';
$return .= '<button type="button" class="btn btn-primary btn-block selectMultipleEx">Exclure</button>';
return $return;
}

View File

@ -127,11 +127,9 @@ $(document).ready(function()
});
$('.panel-group').delegate('a.selectMultiple', 'click', function(e){
e.stopPropagation();
var obj = $(this).parent().find('div.criteres label input');
//alert('aaa');
set(obj.parent().attr('name'), obj.val());
var obj = $(this).parent().find('label.active input');
set(obj.attr('name'), obj.val());
});
$('.panel-group').delegate('a.selectMultipleEx', 'click', function(e){