Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 309ed7b1

Von Hans P. Schlaepfer vor fast 4 Jahren hinzugefügt

  • ID 309ed7b10dbfef1ed30d064ebe1f42be730f7dd6
  • Vorgänger be7e1cb1
  • Nachfolger 432725c1

Neues Design 2019 Standard-Code templates/webpages/admin/edit_user.html

Unterschiede anzeigen:

templates/webpages/admin/edit_user.html
3 3
[% USE LxERP %]
4 4
[% USE JavaScript %]
5 5

  
6
[%- INCLUDE 'common/flash.html' %]
6
[% INCLUDE 'common/flash.html' %]
7 7

  
8 8
<h1>[% HTML.escape(title) %]</h1>
9 9

  
10 10
<form method="post" action="controller.pl" id="form">
11
 [% L.hidden_tag("user.id", SELF.user.id) %]
12
 [% L.hidden_tag("action", "") %]
13
 [%- SET props=SELF.user.config_values %]
14

  
15
 <h2>[%- LxERP.t8("Settings") %]</h2>
16

  
17
 <table>
18
  <tr valign="top">
19
   <td>
20
    <table>
21
     <tr>
22
      <th align="right">[% LxERP.t8('Login Name') %]</th>
23
      <td>[% L.input_tag("user.login", SELF.user.login, class="initial_focus") %]</td>
24
     </tr>
25

  
26
     [%- IF AUTH.can_change_password %]
27
     <tr>
28
      <th align="right">[% LxERP.t8("New Password") %]</th>
29
      <td>[% L.input_tag("new_password", "", type="password") %]</td>
30
     </tr>
31
     [%- END %]
32

  
33
     <tr>
34
      <th align="right">[% LxERP.t8("Name") %]</th>
35
      <td>[% L.input_tag("user.config_values.name", props.name) %]</td>
36
     </tr>
37

  
38
     <tr>
39
      <th align="right">[% LxERP.t8('E-mail') %]</th>
40
      <td>[% L.input_tag("user.config_values.email", props.email) %]</td>
41
     </tr>
42

  
43
     <tr valign="top">
44
      <th align="right">[% LxERP.t8('Signature') %]</th>
45
      <td>[% L.textarea_tag("user.config_values.signature", props.signature, rows=3, cols=35) %]</td>
46
     </tr>
47

  
48
     <tr>
49
      <th align="right">[% LxERP.t8('Phone') %]</th>
50
      <td>[% L.input_tag("user.config_values.tel", props.tel) %]</td>
51
     </tr>
52

  
53
     <tr>
54
      <th align="right">[% LxERP.t8('Fax') %]</th>
55
      <td>[% L.input_tag("user.config_values.fax", props.fax) %]</td>
56
     </tr>
57
    </table>
58
   </td>
59

  
60
   <td>
61
    <table>
62
     <tr>
63
      <th align="right">[% LxERP.t8("Date Format") %]</th>
64
      <td>[% L.select_tag("user.config_values.dateformat", SELF.all_dateformats, default=props.dateformat) %]</td>
65
     </tr>
66

  
67
     <tr>
68
      <th align="right">[% LxERP.t8("Number Format") %]</th>
69
      <td>[% L.select_tag("user.config_values.numberformat", SELF.all_numberformats, default=props.numberformat) %]</td>
70
     </tr>
71

  
72
     <tr>
73
      <th align="right">[% LxERP.t8("Language") %]</th>
74
      <td>[% L.select_tag("user.config_values.countrycode", SELF.all_countrycodes, title_key="title", default=props.countrycode) %]</td>
75
     </tr>
76

  
77
     <tr>
78
      <th align="right">[% LxERP.t8("Stylesheet") %]</th>
79
      <td>[% L.select_tag("user.config_values.stylesheet", SELF.all_stylesheets, default=props.stylesheet) %]</td>
80
     </tr>
81

  
82
     <tr>
83
      <th align="right">[% LxERP.t8("Setup Menu") %]</th>
84
      <td>[% L.select_tag("user.config_values.menustyle", SELF.all_menustyles, title_key="title", default=props.menustyle) %]</td>
85
     </tr>
86

  
87
     <tr>
88
      <th align="right">[% LxERP.t8("Mandatory Departments") %]</th>
89
      <td>
90
       [% 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) %]
91
       [% 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) %]
92
      </td>
93
     </tr>
94
    </table>
95
   </td>
96
  </tr>
97
 </table>
11
[% L.hidden_tag("user.id", SELF.user.id) %]
12
[% L.hidden_tag("action", "") %]
13
[% SET props=SELF.user.config_values %]
14

  
15
<!-- <h2>[% #LxERP.t8("Settings") %]</h2> -->
16
<div class="wrapper">
98 17

  
99
 <h2>[%- LxERP.t8("CTI settings") %]</h2>
100 18

  
101
 <table>
19
<table class="tbl-horizontal">
20
  <caption>[% LxERP.t8("User & Communication") %]</caption>
21
  <colgroup><col class="wi-small"><col class="wi-wide"></colgroup>
22
  <tbody>
23
  <tr>
24
    <th>[% LxERP.t8('Login Name') %]</th>
25
    <td>[% L.input_tag("user.login", SELF.user.login, class="initial_focus wi-wide") %]</td>
26
  </tr>
27
  [% IF AUTH.can_change_password %] 
28
  <tr>
29
    <th>[% LxERP.t8("New Password") %]</th>
30
    <td>[% L.input_tag("new_password", "", type="password", class="wi-wide") %]</td>
31
  </tr>
32
  [% END %] 
33
  <tr>
34
    <th>[% LxERP.t8("Name") %]</th>
35
    <td>[% L.input_tag("user.config_values.name", props.name, class="wi-wide") %]</td>
36
  </tr>
37
  <tr>
38
    <th>[% LxERP.t8('E-mail') %]</th>
39
    <td>[% L.input_tag("user.config_values.email", props.email, class="wi-wide") %]</td>
40
  </tr>
102 41
  <tr>
103
   <th align="right">[% LxERP.t8("Phone extension") %]</th>
104
   <td>[% L.input_tag("user.config_values.phone_extension", props.phone_extension) %]</td>
42
    <th>[% LxERP.t8('Signature') %]</th>
43
    <td>[% L.textarea_tag("user.config_values.signature", props.signature, rows=3, cols=24, class="wi-wide") %]</td>
105 44
  </tr>
45
  <tr>
46
    <th>[% LxERP.t8('Phone') %]</th>
47
    <td>[% L.input_tag("user.config_values.tel", props.tel, class="wi-wide") %]</td>
48
  </tr>
49
  <tr>
50
    <th>[% LxERP.t8('Fax') %]</th>
51
    <td>[% L.input_tag("user.config_values.fax", props.fax, class="wi-wide") %]</td>
52
  </tr>
53
  </tbody>
54
</table>
106 55

  
56
<table class="tbl-horizontal">
57
  <caption>[% LxERP.t8("Formats & Language") %]</caption>
58
  <colgroup><col class="wi-mediumsmall"><col class="wi-normal"></colgroup>
59
  <tbody>
107 60
  <tr>
108
   <th align="right">[% LxERP.t8("Phone password") %]</th>
109
   <td>[% L.input_tag("user.config_values.phone_password", props.phone_password) %]</td>
61
    <th>[% LxERP.t8("Date Format") %]</th>
62
    <td>[% L.select_tag("user.config_values.dateformat", SELF.all_dateformats, default=props.dateformat, class="wi-normal") %]</td>
110 63
  </tr>
111
 </table>
64
  <tr>
65
    <th>[% LxERP.t8("Number Format") %]</th>
66
    <td>[% L.select_tag("user.config_values.numberformat", SELF.all_numberformats, default=props.numberformat, class="wi-normal") %]</td>
67
  </tr>
68
  <tr>
69
    <th>[% LxERP.t8("Language") %]</th>
70
    <td>[% L.select_tag("user.config_values.countrycode", SELF.all_countrycodes, title_key="title", default=props.countrycode, class="wi-normal") %]</td>
71
  </tr>
72
  <tr>
73
    <th>[% LxERP.t8("Stylesheet") %]</th>
74
    <td>[% L.select_tag("user.config_values.stylesheet", SELF.all_stylesheets, default=props.stylesheet, class="wi-normal") %]</td>
75
  </tr>
76
  <tr>
77
    <th>[% LxERP.t8("Setup Menu") %]</th>
78
    <td>[% L.select_tag("user.config_values.menustyle", SELF.all_menustyles, title_key="title", default=props.menustyle, class="wi-normal") %]</td>
79
  </tr>
80
  <tr>
81
    <th>[% LxERP.t8("Mandatory Departments") %]</th>
82
    <td>
83
      [% 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) %] <br>
84
      [% 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>
85
  </tr>
86
  </tbody>
87
</table>
88

  
89
<table class="tbl-horizontal">
90
  <caption>[% LxERP.t8("CTI settings") %]</caption>
91
  <tbody>
92
  <tr>
93
    <th>[% LxERP.t8("Phone extension") %]</th>
94
    <td>[% L.input_tag("user.config_values.phone_extension", props.phone_extension, class="wi-normal") %]</td>
95
  </tr>
96
  <tr>
97
    <th>[% LxERP.t8("Phone password") %]</th>
98
    <td>[% L.input_tag("user.config_values.phone_password", props.phone_password, class="wi-normal") %]</td>
99
  </tr>
100
  </tbody>
101
</table>
102

  
103
</div><!-- /.wrapper -->
104
<div class="wrapper">
112 105

  
113
 <h2>[%- LxERP.t8("Access to clients") %]</h2>
106
<div class="col">
107
<h3>[% LxERP.t8("Access to clients") %]</h3>
114 108

  
115 109
[% IF SELF.all_clients.size %]
116
 <p>
117
  [%- LxERP.t8("This user will have access to the following clients") %]:
118
 </p>
110
  <p>[% LxERP.t8("This user will have access to the following clients") %]:</p>
111
  <div class="clearfix">
112
    [% L.select_tag("user.clients[]", SELF.all_clients, id="user_clients", title_key="name", default=SELF.user.clients, default_value_key='id', multiple=1) %]
113
    [% L.multiselect2side("user_clients", labelsx => LxERP.t8("All clients"), labeldx => LxERP.t8("Clients this user has access to")) %]
114
  </div>
115
[% ELSE %]
116
  <p>[% LxERP.t8("No clients have been created yet.") %]</p>
117
[% END %]
119 118

  
120
 <div class="clearfix">
121
  [% L.select_tag("user.clients[]", SELF.all_clients, id="user_clients", title_key="name", default=SELF.user.clients, default_value_key='id', multiple=1) %]
122
  [% L.multiselect2side("user_clients", labelsx => LxERP.t8("All clients"), labeldx => LxERP.t8("Clients this user has access to")) %]
123
 </div>
119
</div>
124 120

  
125
[%- ELSE %]
126
 <p>
127
  [% LxERP.t8("No clients have been created yet.") %]
128
 </p>
129
[%- END %]
130 121

  
131
 <h2>[%- LxERP.t8("Group membership") %]</h2>
122
<div class="col">
123
<h3 class="caption">[% LxERP.t8("Group membership") %]</h3>
132 124

  
133 125
[% IF SELF.all_groups.size %]
134
 <p>
135
  [%- LxERP.t8("This user is a member in the following groups") %]:
136
 </p>
137

  
138
 <div class="clearfix">
139
  [% L.select_tag("user.groups[]", SELF.all_groups, id="user_groups", title_key="name", default=SELF.user.groups, default_value_key='id', multiple=1) %]
140
  [% L.multiselect2side("user_groups", labelsx => LxERP.t8("All groups"), labeldx => LxERP.t8("Groups this user is a member in")) %]
141
 </div>
126
  <p>[% LxERP.t8("This user is a member in the following groups") %]:</p>
127
  <div class="clearfix">
128
    [% L.select_tag("user.groups[]", SELF.all_groups, id="user_groups", title_key="name", default=SELF.user.groups, default_value_key='id', multiple=1) %]
129
    [% L.multiselect2side("user_groups", labelsx => LxERP.t8("All groups"), labeldx => LxERP.t8("Groups this user is a member in")) %]
130
  </div>
131
[% ELSE %]
132
  <p>[% LxERP.t8("No groups have been created yet.") %]</p>
133
[% END %]
134
</div>
142 135

  
143
[%- ELSE %]
144
 <p>
145
  [% LxERP.t8("No groups have been created yet.") %]
146
 </p>
147
[%- END %]
136
</div><!-- /.wrapper -->
148 137

  
149
<hr size="3" noshade>
150 138

  
151
<p>
152
 [% L.link(SELF.url_for(action="show"), LxERP.t8("Back")) %]
153 139

  
154
 [% L.button_tag("submit_with_action('save_user')", LxERP.t8("Save")) %]
155
 [% IF SELF.user.id %]
156
  [% L.button_tag("save_as_new()", LxERP.t8("Save as new")) %]
157
  [% L.button_tag("submit_delete()", LxERP.t8("Delete"), confirm=LxERP.t8("Are you sure?")) %]
158
 [%- END %]
159
</p>
140
<div class="buttons">
141
  [% L.link(SELF.url_for(action="show"), LxERP.t8("Back"), class="button neutral") %]
142
  [% L.button_tag("submit_with_action('save_user')", LxERP.t8("Save")) %]
143
  [% IF SELF.user.id %]
144
    [% L.button_tag("save_as_new()", LxERP.t8("Save as new")) %]
145
    [% L.button_tag("submit_delete()", LxERP.t8("Delete"), confirm=LxERP.t8("Are you sure?")) %]
146
  [% END %]
147
</div>
160 148

  
161 149
</form>
162 150

  
163
<script type="text/javascript">
164
 <!--
151
<script type="text/javascript"><!--
165 152
  function submit_with_action(action) {
166 153
    $("#action").val("Admin/" + action);
167 154
    $("#form").submit();
168 155
  }
169 156

  
170 157
  function submit_delete() {
171
[% SET used_for_task_server_in_clients = SELF.is_user_used_for_task_server(SELF.user) %]
172
[% IF used_for_task_server_in_clients %]
173
   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)) %]');
174
   return false;
175
[% ELSE %]
176
    submit_with_action('delete_user');
177
[% END %]
158
    [% SET used_for_task_server_in_clients = SELF.is_user_used_for_task_server(SELF.user) %]
159
    [% IF used_for_task_server_in_clients %]
160
      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)) %]');
161
      return false;
162
    [% ELSE %]
163
      submit_with_action('delete_user');
164
    [% END %]
178 165
  }
179 166

  
180 167
  function save_as_new() {
181 168
    $("#user_id").val("");
182 169
    submit_with_action("save_user");
183 170
  }
184
   -->
185
</script>
171
--></script>

Auch abrufbar als: Unified diff