X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/188734cee4672fe7421293f7af68fa3734e52064..refs/heads/master:/templates/webpages/admin/edit_user.html diff --git a/templates/webpages/admin/edit_user.html b/templates/webpages/admin/edit_user.html index 5ecd92673..31a3e9f32 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' %] @@ -8,6 +8,8 @@
[% L.hidden_tag("user.id", SELF.user.id) %] [% L.hidden_tag("action", "") %] + [% L.hidden_tag("check_previously_used", "0") %] + [% L.hidden_tag("assign_documents", "0") %] [%- SET props=SELF.user.config_values %]

[%- LxERP.t8("Settings") %]

@@ -40,7 +42,7 @@ [% LxERP.t8('Signature') %] - [% L.textarea_tag("user.config_values.signature", props.signature, rows=3, cols=35) %] + [% L.textarea_tag("user.config_values.signature", props.signature, rows=3, cols=35, class="texteditor") %] @@ -67,11 +69,6 @@ [% 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) %] @@ -94,11 +91,26 @@ [% L.radio_button_tag('user.config_values.mandatory_departments', value='1', id='user.config_values.mandatory_departments_1', label=LxERP.t8('Yes'), checked= props.mandatory_departments) %] + +

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

[% L.link(SELF.url_for(action="show"), LxERP.t8("Back")) %] - [% L.button_tag("submit_with_action('save_user')", LxERP.t8("Save")) %] + [% L.button_tag("save_new()", 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,9 +168,56 @@ $("#form").submit(); } + 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 %] + } + + function save() { + $("#action").val('Admin/save_user'); + var data = $('#form').serializeArray(); + $.post("controller.pl", data, kivi.eval_json_result); + } + + function save_new() { + $("#check_previously_used").val("1"); + save(); + } + function save_as_new() { $("#user_id").val(""); - submit_with_action("save_newuser"); + $("#check_previously_used").val("1"); + save(); + } + + function show_loginname_previously_used_dialog() { + var buttons = {}; + buttons[kivi.t8('Yes')] = function() { + $("#check_previously_used").val("0"); + $("#assign_documents").val("1"); + save(); + }; + buttons[kivi.t8('No')] = function() { + $("#check_previously_used").val("0"); + save(); + }; + buttons[kivi.t8('Cancel')] = function() { $( this ).dialog('close'); }; + + kivi.popup_dialog({ + id: 'loginname_previously_used_dialog', + html: kivi.t8('The login name you entered was previously used. Do you want to assign documents from the former user that had the same username to the new user?'), + dialog: { + title: kivi.t8('Login name was previously used'), + width: 400, + height: 250, + buttons: buttons + } + }); } -->