X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=templates%2Fwebpages%2Fadmin%2Fedit_user.html;h=1a90d3f29adce7ab85f1a65c0ede3fcc7452a4b5;hb=1aa2686b209cfb06364d15bd5b40d813e6607e1e;hp=f8154bf07f4aebbc4b02a07e01328016a31693b4;hpb=841d44c00aae1166a0721e40dc2f9ffb7b9ac5b5;p=kivitendo-erp.git diff --git a/templates/webpages/admin/edit_user.html b/templates/webpages/admin/edit_user.html index f8154bf07..1a90d3f29 100644 --- a/templates/webpages/admin/edit_user.html +++ b/templates/webpages/admin/edit_user.html @@ -1,12 +1,10 @@ [%- USE HTML %] -[%- USE L %][%- USE LxERP -%] +[%- USE L %][%- USE LxERP -%][%- USE JavaScript -%] [%- INCLUDE 'common/flash.html' %]

[% HTML.escape(title) %]

-

[% L.link(SELF.url_for(action="show"), LxERP.t8("Back")) %]

-
[% L.hidden_tag("user.id", SELF.user.id) %] [% L.hidden_tag("action", "") %] @@ -20,7 +18,7 @@ - + [%- IF AUTH.can_change_password %] @@ -69,11 +67,6 @@ - - - - - @@ -101,6 +94,20 @@
[% LxERP.t8('Login Name') %][% L.input_tag("user.login", SELF.user.login) %][% L.input_tag("user.login", SELF.user.login, class="initial_focus") %]
[% L.select_tag("user.config_values.numberformat", SELF.all_numberformats, default=props.numberformat) %]
[% LxERP.t8("Dropdown Limit") %][% L.input_tag("user.config_values.vclimit", props.vclimit) %]
[% LxERP.t8("Language") %] [% L.select_tag("user.config_values.countrycode", SELF.all_countrycodes, title_key="title", default=props.countrycode) %]
+

[%- 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 %] @@ -145,7 +152,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 %]

@@ -158,12 +165,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"); }