X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=templates%2Fwebpages%2Fadmin%2Fedit_user.html;h=34a01a2dede8e5175b764e664cc1ed54c2e945a7;hb=a8459f498a58bdabcd87bcdf1cd08e9f5726abe4;hp=ff6a188ebe7e0575ae24ad52afcaa6b8e3032b85;hpb=34af475f9ba442662231760475fe156ddc70a107;p=kivitendo-erp.git
diff --git a/templates/webpages/admin/edit_user.html b/templates/webpages/admin/edit_user.html
index ff6a188eb..34a01a2de 100644
--- a/templates/webpages/admin/edit_user.html
+++ b/templates/webpages/admin/edit_user.html
@@ -1,5 +1,5 @@
[%- USE HTML %]
-[%- USE L %][%- USE LxERP -%]
+[%- USE L %][%- USE LxERP -%][%- USE JavaScript -%]
[%- INCLUDE 'common/flash.html' %]
@@ -99,6 +99,20 @@
+
[%- LxERP.t8("CTI settings") %]
+
+
+
+ [% LxERP.t8("Phone extension") %] |
+ [% L.input_tag("user.config_values.phone_extension", props.phone_extension) %] |
+
+
+
+ [% LxERP.t8("Phone password") %] |
+ [% L.input_tag("user.config_values.phone_password", props.phone_password) %] |
+
+
+
[%- LxERP.t8("Access to clients") %]
[% IF SELF.all_clients.size %]
@@ -143,7 +157,7 @@
[% L.button_tag("submit_with_action('save_user')", LxERP.t8("Save")) %]
[% IF SELF.user.id %]
[% L.button_tag("save_as_new()", LxERP.t8("Save as new")) %]
- [% L.button_tag("submit_with_action('delete_user')", LxERP.t8("Delete"), confirm=LxERP.t8("Are you sure?")) %]
+ [% L.button_tag("submit_delete()", LxERP.t8("Delete"), confirm=LxERP.t8("Are you sure?")) %]
[%- END %]
@@ -156,12 +170,17 @@
$("#form").submit();
}
- function save_as_new() {
- var new_user_login = prompt("[% LxERP.t8("Please enter the login for the new user.") %]", "");
- if (!new_user_login)
- return;
+ function submit_delete() {
+[% SET used_for_task_server_in_clients = SELF.is_user_used_for_task_server(SELF.user) %]
+[% IF used_for_task_server_in_clients %]
+ alert('[% JavaScript.escape(LxERP.t8('The user cannot be deleted as it is used in the following clients: #1', used_for_task_server_in_clients)) %]');
+ return false;
+[% ELSE %]
+ submit_with_action('delete_user');
+[% END %]
+ }
- $("#user_login").val(new_user_login);
+ function save_as_new() {
$("#user_id").val("");
submit_with_action("save_user");
}