Skip to content

Commit 88ca961

Browse files
authored
Text input migration progress (hestiacp#2963)
* Update some text inputs on Add/Edit User forms * Improve checkbox "checked" attribute - No quotes around the value i.e. renders as `checked=yes` - Value is unnecessary anyway * Migrate text inputs in Add/Edit Mail forms * Migrate some text input in Add Mail Account form * Migrate text inputs in Add/Edit IP Address form * More consistent table HTML * Migrate some text input in Edit Mail Account form * Migrate text inputs on List Mail DNS form * Remove important * More consistent width
1 parent e329bd2 commit 88ca961

24 files changed

+200
-277
lines changed

web/css/src/themes/default.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3908,6 +3908,10 @@ meter[value="4"]::-moz-meter-bar { background: green; }
39083908
padding-top: 6px !important;
39093909
}
39103910

3911+
.u-pt10 {
3912+
padding-top: 10px !important;
3913+
}
3914+
39113915
.u-pt18 {
39123916
padding-top: 18px !important;
39133917
}

web/css/themes/default.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/templates/pages/add_cron.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,7 @@
336336
<td class="data-dotted">
337337
<table class="data-col1">
338338
<tr>
339-
<td>
340-
</td>
339+
<td></td>
341340
</tr>
342341
</table>
343342
</td>

web/templates/pages/add_ip.html

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -42,28 +42,20 @@
4242
</tr>
4343
<tr>
4444
<td class="u-pt18">
45-
<?=_('IP address') ?>
46-
</td>
47-
</tr>
48-
<tr>
49-
<td>
50-
<input type="text" class="vst-input" name="v_ip" value="<?=htmlentities(trim($v_ip, "'"))?>">
45+
<label for="v_ip" class="form-label"><?=_('IP address') ?></label>
46+
<input type="text" class="form-control u-input-width" name="v_ip" id="v_ip" value="<?=htmlentities(trim($v_ip, "'"))?>">
5147
</td>
5248
</tr>
5349
<tr>
5450
<td class="u-pt6">
55-
<?=_('Netmask');?>
56-
</td>
57-
</tr>
58-
<tr>
59-
<td>
60-
<input type="text" class="vst-input" name="v_netmask" value="<?=htmlentities(trim($v_netmask, "'"))?>">
51+
<label for="v_netmask" class="form-label"><?=_('Netmask');?></label>
52+
<input type="text" class="form-control u-input-width" name="v_netmask" id="v_netmask" value="<?=htmlentities(trim($v_netmask, "'"))?>">
6153
</td>
6254
</tr>
6355
<tr>
6456
<td class="u-pt6">
6557
<label for="v_interface" class="form-label"><?=_('Interface');?></label>
66-
<select class="form-select" name="v_interface" id="v_interface">
58+
<select class="form-select u-input-width" name="v_interface" id="v_interface">
6759
<?php
6860
foreach ($interfaces as $key => $value) {
6961
echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
@@ -77,7 +69,7 @@
7769
<tr>
7870
<td class="u-pt6">
7971
<div class="form-check">
80-
<input class="form-check-input" type="checkbox" name="v_shared" id="v_shared" <?php if (empty($v_dedicated)) echo "checked=yes" ?> onclick="javascript:elementHideShow('usrtable');">
72+
<input class="form-check-input" type="checkbox" name="v_shared" id="v_shared" <?php if (empty($v_dedicated)) echo 'checked' ?> onclick="javascript:elementHideShow('usrtable');">
8173
<label for="v_shared">
8274
<?=_('Shared');?>
8375
</label>
@@ -100,26 +92,22 @@
10092
</tr>
10193
<tr>
10294
<td class="u-pt6">
103-
<?=_('Assigned domain');?> <span class="optional">(<?=_('optional');?>)</span>
104-
</td>
105-
</tr>
106-
<tr>
107-
<td>
108-
<input type="text" class="vst-input" name="v_name" value="<?=htmlentities(trim($v_name, "'"))?>">
95+
<label for="v_name" class="form-label">
96+
<?=_('Assigned domain');?> <span class="optional">(<?=_('optional');?>)</span>
97+
</label>
98+
<input type="text" class="form-control u-input-width" name="v_name" id="v_name" value="<?=htmlentities(trim($v_name, "'"))?>">
10999
</td>
110100
</tr>
111101
<tr>
112102
<td class="u-pt6">
113-
<?=_('NAT IP association');?> <span class="optional">(<?=_('optional');?>)</span>
114-
</td>
115-
</tr>
116-
<tr>
117-
<td>
118-
<input type="text" class="vst-input" name="v_nat" value="<?=htmlentities(trim($v_nat, "'"))?>">
103+
<label for="v_nat" class="form-label">
104+
<?=_('NAT IP association');?> <span class="optional">(<?=_('optional');?>)</span>
105+
</label>
106+
<input type="text" class="form-control u-input-width" name="v_nat" id="v_nat" value="<?=htmlentities(trim($v_nat, "'"))?>">
119107
</td>
120108
</tr>
121109
</table>
122-
<table class="data-col2"></table>
110+
<table class="data-col2 u-mb20"></table>
123111
</td>
124112
</tr>
125113
</table>

web/templates/pages/add_mail.html

Lines changed: 15 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@
6262
<tr>
6363
<td class="u-pt18">
6464
<label for="v_domain" class="form-label"><?=_('Domain');?></label>
65-
<input type="text" class="form-control" name="v_domain" id="v_domain" style="max-width: 341px" value="<?=htmlentities(trim($v_domain, "'"))?>">
65+
<input type="text" class="form-control u-input-width" name="v_domain" id="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>">
6666
</td>
6767
</tr>
6868
<?php if($_SESSION['WEBMAIL_SYSTEM']){?>
6969
<tr>
7070
<td class="u-pt18">
7171
<label for="v_webmail" class="form-label"><?=_('Webmail Client');?></label>
72-
<select class="form-select" name="v_webmail" id="v_webmail" tabindex="6" style="max-width: 360px">
72+
<select class="form-select u-input-width" name="v_webmail" id="v_webmail" tabindex="6">
7373
<?php foreach ($webmail_clients as $client){
7474
echo "\t\t\t\t<option value=\"".htmlentities($client)."\"";
7575
if (( $v_webmail == $client )) {
@@ -87,7 +87,7 @@
8787
<tr>
8888
<td class="u-pt18">
8989
<div class="form-check">
90-
<input class="form-check-input" type="checkbox" name="v_antispam" id="v_antispam" <?php if ((empty($v_antispam)) || ($v_antispam == 'yes')) echo "checked=yes"; ?>>
90+
<input class="form-check-input" type="checkbox" name="v_antispam" id="v_antispam" <?php if ((empty($v_antispam)) || ($v_antispam == 'yes')) echo 'checked'; ?>>
9191
<label for="v_antispam">
9292
<?=_('AntiSpam Support');?>
9393
</label>
@@ -97,7 +97,7 @@
9797
<tr>
9898
<td class="u-pt6">
9999
<div class="form-check">
100-
<input class="form-check-input" type="checkbox" name="v_reject" id="v_reject" <?php if ((empty($v_reject)) || ($v_reject == 'yes')) echo "checked=yes"; ?>>
100+
<input class="form-check-input" type="checkbox" name="v_reject" id="v_reject" <?php if ((empty($v_reject)) || ($v_reject == 'yes')) echo 'checked'; ?>>
101101
<label for="v_reject">
102102
<?=_('Reject spam');?>
103103
</label>
@@ -109,7 +109,7 @@
109109
<tr>
110110
<td class="u-pt6">
111111
<div class="form-check">
112-
<input class="form-check-input" type="checkbox" name="v_antivirus" id="v_antivirus" <?php if ((empty($v_antivirus)) || ($v_antivirus == 'yes')) echo "checked=yes"; ?>>
112+
<input class="form-check-input" type="checkbox" name="v_antivirus" id="v_antivirus" <?php if ((empty($v_antivirus)) || ($v_antivirus == 'yes')) echo 'checked'; ?>>
113113
<label for="v_antivirus">
114114
<?=_('AntiVirus Support');?>
115115
</label>
@@ -120,7 +120,7 @@
120120
<tr>
121121
<td class="u-pt6">
122122
<div class="form-check">
123-
<input class="form-check-input" type="checkbox" name="v_dkim" id="v_dkim" <?php if (isset($v_dkim)&&$v_dkim == 'yes') echo "checked=yes"; ?>>
123+
<input class="form-check-input" type="checkbox" name="v_dkim" id="v_dkim" <?php if (isset($v_dkim)&&$v_dkim == 'yes') echo 'checked'; ?>>
124124
<label for="v_dkim">
125125
<?=_('DKIM Support');?>
126126
</label>
@@ -130,7 +130,7 @@
130130
<tr>
131131
<td class="u-pt6">
132132
<div class="form-check">
133-
<input class="form-check-input" type="checkbox" name="v_smtp_relay" id="v_smtp_relay" <?php if ($v_smtp_relay == 'true') echo "checked=yes"; ?> onclick="javascript:elementHideShow('smtp_relay_table');">
133+
<input class="form-check-input" type="checkbox" name="v_smtp_relay" id="v_smtp_relay" <?php if ($v_smtp_relay == 'true') echo 'checked'; ?> onclick="javascript:elementHideShow('smtp_relay_table');">
134134
<label for="v_smtp_relay">
135135
<?=_('SMTP Relay');?>
136136
</label>
@@ -142,42 +142,26 @@
142142
<table style="display:<?php if ($v_smtp_relay == 'true'){echo 'block';} else {echo 'none';} ?>;" id="smtp_relay_table">
143143
<tr>
144144
<td class="u-pt6">
145-
<?=_('Host');?>
146-
</td>
147-
</tr>
148-
<tr>
149-
<td>
150-
<input type="text" class="vst-input" name="v_smtp_relay_host" value="<?=htmlentities(trim($v_smtp_relay_host, "'"))?>">
145+
<label for="v_smtp_relay_host" class="form-label"><?=_('Host');?></label>
146+
<input type="text" class="form-control u-input-width" name="v_smtp_relay_host" id="v_smtp_relay_host" value="<?=htmlentities(trim($v_smtp_relay_host, "'"))?>">
151147
</td>
152148
</tr>
153149
<tr>
154150
<td class="u-pt6">
155-
<?=_('Port');?>
156-
</td>
157-
</tr>
158-
<tr>
159-
<td>
160-
<input type="text" class="vst-input" name="v_smtp_relay_port" value="<?=htmlentities(trim($v_smtp_relay_port, "'"))?>">
151+
<label for="v_smtp_relay_port" class="form-label"><?=_('Port');?></label>
152+
<input type="text" class="form-control u-input-width" name="v_smtp_relay_port" id="v_smtp_relay_port" value="<?=htmlentities(trim($v_smtp_relay_port, "'"))?>">
161153
</td>
162154
</tr>
163155
<tr>
164156
<td class="u-pt6">
165-
<?=_('Username');?>
166-
</td>
167-
</tr>
168-
<tr>
169-
<td>
170-
<input type="text" class="vst-input" name="v_smtp_relay_user" value="<?=htmlentities(trim($v_smtp_relay_user, "'"))?>">
157+
<label for="v_smtp_relay_user" class="form-label"><?=_('Username');?></label>
158+
<input type="text" class="form-control u-input-width" name="v_smtp_relay_user" id="v_smtp_relay_user" value="<?=htmlentities(trim($v_smtp_relay_user, "'"))?>">
171159
</td>
172160
</tr>
173161
<tr>
174162
<td class="u-pt6">
175-
<?=_('Password');?>
176-
</td>
177-
</tr>
178-
<tr>
179-
<td>
180-
<input type="text" class="vst-input" name="v_smtp_relay_pass">
163+
<label for="v_smtp_relay_pass" class="form-label"><?=_('Password');?></label>
164+
<input type="text" class="form-control u-input-width" name="v_smtp_relay_pass" id="v_smtp_relay_pass">
181165
</td>
182166
</tr>
183167
</table>

web/templates/pages/add_mail_acc.html

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,8 @@
4949
</tr>
5050
<tr>
5151
<td class="u-pt6">
52-
<?=_('Account');?>
53-
</td>
54-
</tr>
55-
<tr>
56-
<td>
57-
<input type="text" class="vst-input" name="v_account" value="<?=htmlentities(trim($v_account, "'"))?>">
52+
<label for="v_account" class="form-label"><?=_('Account');?></label>
53+
<input type="text" class="form-control u-input-width" name="v_account" id="v_account" value="<?=htmlentities(trim($v_account, "'"))?>">
5854
</td>
5955
</tr>
6056
<tr>
@@ -116,7 +112,7 @@
116112
<tr>
117113
<td class="u-pt6">
118114
<div class="form-check">
119-
<input class="form-check-input" type="checkbox" name="v_blackhole" id="v_blackhole" <?php if ($v_blackhole == 'yes') echo "checked=yes" ?>>
115+
<input class="form-check-input" type="checkbox" name="v_blackhole" id="v_blackhole" <?php if ($v_blackhole == 'yes') echo 'checked' ?>>
120116
<label for="v_blackhole">
121117
<?=_('Discard all mail');?>
122118
</label>
@@ -126,7 +122,7 @@
126122
<tr <?php if ($v_blackhole == 'yes') echo 'style="display:none"'; ?> id="id_fwd_for">
127123
<td class="u-pt6">
128124
<div class="form-check">
129-
<input class="form-check-input" type="checkbox" name="v_fwd_only" id="v_fwd_for" <?php if ($v_fwd_only == 'yes') echo "checked=yes" ?>>
125+
<input class="form-check-input" type="checkbox" name="v_fwd_only" id="v_fwd_for" <?php if ($v_fwd_only == 'yes') echo 'checked' ?>>
130126
<label for="v_fwd_for">
131127
<?=_('Do not store forwarded mail');?>
132128
</label>
@@ -135,12 +131,10 @@
135131
</tr>
136132
<tr>
137133
<td class="u-pt6">
138-
<?=_('Rate limit');?> <span class="optional">(<?=_('Email / hour');?>)</span>
139-
</td>
140-
</tr>
141-
<tr>
142-
<td>
143-
<input type="text" class="vst-input" name="v_rate" value="<?=htmlentities(trim($v_rate, "'"))?>" <?php if($_SESSION['userContext'] != "admin"){ echo "disabled";}?>>
134+
<label for="v_rate" class="form-label">
135+
<?=_('Rate limit');?> <span class="optional">(<?=_('Email / hour');?>)</span>
136+
</label>
137+
<input type="text" class="form-control u-input-width" name="v_rate" id="v_rate" value="<?=htmlentities(trim($v_rate, "'"))?>" <?php if($_SESSION['userContext'] != "admin"){ echo "disabled";}?>>
144138
</td>
145139
</tr>
146140
</table>

web/templates/pages/add_user.html

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,14 @@
4242
</tr>
4343
<tr>
4444
<td class="u-pt18">
45-
<?=_('Username');?>
45+
<label for="v_username" class="form-label"><?=_('Username');?></label>
46+
<input type="text" class="form-control" name="v_username" id="v_username" value="<?=htmlentities(trim($v_username, "'"))?>" tabindex="1">
4647
</td>
4748
</tr>
4849
<tr>
49-
<td>
50-
<input type="text" class="vst-input" name="v_username" value="<?=htmlentities(trim($v_username, "'"))?>" tabindex="1">
51-
</td>
52-
</tr>
53-
<tr>
54-
<td>
55-
<?=_('Contact');?>
56-
</td>
57-
</tr>
58-
<tr>
59-
<td>
60-
<input type="text" class="vst-input" name="v_name" value="<?=htmlentities(trim($v_name, "'"))?>" tabindex="2">
50+
<td class="u-pt6">
51+
<label for="v_name" class="form-label"><?=_('Contact');?></label>
52+
<input type="text" class="form-control" name="v_name" id="v_name" value="<?=htmlentities(trim($v_name, "'"))?>" tabindex="2">
6153
</td>
6254
</tr>
6355
<tr>
@@ -90,7 +82,7 @@
9082
<tr>
9183
<td>
9284
<div class="form-check">
93-
<input class="form-check-input" type="checkbox" name="v_login_disabled" id="v_login_disabled" onclick="javascript:elementHideShow('send-welcome');" <?php if ($v_login_disabled == "yes") echo "checked=yes" ?>>
85+
<input class="form-check-input" type="checkbox" name="v_login_disabled" id="v_login_disabled" onclick="javascript:elementHideShow('send-welcome');" <?php if ($v_login_disabled == "yes") echo 'checked' ?>>
9486
<label for="v_login_disabled">
9587
<?=_('Do not allow user to log in to Control Panel');?>
9688
</label>

web/templates/pages/edit_backup_exclusions.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
<td class="data-dotted">
2525
<table class="data-col1">
2626
<tr>
27-
<td>
28-
</td>
27+
<td></td>
2928
</tr>
3029
</table>
3130
</td>

web/templates/pages/edit_cron.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,7 @@
336336
<td class="data-dotted">
337337
<table class="data-col1">
338338
<tr>
339-
<td>
340-
</td>
339+
<td></td>
341340
</tr>
342341
</table>
343342
</td>

web/templates/pages/edit_db.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
<td class="data-dotted">
2525
<table class="data-col1">
2626
<tr>
27-
<td>
28-
</td>
27+
<td></td>
2928
</tr>
3029
</table>
3130
</td>

0 commit comments

Comments
 (0)