diff --git a/src/mibew/styles/pages/default/js/operators.js b/src/mibew/js/source/operators.js similarity index 87% rename from src/mibew/styles/pages/default/js/operators.js rename to src/mibew/js/source/operators.js index e5db5026..a06a9d30 100644 --- a/src/mibew/styles/pages/default/js/operators.js +++ b/src/mibew/js/source/operators.js @@ -18,12 +18,10 @@ (function(Mibew, $) { $(document).ready(function(){ - $('a.removelink').click(function(){ - var login = $.trim($("#t" + this.id).text()); - + $('a.remove-link').click(function(){ return confirm(Mibew.Localization.trans( 'Are you sure that you want to delete operator "{0}"?', - login + $(this).data('operator-login') )); }); }); diff --git a/src/mibew/libs/classes/Mibew/Controller/Operator/ManagementController.php b/src/mibew/libs/classes/Mibew/Controller/Operator/ManagementController.php index c47d2dc7..e13552a2 100644 --- a/src/mibew/libs/classes/Mibew/Controller/Operator/ManagementController.php +++ b/src/mibew/libs/classes/Mibew/Controller/Operator/ManagementController.php @@ -90,6 +90,8 @@ class ManagementController extends AbstractController $page['menuid'] = 'operators'; $page = array_merge($page, prepare_menu($operator)); + $this->getAssetManager()->attachJs('js/compiled/operators.js'); + return $this->render('operators', $page); } diff --git a/src/mibew/styles/pages/default/templates_src/server_side/operators.handlebars b/src/mibew/styles/pages/default/templates_src/server_side/operators.handlebars index bdc031f0..20e76557 100644 --- a/src/mibew/styles/pages/default/templates_src/server_side/operators.handlebars +++ b/src/mibew/styles/pages/default/templates_src/server_side/operators.handlebars @@ -1,10 +1,6 @@ {{#extends "_layout"}} {{#override "menu"}}{{> _menu}}{{/override}} - {{#override "head"}} - - {{/override}} - {{#override "content"}} {{l10n "This page displays a list of company operators."}} @@ -75,7 +71,7 @@ {{#each allowedAgents}} - + {{vclogin}} @@ -106,7 +102,7 @@ - + {{l10n "remove"}}