1 |
2
|
Manuela
|
<!--
|
2 |
|
|
@version $Id: users_form.htt 75 2017-03-10 10:47:06Z manu $
|
3 |
|
|
-->
|
4 |
|
|
<!-- BEGIN main_block -->
|
5 |
|
|
<form name="user" action="{ACTION_URL}" method="post" class="{DISPLAY_ADD} access" style="margin: auto; width: 100%;" >
|
6 |
|
|
<input type="hidden" name="user_id" value="{USER_ID}" />
|
7 |
|
|
<input type="hidden" name="username_fieldname" value="{USERNAME_FIELDNAME}" />
|
8 |
|
|
{FTAN}
|
9 |
|
|
<h2 style="{DISPLAY_EXTRA}">{HEADING_MODIFY_USER}</h2>
|
10 |
|
|
<div class="block-outer" style="padding: 0.825em;">
|
11 |
|
|
<table style=" border-collapse: collapse; border-spacing: 0; width: 100%;" >
|
12 |
|
|
<thead class="value_label">
|
13 |
|
|
<tr>
|
14 |
|
|
<th></th>
|
15 |
|
|
<th style=" width: 70%;"></th>
|
16 |
|
|
</tr>
|
17 |
|
|
</thead>
|
18 |
|
|
<tbody class="value_label">
|
19 |
|
|
<tr>
|
20 |
|
|
<td>{TEXT_USERNAME}:</td>
|
21 |
|
|
<td class="value_input">
|
22 |
|
|
<!-- BEGIN user_add_block -->
|
23 |
|
|
<input type="text" name="{USERNAME_FIELDNAME}" maxlength="30" value="{USERNAME}" style="width: 52%;" />
|
24 |
|
|
<!-- END user_add_block -->
|
25 |
|
|
<!-- BEGIN user_display_block -->
|
26 |
|
|
<div id="username" style="width: 52%;" >{USERNAME}</div>
|
27 |
|
|
<!-- END user_display_block -->
|
28 |
|
|
</td>
|
29 |
|
|
|
30 |
|
|
</tr>
|
31 |
|
|
<tr class="ui-helper-clearfix">
|
32 |
|
|
<td class="setting_name">
|
33 |
|
|
<label for="pwLen" >Passwordlength:</label>
|
34 |
|
|
</td>
|
35 |
|
|
<td class="value_input">
|
36 |
|
|
<input type="text" onchange="onChange(this);" id="pwLen" value="8" name="length" style="width: 15%;" />
|
37 |
|
|
</td>
|
38 |
|
|
</tr>
|
39 |
|
|
|
40 |
|
|
<tr>
|
41 |
|
|
<td>{TEXT_PASSWORD}:</td>
|
42 |
|
|
<td class="value_input">
|
43 |
|
|
<input type="text" id="password" name="password" maxlength="30" value="" style="width: 52%;" />
|
44 |
|
|
<input type="button" value="generate" onclick="onClick(this);" style="width: 15%;" />
|
45 |
|
|
</td>
|
46 |
|
|
</tr>
|
47 |
|
|
<tr>
|
48 |
|
|
<td>{TEXT_RETYPE_PASSWORD}:</td>
|
49 |
|
|
<td class="value_input">
|
50 |
|
|
<input type="password" id="password2" name="password2" maxlength="30" value="" style="width: 52%;" />
|
51 |
|
|
</td>
|
52 |
|
|
</tr>
|
53 |
|
|
<tr style="{DISPLAY_EXTRA}">
|
54 |
|
|
<td> </td>
|
55 |
|
|
<td class="warning" style="text-align: left; width: 52%;">
|
56 |
|
|
{CHANGING_PASSWORD}
|
57 |
|
|
</td>
|
58 |
|
|
</tr>
|
59 |
|
|
<tr>
|
60 |
|
|
<td>{TEXT_DISPLAY_NAME}:</td>
|
61 |
|
|
<td class="value_input">
|
62 |
|
|
<input type="text" name="display_name" maxlength="255" value="{DISPLAY_NAME}" style="width: 52%;" />
|
63 |
|
|
</td>
|
64 |
|
|
</tr>
|
65 |
|
|
<tr>
|
66 |
|
|
<td>{TEXT_EMAIL}:</td>
|
67 |
|
|
<td class="value_input">
|
68 |
|
|
<input type="text" name="email" maxlength="255" value="{EMAIL}" style="width: 52%;" />
|
69 |
|
|
</td>
|
70 |
|
|
</tr>
|
71 |
|
|
<tr style="{DISPLAY_HOME_FOLDERS}">
|
72 |
|
|
<td>{TEXT_HOME_FOLDER}:</td>
|
73 |
|
|
<td class="value_input">
|
74 |
|
|
<select name="home_folder" style="width: 53%;" >
|
75 |
|
|
<option value="">{TEXT_NONE}</option>
|
76 |
|
|
<!-- BEGIN folder_list_block -->
|
77 |
|
|
<option value="{FOLDER}"{SELECTED}>{NAME}</option>
|
78 |
|
|
<!-- END folder_list_block -->
|
79 |
|
|
</select>
|
80 |
|
|
</td>
|
81 |
|
|
</tr>
|
82 |
|
|
<tr>
|
83 |
|
|
<td>{TEXT_GROUP}:</td>
|
84 |
|
|
<td class="value_input">
|
85 |
|
|
<select name="groups[]" multiple="multiple" size="5" style="width: 53%;" >
|
86 |
|
|
<!-- BEGIN group_list_block -->
|
87 |
|
|
<option value="{ID}" {SELECTED}>{NAME}</option>
|
88 |
|
|
<!-- END group_list_block -->
|
89 |
|
|
</select>
|
90 |
|
|
</td>
|
91 |
|
|
</tr>
|
92 |
|
|
<tr>
|
93 |
|
|
<td> </td>
|
94 |
|
|
<td style="text-align: left;">
|
95 |
|
|
<input type="radio" name="active[]" id="active" value="1" {ACTIVE_CHECKED} />
|
96 |
|
|
<label for="active">{TEXT_ACTIVE}</label>
|
97 |
|
|
<input type="radio" name="active[]" id="disabled" value="0" {DISABLED_CHECKED} />
|
98 |
|
|
<label for="disabled">{TEXT_DISABLED}</label>
|
99 |
|
|
</td>
|
100 |
|
|
</tr>
|
101 |
|
|
<tr>
|
102 |
|
|
<td> </td>
|
103 |
|
|
<td style="text-align: left;">
|
104 |
|
|
<input type="submit" name="submit" value="{SUBMIT_TITLE}" />
|
105 |
|
|
<input type="reset" name="reset" value="{TEXT_RESET}" />
|
106 |
|
|
<input type="button" style="width: 100px; margin-top: 5px;" onclick="javascript: window.location = 'index.php';" value="{TEXT_CANCEL}">
|
107 |
|
|
</td>
|
108 |
|
|
</tr>
|
109 |
|
|
</tbody>
|
110 |
|
|
</table>
|
111 |
|
|
</div>
|
112 |
|
|
</form>
|
113 |
|
|
<script type="text/javascript">
|
114 |
|
|
function toggle_radio(radio_on, radio_off) {
|
115 |
|
|
document.getElementById(radio_on).checked = true;
|
116 |
|
|
document.getElementById(radio_off).checked = true;
|
117 |
|
|
}
|
118 |
|
|
</script>
|
119 |
|
|
<script src="{ADMIN_URL}/users/PasswordGenerator.js"></script>
|
120 |
|
|
<script>
|
121 |
|
|
var _options = _options || window._options || { };
|
122 |
|
|
_options.length = 8;
|
123 |
|
|
_options.lowercase = true;
|
124 |
|
|
_options.uppercase = true;
|
125 |
|
|
_options.numbers = true;
|
126 |
|
|
_options.special_character = true;
|
127 |
|
|
_options.brackets = true;
|
128 |
|
|
_options.minus = true;
|
129 |
|
|
_options.underscore = true;
|
130 |
|
|
_options.space = true;
|
131 |
|
|
/*
|
132 |
|
|
passwort.set({
|
133 |
|
|
length: 50,
|
134 |
|
|
lowercase: false,
|
135 |
|
|
uppercase: false,
|
136 |
|
|
numbers: false,
|
137 |
|
|
special_character: true,
|
138 |
|
|
brackets: false,
|
139 |
|
|
minus: false,
|
140 |
|
|
underscore: false,
|
141 |
|
|
space: false
|
142 |
|
|
});
|
143 |
|
|
*/
|
144 |
|
|
|
145 |
|
|
_options.el = document.querySelector('#password');
|
146 |
|
|
_options.el2 = document.querySelector('#password2');
|
147 |
|
|
var passwort = new PasswordGenerator(_options);
|
148 |
|
|
console.info( _options.el );
|
149 |
|
|
console.info( _options.el2 );
|
150 |
|
|
console.info( passwort.get() );
|
151 |
|
|
// passwort.render();
|
152 |
|
|
//set option with onChange event
|
153 |
|
|
function onChange(e) {
|
154 |
|
|
var obj = {};
|
155 |
|
|
if(e.name == 'length') {
|
156 |
|
|
obj[e.name] = parseInt(e.value);
|
157 |
|
|
} else {
|
158 |
|
|
obj[e.name] = e.checked ? true : false;
|
159 |
|
|
}
|
160 |
|
|
passwort.set(obj);
|
161 |
|
|
passwort.render();
|
162 |
|
|
}
|
163 |
|
|
function onClick(e){
|
164 |
|
|
passwort.render();
|
165 |
|
|
return false;
|
166 |
|
|
}
|
167 |
|
|
</script>
|
168 |
|
|
|
169 |
|
|
<!-- END main_block -->
|