X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/ac9129294850cbe9f04119b3cbcf2a475ad8f4ba..HEAD:/templates/webpages/admin/edit_user.html?ds=sidebyside diff --git a/templates/webpages/admin/edit_user.html b/templates/webpages/admin/edit_user.html index 1a90d3f29..31a3e9f32 100644 --- a/templates/webpages/admin/edit_user.html +++ b/templates/webpages/admin/edit_user.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") %] @@ -89,6 +91,7 @@ [% 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) %] + @@ -149,7 +152,7 @@

[% 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_delete()", LxERP.t8("Delete"), confirm=LxERP.t8("Are you sure?")) %] @@ -175,9 +178,46 @@ [% 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_user"); + $("#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 + } + }); } -->