]> wagnertech.de Git - mfinanz.git/blob - templates/design40_webpages/admin/edit_user.html
date error in mapping
[mfinanz.git] / templates / design40_webpages / admin / edit_user.html
1 [% USE HTML %]
2 [% USE L %]
3 [% USE LxERP %]
4 [% USE JavaScript %]
5
6 [% INCLUDE 'common/flash.html' %]
7
8 <h1>[% HTML.escape(title) %]</h1>
9
10 <form method="post" action="controller.pl" id="form">
11 [% L.hidden_tag("user.id", SELF.user.id) %]
12 [% L.hidden_tag("action", "") %]
13 [% L.hidden_tag("check_previously_used", "0") %]
14 [% L.hidden_tag("assign_documents", "0") %]
15 [% SET props=SELF.user.config_values %]
16
17 <!-- <h2>[% #LxERP.t8("Settings") %]</h2> -->
18 <div class="wrapper">
19
20
21 <table class="tbl-horizontal">
22   <caption>[% LxERP.t8("User & Communication") %]</caption>
23   <colgroup><col class="wi-small"><col class="wi-wide"></colgroup>
24   <tbody>
25   <tr>
26     <th>[% LxERP.t8('Login Name') %]</th>
27     <td>[% L.input_tag("user.login", SELF.user.login, class="initial_focus wi-wide") %]</td>
28   </tr>
29   [% IF AUTH.can_change_password %] 
30   <tr>
31     <th>[% LxERP.t8("New Password") %]</th>
32     <td>[% L.input_tag("new_password", "", type="password", class="wi-wide") %]</td>
33   </tr>
34   [% END %] 
35   <tr>
36     <th>[% LxERP.t8("Name") %]</th>
37     <td>[% L.input_tag("user.config_values.name", props.name, class="wi-wide") %]</td>
38   </tr>
39   <tr>
40     <th>[% LxERP.t8('E-mail') %]</th>
41     <td>[% L.input_tag("user.config_values.email", props.email, class="wi-wide") %]</td>
42   </tr>
43   <tr>
44     <th>[% LxERP.t8('Signature') %]</th>
45     <td>[% L.textarea_tag("user.config_values.signature", props.signature, rows=3, cols=24, class="texteditor wi-wide") %]</td>
46   </tr>
47   <tr>
48     <th>[% LxERP.t8('Phone') %]</th>
49     <td>[% L.input_tag("user.config_values.tel", props.tel, class="wi-wide") %]</td>
50   </tr>
51   <tr>
52     <th>[% LxERP.t8('Fax') %]</th>
53     <td>[% L.input_tag("user.config_values.fax", props.fax, class="wi-wide") %]</td>
54   </tr>
55   </tbody>
56 </table>
57
58 <table class="tbl-horizontal">
59   <caption>[% LxERP.t8("Formats & Language") %]</caption>
60   <colgroup><col class="wi-mediumsmall"><col class="wi-normal"></colgroup>
61   <tbody>
62   <tr>
63     <th>[% LxERP.t8("Date Format") %]</th>
64     <td>[% L.select_tag("user.config_values.dateformat", SELF.all_dateformats, default=props.dateformat, class="wi-normal") %]</td>
65   </tr>
66   <tr>
67     <th>[% LxERP.t8("Number Format") %]</th>
68     <td>[% L.select_tag("user.config_values.numberformat", SELF.all_numberformats, default=props.numberformat, class="wi-normal") %]</td>
69   </tr>
70   <tr>
71     <th>[% LxERP.t8("Language") %]</th>
72     <td>[% L.select_tag("user.config_values.countrycode", SELF.all_countrycodes, title_key="title", default=props.countrycode, class="wi-normal") %]</td>
73   </tr>
74   <tr>
75     <th>[% LxERP.t8("Stylesheet") %]</th>
76     <td>[% L.select_tag("user.config_values.stylesheet", SELF.all_stylesheets, default=props.stylesheet, class="wi-normal") %]</td>
77   </tr>
78   <tr>
79     <th>[% LxERP.t8("Setup Menu") %]</th>
80     <td>[% L.select_tag("user.config_values.menustyle", SELF.all_menustyles, title_key="title", default=props.menustyle, class="wi-normal") %]</td>
81   </tr>
82   <tr>
83     <th>[% LxERP.t8("Mandatory Departments") %]</th>
84     <td class="clear">
85       [% L.radio_button_tag('user.config_values.mandatory_departments', value='0', id='user.config_values.mandatory_departments_0', label=LxERP.t8('No'), checked=!props.mandatory_departments) %]
86       [% 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)%] </td>
87   </tr>
88   </tbody>
89 </table>
90
91 <table class="tbl-horizontal">
92   <caption>[% LxERP.t8("CTI settings") %]</caption>
93   <tbody>
94   <tr>
95     <th>[% LxERP.t8("Phone extension") %]</th>
96     <td>[% L.input_tag("user.config_values.phone_extension", props.phone_extension, class="wi-normal") %]</td>
97   </tr>
98   <tr>
99     <th>[% LxERP.t8("Phone password") %]</th>
100     <td>[% L.input_tag("user.config_values.phone_password", props.phone_password, class="wi-normal") %]</td>
101   </tr>
102   </tbody>
103 </table>
104
105 </div><!-- /.wrapper -->
106 <div class="wrapper">
107
108 <div class="col">
109 <h3>[% LxERP.t8("Access to clients") %]</h3>
110
111 [% IF SELF.all_clients.size %]
112   <p>[% LxERP.t8("This user will have access to the following clients") %]:</p>
113   <div class="clearfix">
114     [% L.select_tag("user.clients[]", SELF.all_clients, id="user_clients", title_key="name", default=SELF.user.clients, default_value_key='id', multiple=1) %]
115     [% L.multiselect2side("user_clients", labelsx => LxERP.t8("All clients"), labeldx => LxERP.t8("Clients this user has access to")) %]
116   </div>
117 [% ELSE %]
118   <p>[% LxERP.t8("No clients have been created yet.") %]</p>
119 [% END %]
120
121 </div>
122
123
124 <div class="col">
125 <h3 class="caption">[% LxERP.t8("Group membership") %]</h3>
126
127 [% IF SELF.all_groups.size %]
128   <p>[% LxERP.t8("This user is a member in the following groups") %]:</p>
129   <div class="clearfix">
130     [% L.select_tag("user.groups[]", SELF.all_groups, id="user_groups", title_key="name", default=SELF.user.groups, default_value_key='id', multiple=1) %]
131     [% L.multiselect2side("user_groups", labelsx => LxERP.t8("All groups"), labeldx => LxERP.t8("Groups this user is a member in")) %]
132   </div>
133 [% ELSE %]
134   <p>[% LxERP.t8("No groups have been created yet.") %]</p>
135 [% END %]
136 </div>
137
138 </div><!-- /.wrapper -->
139
140
141
142 <div class="buttons">
143   [% L.link(SELF.url_for(action="show"), LxERP.t8("Back"), class="button neutral") %]
144   [% L.button_tag("save_new()", LxERP.t8("Save")) %]
145   [% IF SELF.user.id %]
146     [% L.button_tag("save_as_new()", LxERP.t8("Save as new")) %]
147     [% L.button_tag("submit_delete()", LxERP.t8("Delete"), confirm=LxERP.t8("Are you sure?")) %]
148   [% END %]
149 </div>
150
151 </form>
152
153 <script type="text/javascript"><!--
154   function submit_with_action(action) {
155     $("#action").val("Admin/" + action);
156     $("#form").submit();
157   }
158
159   function submit_delete() {
160     [% SET used_for_task_server_in_clients = SELF.is_user_used_for_task_server(SELF.user) %]
161     [% IF used_for_task_server_in_clients %]
162       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)) %]');
163       return false;
164     [% ELSE %]
165       submit_with_action('delete_user');
166     [% END %]
167   }
168
169   function save() {
170     $("#action").val('Admin/save_user');
171     var data = $('#form').serializeArray();
172     $.post("controller.pl", data, kivi.eval_json_result);
173   }
174
175   function save_new() {
176     $("#check_previously_used").val("1");
177     save();
178   }
179
180   function save_as_new() {
181     $("#user_id").val("");
182     $("#check_previously_used").val("1");
183     save();
184   }
185
186   function show_loginname_previously_used_dialog() {
187     var buttons = {};
188     buttons[kivi.t8('Yes')] = function() {
189       $("#check_previously_used").val("0");
190       $("#assign_documents").val("1");
191       save();
192     };
193     buttons[kivi.t8('No')] = function() {
194       $("#check_previously_used").val("0");
195       save();
196     };
197     buttons[kivi.t8('Cancel')] = function() { $( this ).dialog('close'); };
198
199     kivi.popup_dialog({
200       id: 'loginname_previously_used_dialog',
201       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?'),
202       dialog: {
203         title:  kivi.t8('Login name was previously used'),
204         width:  400,
205         height: 250,
206         buttons: buttons
207       }
208     });
209   }
210 --></script>