" . $finalCatMarkup . " " . $finalFeatMarkup . " function updateCheckboxes() { // Get the value from the dropdown var dropdownValue = $('#permission-tpl').val(); updateCategoriesAndFeatures(dropdownValue); } function updateCategoriesAndFeatures(dropdownValue) { // Get the category array var newCats = categories[dropdownValue]; var newFeats = features[dropdownValue]; // Uncheck everything $('.cat-checkbox').prop('checked', false); $('.feat-checkbox').prop('checked', false); newCats.forEach(function(entry) { if (entry == 'ALL') { $('.cat-checkbox').prop('checked', true); } else { $('#cat-'+entry).prop('checked', true); } }); newFeats.forEach(function(entry) { if (entry == 'ALL') { $('.feat-checkbox').prop('checked', true); } else { $('#feat-'+entry).prop('checked', true); } }); } function setTemplateToCustom() { $('input[name=\"template\"]').val('-1'); " . ($action == 'edit_user' ? ($_SESSION['isadmin'] ? '' : "$('#changed-group-warning').show();") : '') . " } "; }