diff --git a/src/mibew/styles/pages/default/js/group.js b/src/mibew/js/source/group.js similarity index 83% rename from src/mibew/styles/pages/default/js/group.js rename to src/mibew/js/source/group.js index aa6dc6a8..44bf62f0 100644 --- a/src/mibew/styles/pages/default/js/group.js +++ b/src/mibew/js/source/group.js @@ -18,15 +18,15 @@ (function($) { function updateParentGroup() { - if ($("#parentgroup").val() == '') { - $("#extrafields").show(); + if ($("#parent-group").val() == '') { + $("#extra-fields").show(); } else { - $("#extrafields").hide(); + $("#extra-fields").hide(); } } $(function() { - $("#parentgroup").change(function() { + $("#parent-group").change(function() { updateParentGroup(); }); updateParentGroup(); diff --git a/src/mibew/libs/classes/Mibew/Controller/Group/SettingsController.php b/src/mibew/libs/classes/Mibew/Controller/Group/SettingsController.php index aaf59456..e929f6d0 100644 --- a/src/mibew/libs/classes/Mibew/Controller/Group/SettingsController.php +++ b/src/mibew/libs/classes/Mibew/Controller/Group/SettingsController.php @@ -96,6 +96,8 @@ class SettingsController extends AbstractController $page = array_merge($page, prepare_menu($operator)); $page['tabs'] = $this->buildTabs($request); + $this->getAssetManager()->attachJs('js/compiled/group.js'); + return $this->render('group_edit', $page); } diff --git a/src/mibew/styles/pages/default/templates_src/server_side/group_edit.handlebars b/src/mibew/styles/pages/default/templates_src/server_side/group_edit.handlebars index 82d4c04f..eebb2f3f 100644 --- a/src/mibew/styles/pages/default/templates_src/server_side/group_edit.handlebars +++ b/src/mibew/styles/pages/default/templates_src/server_side/group_edit.handlebars @@ -1,10 +1,6 @@ {{#extends "_layout"}} {{#override "menu"}}{{> _menu}}{{/override}} - {{#override "head"}} - - {{/override}} - {{#override "content"}} {{#if grid}} {{l10n "On this page you can edit group details."}} @@ -89,19 +85,19 @@