Merge branch '2330-No-funciona-seleccionar-todos-los-objetos-en-plantillas-de-módulos' into 'develop'
Fixed checkbox select in manage_network_templates.php See merge request artica/pandorafms!1516
This commit is contained in:
commit
0520fba0f8
|
@ -190,7 +190,7 @@ $table->head = array ();
|
|||
$table->head[0] = __('Name');
|
||||
$table->head[1] = __('Description');
|
||||
$table->head[2] = '<span style="margin-right:7%;">'.__('Action') .'</span>'.
|
||||
html_print_checkbox('all_delete', 0, false, true, false, 'check_all_checkboxes();');
|
||||
html_print_checkbox('all_delete', 0, false, true, false);
|
||||
$table->size = array ();
|
||||
$table->size[1] = '65%';
|
||||
$table->size[2] = '15%';
|
||||
|
@ -239,12 +239,16 @@ echo '</div></form>';
|
|||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
function check_all_checkboxes() {
|
||||
if ($("input[name=all_delete]").attr('checked')) {
|
||||
$(".check_delete").attr('checked', true);
|
||||
// If you click on the input type checkbox with id checkbox-all_delete
|
||||
$('#checkbox-all_delete').click(function() {
|
||||
// If selected (if the checked property equals true)
|
||||
if ($(this).prop('checked')) {
|
||||
// Select each input that has the class .check_delete
|
||||
$('.check_delete').prop('checked', true);
|
||||
} else {
|
||||
// deselect every input that has the class .check_delete
|
||||
$('.check_delete').prop('checked', false);
|
||||
}
|
||||
else {
|
||||
$(".check_delete").attr('checked', false);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue