forked from hestiacp/hestiacp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedit_user.html
More file actions
220 lines (212 loc) · 12.3 KB
/
edit_user.html
File metadata and controls
220 lines (212 loc) · 12.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<div class="l-center edit">
<div class="l-sort clearfix">
<div class="l-unit-toolbar__buttonstrip">
<a class="ui-button cancel" id="btn-back" href="/list/user/"><i class="fas fa-arrow-left status-icon blue"></i> <?=_('Back')?></a>
<a href="/list/key/" id="btn-create" class="ui-button cancel" title="<?=_('Manage SSH keys');?>"><i class="fas fa-key status-icon orange"></i><?=_('Manage SSH keys')?></a>
<a href="/list/log/" id="btn-create" class="ui-button cancel" title="<?=_('Logs');?>"><i class="fas fa-history status-icon maroon"></i><?=_('Logs')?></a>
</div>
<div class="l-unit-toolbar__buttonstrip float-right">
<a href="#" class="ui-button" data-action="submit" data-id="vstobjects"><i class="fas fa-save status-icon purple"></i> <?=_('Save')?></a>
</div>
</div>
</div>
<div class="l-separator"></div>
<div class="l-center animated fadeIn">
<?php
$back = $_SESSION['back'];
if (empty($back)) {
$back = "location.href='/list/user/'";
} else {
$back = "location.href='".$back."'";
}
?>
<form id="vstobjects" method="post" name="v_edit_user" class="<?=$v_status?>">
<input type="hidden" name="token" value="<?=$_SESSION['token']?>" />
<input type="hidden" name="save" value="save" />
<table class='data'>
<tr class="data-add">
<td class="data-dotted">
<table class="data-col1">
<tr>
<td>
</td>
</tr>
</table>
</td>
<td class="data-dotted">
<table class="data-col2">
<tr>
<td class="step-top">
<span class="page-title"><?=_('Editing User')?></span>
</td>
</tr>
<tr>
<td>
<?php
if (!empty($_SESSION['error_msg'])) {
echo "<span class=\"vst-error\"> <i class=\"fas fa-exclamation-circle status-icon red\"></i> ".htmlentities($_SESSION['error_msg'])."</span>";
} else {
if (!empty($_SESSION['ok_msg'])) {
echo "<span class=\"vst-ok\"> <i class=\"fas fa-check-circle status-icon green\"></i> ".$_SESSION['ok_msg']."</span>";
}
}
?>
</td>
</tr>
<tr>
<td class="vst-text step-top">
<?php print _('Username');?>
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" name="v_user" value="<?=htmlentities(trim($v_username, "'"))?>" disabled>
<input type="hidden" name="v_username" value="<?=htmlentities(trim($v_username, "'"))?>">
</td>
</tr>
<tr>
<td class="vst-text input-label">
<?php print _('Password');?> / <a href="javascript:randomString();" class="generate"><?php print _('generate');?></a>
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input password" name="v_password" value="<?=htmlentities(trim($v_password, "'"))?>"><br />
<meter max="4" id="meter"></meter>
</td>
</tr>
<tr>
<td class="vst-text">
<?php print _('Your password must have at least');?>
<ul>
<li><?php print _('8 characters long');?></li>
<li><?php print _('1 uppercase & 1 lowercase character');?></li>
<li><?php print _('1 number');?></li>
</ul>
</td>
</tr>
<tr>
<td>
<label><input type="checkbox" class="vst-checkbox password-option" name="v_twofa" <?php if(!empty($v_twofa)) echo "checked=yes" ?>><?php print _('Enable 2FA');?></label>
<?php if (!empty($v_twofa)) { ?>
<p><?php echo _('2FA Reset Code:').' '.$v_twofa; ?></br></p>
<p><?php echo _('Please scan the code below in your 2FA application:'); ?></p>
<div><img class="qr-code" src="<?php echo $v_qrcode; ?>"></div>
<?php } ?>
</td>
</tr>
<tr>
<td class="vst-text input-label">
<?php print _('Contact');?>
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" name="v_name" value="<?=htmlentities(trim($v_name, "'"))?>">
</td>
</tr>
<tr>
<td class="vst-text input-label">
<?php print _('Email');?>
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" name="v_email" value="<?=htmlentities(trim($v_email, "'"))?>">
</td>
</tr>
<tr>
<td class="vst-text input-label">
<?php print _('Language');?>
</td>
</tr>
<tr>
<td>
<select class="vst-list" name="v_language">
<?php
foreach ($languages as $key => $value) {
echo "\n\t\t\t\t\t\t\t\t\t<option value=\"".$key."\"";
if ( $key == $v_language ){
echo 'selected' ;
}
if (( $key == detect_user_language() ) && (empty($v_language))){
echo 'selected' ;
}
echo ">".htmlentities($value)."</option>\n";
}
?>
</select>
</td>
</tr>
<tr>
<td class="vst-text input-label">
<?php print _('Default Name Servers');?>
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" name="v_ns1" value="<?=htmlentities(trim($v_ns1, "'"))?>">
<span class="remove-ns additional-control delete"><?=_('delete')?></span>
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" name="v_ns2" value="<?=htmlentities(trim($v_ns2, "'"))?>">
<span class="remove-ns additional-control delete"><?=_('delete')?></span>
</td>
</tr>
<? if($v_ns3)
echo '<tr>
<td>
<input type="text" size="20" class="vst-input" name="v_ns3" value="'.htmlentities(trim($v_ns3, "'")).'">
<span class="remove-ns additional-control delete">'._('delete').'</span>
</td>
</tr>';
if($v_ns4)
echo '<tr>
<td>
<input type="text" size="20" class="vst-input" name="v_ns4" value="'.htmlentities(trim($v_ns4, "'")).'">
<span class="remove-ns additional-control delete">'._('delete').'</span>
</td>
</tr>';
if($v_ns5)
echo '<tr>
<td>
<input type="text" size="20" class="vst-input" name="v_ns5" value="'.htmlentities(trim($v_ns5, "'")).'">
<span class="remove-ns additional-control delete">'._('delete').'</span>
</td>
</tr>';
if($v_ns6)
echo '<tr>
<td>
<input type="text" size="20" class="vst-input" name="v_ns6" value="'.htmlentities(trim($v_ns6, "'")).'">
<span class="remove-ns additional-control delete">'._('delete').'</span>
</td>
</tr>';
if($v_ns7)
echo '<tr>
<td>
<input type="text" size="20" class="vst-input" name="v_ns7" value="'.htmlentities(trim($v_ns7, "'")).'">
<span class="remove-ns additional-control delete">'._('delete').'</span>
</td>
</tr>';
if($v_ns8)
echo '<tr>
<td>
<input type="text" size="20" class="vst-input" name="v_ns8" value="'.htmlentities(trim($v_ns8, "'")).'">
<span class="remove-ns additional-control delete">'._('delete').'</span>
</td>
</tr>';
?>
<tr class="add-ns" <? if($v_ns8) echo 'style="display:none;"'; ?> >
<td class="step-top-small">
<span class="add-ns-button additional-control add"><?=_('Add one more Name Server')?></span>
</td>
</tr>
</table>
<table class="data-col2"></table>
</td>
</tr>
</table>
</form>
</div>