Skip to content

Commit 88598de

Browse files
authored
Remove more tables from forms (hestiacp#2989)
1 parent 53b7979 commit 88598de

36 files changed

+764
-1100
lines changed

web/css/src/themes/dark.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,6 @@ a.button.cancel {
10301030
.mail-infoblock {
10311031
color: #fff;
10321032
border: 1px solid #606060;
1033-
margin-top: 87px;
10341033
box-shadow: 0 1px 4px rgb(0 0 0 / 35%);
10351034
background-color: #454545;
10361035
}

web/css/src/themes/default.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2772,7 +2772,7 @@ a.button.cancel {
27722772
color: #777;
27732773
border: 1px solid #d9d9d9;
27742774
padding: 6px 6px 6px 18px;
2775-
margin-top: 97px;
2775+
margin-right: 70px;
27762776
min-width: 320px;
27772777
overflow: hidden;
27782778
box-shadow: 0 1px 4px rgb(0 0 0 / 15%);
@@ -2788,6 +2788,7 @@ a.button.cancel {
27882788
font-size: 0.75rem;
27892789
height: 20px;
27902790
font-weight: normal;
2791+
padding-bottom: 4px;
27912792
}
27922793

27932794
.mail-infoblock td:first-child {

web/css/src/themes/vestia.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,6 @@ a.vst-advanced:focus {
731731

732732
.mail-infoblock {
733733
border-radius: 0 !important;
734-
margin-top: 92px !important;
735734
box-shadow: none !important;
736735
}
737736

web/css/themes/dark.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/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/css/themes/vestia.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.
Lines changed: 38 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,49 @@
11
<!-- Begin toolbar -->
22
<div class="l-center edit">
3-
<div class="l-sort clearfix">
4-
<div class="l-unit-toolbar__buttonstrip">
5-
<a class="ui-button cancel" dir="ltr" id="btn-back" href="/list/access-key/">
6-
<i class="fas fa-arrow-left status-icon blue"></i><?= _('Back'); ?>
7-
</a>
8-
</div>
9-
<div class="l-unit-toolbar__buttonstrip float-right">
10-
<a href="#" class="ui-button" data-action="submit" data-id="vstobjects">
11-
<i class="fas fa-save status-icon purple"></i><?= _('Save'); ?>
12-
</a>
13-
</div>
14-
</div>
3+
<div class="l-sort clearfix">
4+
<div class="l-unit-toolbar__buttonstrip">
5+
<a class="ui-button cancel" dir="ltr" id="btn-back" href="/list/access-key/">
6+
<i class="fas fa-arrow-left status-icon blue"></i><?= _('Back'); ?>
7+
</a>
8+
</div>
9+
<div class="l-unit-toolbar__buttonstrip float-right">
10+
<a href="#" class="ui-button" data-action="submit" data-id="vstobjects">
11+
<i class="fas fa-save status-icon purple"></i><?= _('Save'); ?>
12+
</a>
13+
</div>
14+
</div>
1515
</div>
1616
<!-- End toolbar -->
1717

1818
<div class="l-separator"></div>
1919

2020
<div class="l-center animated fadeIn">
21-
<form id="vstobjects" name="v_add_access_key" method="post">
22-
<input type="hidden" name="token" value="<?= $_SESSION['token'] ?>">
23-
<input type="hidden" name="ok" value="Add">
21+
<form id="vstobjects" name="v_add_access_key" method="post">
22+
<input type="hidden" name="token" value="<?= $_SESSION['token'] ?>">
23+
<input type="hidden" name="ok" value="Add">
2424

25-
<table class="data">
26-
<tr class="data-add">
27-
<td class="data-dotted">
28-
<table class="data-col1">
29-
<tr>
30-
<td></td>
31-
</tr>
32-
</table>
33-
</td>
34-
<td class="data-dotted">
35-
<table class="data-col2">
36-
<tr>
37-
<td class="u-pt18">
38-
<span class="page-title"><?= _('Adding Access Key'); ?></span>
39-
</td>
40-
</tr>
41-
<tr>
42-
<td>
43-
<?php show_error_panel($_SESSION); ?>
44-
</td>
45-
</tr>
25+
<div class="app-form">
26+
<h1 class="page-title"><?= _('Adding Access Key'); ?></h1>
27+
<?php show_error_panel($_SESSION);?>
28+
<div class="u-input-width">
29+
<p class="u-mb10"><?= _('Permissions'); ?></p>
30+
<?php foreach ($apis as $api_name => $api_data) { ?>
31+
<div class="form-check">
32+
<input class="form-check-input" type="checkbox" value="<?= $api_name ?>" name="v_apis[]" id="v_apis_<?= $api_name ?>" tabindex="5">
33+
<label for="v_apis_<?= $api_name ?>">
34+
<?= _($api_name); ?>
35+
</label>
36+
</div>
37+
<?php } ?>
38+
<div class="u-mt15">
39+
<label for="v_comment" class="form-label">
40+
<?= _('Comment'); ?> <span class="optional">(<?= _('optional'); ?>)</span>
41+
</label>
42+
<input type="text" class="form-control" name="v_comment" id="v_comment" maxlength="255">
43+
</div>
44+
</div>
45+
</div>
46+
47+
</form>
4648

47-
<tr>
48-
<td class="u-pt6">
49-
<?= _('Permissions'); ?>
50-
</td>
51-
</tr>
52-
<tr>
53-
<td class="u-pt6">
54-
<?php foreach ($apis as $api_name => $api_data) { ?>
55-
<div class="form-check">
56-
<input class="form-check-input" type="checkbox" value="<?= $api_name ?>" name="v_apis[]" id="v_apis_<?= $api_name ?>" tabindex="5">
57-
<label for="v_apis_<?= $api_name ?>">
58-
<?= _($api_name); ?>
59-
</label>
60-
</div>
61-
<?php } ?>
62-
</td>
63-
</tr>
64-
<tr>
65-
<td class="u-pt18">
66-
<label for="v_comment" class="form-label">
67-
<?= _('Comment'); ?> <span class="optional">(<?= _('optional'); ?>)</span>
68-
</label>
69-
<input type="text" class="form-control u-input-width" name="v_comment" id="v_comment" maxlength="255">
70-
</td>
71-
</tr>
72-
</table>
73-
<table class="data-col2 u-mb20"></table>
74-
</td>
75-
</tr>
76-
</table>
77-
</form>
7849
</div>

web/templates/pages/add_db.html

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,15 @@ <h1 class="page-title"><?=_('Adding database');?></h1>
2424
<?php show_error_panel($_SESSION);?>
2525
<div class="u-input-width">
2626
<?php if (($user_plain == 'admin') && (($_GET['accept'] !== "true"))) {?>
27-
<div class="u-mb10">
28-
<div class="alert alert-danger alert-with-icon" role="alert">
29-
<i class="fas fa-exclamation"></i>
30-
<p><?=_('Avoid adding web domains on admin account');?></p>
31-
</div>
27+
<div class="alert alert-danger alert-with-icon" role="alert">
28+
<i class="fas fa-exclamation"></i>
29+
<p><?=_('Avoid adding web domains on admin account');?></p>
3230
</div>
3331
<?php } ?>
3432
<?php if (($user_plain == 'admin') && (empty($_GET['accept']))) {?>
35-
<div class="u-mb10">
33+
<div class="u-side-by-side u-pt18">
3634
<div><a href="/add/user/" class="vst-advanced admin-warning-button"><?=_('Add User');?></a></div>
37-
<div><a href="/add/db/?accept=true" class="vst-advanced button danger admin-warning-button"><?=_('Continue');?></a></div>
35+
<div style="margin-left: 3px;"><a href="/add/db/?accept=true" class="vst-advanced button danger admin-warning-button"><?=_('Continue');?></a></div>
3836
</div>
3937
<?php } ?>
4038
<?php if (($user_plain == 'admin') && (($_GET['accept'] === "true")) || ($user_plain !== "admin")) {?>
Lines changed: 77 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -1,122 +1,91 @@
11
<!-- Begin toolbar -->
22
<div class="l-center edit">
3-
<div class="l-sort clearfix">
4-
<div class="l-unit-toolbar__buttonstrip">
5-
<a class="ui-button cancel" dir="ltr" id="btn-back" href="/list/dns/?domain=<?=htmlentities(trim($v_domain, "'"))?>&token=<?=$_SESSION['token']?>"><i class="fas fa-arrow-left status-icon blue"></i><?=_('Back');?></a>
6-
</div>
7-
<div class="l-unit-toolbar__buttonstrip float-right">
8-
<a href="#" class="ui-button" data-action="submit" data-id="vstobjects"><i class="fas fa-save status-icon purple"></i><?=_('Save');?></a>
9-
</div>
10-
</div>
3+
<div class="l-sort clearfix">
4+
<div class="l-unit-toolbar__buttonstrip">
5+
<a class="ui-button cancel" dir="ltr" id="btn-back" href="/list/dns/?domain=<?=htmlentities(trim($v_domain, "'"))?>&token=<?=$_SESSION['token']?>"><i class="fas fa-arrow-left status-icon blue"></i><?=_('Back');?></a>
6+
</div>
7+
<div class="l-unit-toolbar__buttonstrip float-right">
8+
<a href="#" class="ui-button" data-action="submit" data-id="vstobjects"><i class="fas fa-save status-icon purple"></i><?=_('Save');?></a>
9+
</div>
10+
</div>
1111
</div>
1212
<!-- End toolbar -->
1313

1414
<div class="l-separator"></div>
1515

1616
<div class="l-center animated fadeIn">
1717

18-
<form id="vstobjects" name="v_add_dns_rec" method="post">
19-
<input type="hidden" name="token" value="<?=$_SESSION['token']?>">
20-
<input type="hidden" name="ok_rec" value="add">
18+
<form id="vstobjects" name="v_add_dns_rec" method="post">
19+
<input type="hidden" name="token" value="<?=$_SESSION['token']?>">
20+
<input type="hidden" name="ok_rec" value="add">
21+
22+
<div class="app-form">
23+
<h1 class="page-title"><?=_('Adding DNS Record');?></h1>
24+
<?php show_error_panel($_SESSION);?>
25+
<div class="u-input-width">
26+
<div class="u-mb10">
27+
<label for="v_domain" class="form-label"><?=_('Domain');?></label>
28+
<input type="text" class="form-control" name="v_domain" id="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>" disabled>
29+
<input type="hidden" name="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>">
30+
</div>
31+
<div class="u-mb10">
32+
<label for="v_rec" class="form-label"><?=_('Record');?></label>
33+
<input type="text" class="form-control" name="v_rec" id="v_rec" value="<?=htmlentities(trim($v_rec, "'"))?>">
34+
<small class="hint"></small>
35+
</div>
36+
<div class="u-mb10">
37+
<label for="v_type" class="form-label"><?=_('Type');?></label>
38+
<select class="form-select" name="v_type" id="v_type">
39+
<option value="A" <?php if ($v_type == 'A') echo "selected"; ?>>A</option>
40+
<option value="AAAA" <?php if ($v_type == 'AAAA') echo "selected"; ?>>AAAA</option>
41+
<option value="CAA" <?php if ($v_type == 'CAA') echo "selected"; ?>>CAA</option>
42+
<option value="CNAME" <?php if ($v_type == 'CNAME') echo "selected"; ?>>CNAME</option>
43+
<option value="DNSKEY" <?php if ($v_type == 'DNSKEY') echo "selected"; ?>>DNSKEY</option>
44+
<option value="IPSECKEY" <?php if ($v_type == 'IPSECKEY') echo "selected"; ?>>IPSECKEY</option>
45+
<option value="KEY" <?php if ($v_type == 'KEY') echo "selected"; ?>>KEY</option>
46+
<option value="MX" <?php if ($v_type == 'MX') echo "selected"; ?>>MX</option>
47+
<option value="NS" <?php if ($v_type == 'NS') echo "selected"; ?>>NS</option>
48+
<option value="PTR" <?php if ($v_type == 'PTR') echo "selected"; ?>>PTR</option>
49+
<option value="SPF" <?php if ($v_type == 'SPF') echo "selected"; ?>>SPF</option>
50+
<option value="SRV" <?php if ($v_type == 'SRV') echo "selected"; ?>>SRV</option>
51+
<option value="TLSA" <?php if ($v_type == 'TLSA') echo "selected"; ?>>TLSA</option>
52+
<option value="TXT" <?php if ($v_type == 'TXT') echo "selected"; ?>>TXT</option>
53+
</select>
54+
</div>
55+
<div class="u-mb10">
56+
<label for="v_val" class="form-label"><?=_('IP or Value');?></label>
57+
<div class="u-pos-relative">
58+
<select class="form-select" tabindex="-1" onchange="this.nextElementSibling.value=this.value">
59+
<option value="">&nbsp;</option>
60+
<?php
61+
foreach ($v_ips as $ip => $value) {
62+
$display_ip = empty($value['NAT']) ? $ip : "{$value['NAT']}";
63+
echo "<option value='{$display_ip}'>" . htmlentities($display_ip) . "</option>\n";
64+
}
65+
?>
66+
</select>
67+
<input type="text" class="form-control list-editor" name="v_val" id="v_val" value="<?=htmlentities(trim($v_val, "'"))?>">
68+
</div>
69+
</div>
70+
<div class="u-mb10">
71+
<label for="v_priority" class="form-label">
72+
<?=_('Priority');?> <span class="optional">(<?=_('optional');?>)</span>
73+
</label>
74+
<input type="text" class="form-control" name="v_priority" id="v_priority" value="<?=htmlentities(trim($v_priority, "'"))?>">
75+
</div>
76+
<div class="u-mb10">
77+
<label for="v_ttl" class="form-label">
78+
<?=_('TTL');?> <span class="optional">(<?=_('optional');?>)</span>
79+
</label>
80+
<input type="text" class="form-control" name="v_ttl" id="v_ttl" value="<?=htmlentities(trim($v_ttl, "'"))?>">
81+
</div>
82+
</div>
83+
</div>
84+
85+
</form>
2186

22-
<table class="data">
23-
<tr class="data-add">
24-
<td class="data-dotted">
25-
<table class="data-col1">
26-
<tr>
27-
<td></td>
28-
</tr>
29-
</table>
30-
</td>
31-
<td class="data-dotted">
32-
<table class="data-col2" width="600px">
33-
<tr>
34-
<td class="u-pt18">
35-
<span class="page-title"><?=_('Adding DNS Record');?></span>
36-
</td>
37-
</tr>
38-
<tr>
39-
<td>
40-
<?php show_error_panel($_SESSION);?>
41-
</td>
42-
</tr>
43-
<tr>
44-
<td class="u-pt18">
45-
<label for="v_domain" class="form-label"><?=_('Domain');?></label>
46-
<input type="text" class="form-control u-input-width" name="v_domain" id="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>" disabled>
47-
<input type="hidden" name="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>">
48-
</td>
49-
</tr>
50-
<tr>
51-
<td class="u-pt6">
52-
<label for="v_rec" class="form-label"><?=_('Record');?></label>
53-
<input type="text" class="form-control u-input-width" name="v_rec" id="v_rec" value="<?=htmlentities(trim($v_rec, "'"))?>">
54-
<small class="hint"></small>
55-
</td>
56-
</tr>
57-
<tr>
58-
<td class="u-pt6">
59-
<label for="v_type" class="form-label"><?=_('Type');?></label>
60-
<select class="form-select u-input-width" name="v_type" id="v_type">
61-
<option value="A" <?php if ($v_type == 'A') echo "selected"; ?>>A</option>
62-
<option value="AAAA" <?php if ($v_type == 'AAAA') echo "selected"; ?>>AAAA</option>
63-
<option value="CAA" <?php if ($v_type == 'CAA') echo "selected"; ?>>CAA</option>
64-
<option value="CNAME" <?php if ($v_type == 'CNAME') echo "selected"; ?>>CNAME</option>
65-
<option value="DNSKEY" <?php if ($v_type == 'DNSKEY') echo "selected"; ?>>DNSKEY</option>
66-
<option value="IPSECKEY" <?php if ($v_type == 'IPSECKEY') echo "selected"; ?>>IPSECKEY</option>
67-
<option value="KEY" <?php if ($v_type == 'KEY') echo "selected"; ?>>KEY</option>
68-
<option value="MX" <?php if ($v_type == 'MX') echo "selected"; ?>>MX</option>
69-
<option value="NS" <?php if ($v_type == 'NS') echo "selected"; ?>>NS</option>
70-
<option value="PTR" <?php if ($v_type == 'PTR') echo "selected"; ?>>PTR</option>
71-
<option value="SPF" <?php if ($v_type == 'SPF') echo "selected"; ?>>SPF</option>
72-
<option value="SRV" <?php if ($v_type == 'SRV') echo "selected"; ?>>SRV</option>
73-
<option value="TLSA" <?php if ($v_type == 'TLSA') echo "selected"; ?>>TLSA</option>
74-
<option value="TXT" <?php if ($v_type == 'TXT') echo "selected"; ?>>TXT</option>
75-
</select>
76-
</td>
77-
</tr>
78-
<tr>
79-
<td class="u-pt6">
80-
<label for="v_val" class="form-label"><?=_('IP or Value');?></label>
81-
<div class="u-pos-relative u-input-width">
82-
<select class="form-select" tabindex="-1" onchange="this.nextElementSibling.value=this.value">
83-
<option value="">&nbsp;</option>
84-
<?php
85-
foreach ($v_ips as $ip => $value) {
86-
$display_ip = empty($value['NAT']) ? $ip : "{$value['NAT']}";
87-
echo "<option value='{$display_ip}'>" . htmlentities($display_ip) . "</option>\n";
88-
}
89-
?>
90-
</select>
91-
<input type="text" class="form-control list-editor" name="v_val" id="v_val" value="<?=htmlentities(trim($v_val, "'"))?>">
92-
</div>
93-
</td>
94-
</tr>
95-
<tr>
96-
<td class="u-pt6">
97-
<label for="v_priority" class="form-label">
98-
<?=_('Priority');?> <span class="optional">(<?=_('optional');?>)</span>
99-
</label>
100-
<input type="text" class="form-control u-input-width" name="v_priority" id="v_priority" value="<?=htmlentities(trim($v_priority, "'"))?>">
101-
</td>
102-
</tr>
103-
<tr>
104-
<td class="u-pt6">
105-
<label for="v_ttl" class="form-label">
106-
<?=_('TTL');?> <span class="optional">(<?=_('optional');?>)</span>
107-
</label>
108-
<input type="text" class="form-control u-input-width" name="v_ttl" id="v_ttl" value="<?=htmlentities(trim($v_ttl, "'"))?>">
109-
</td>
110-
</tr>
111-
</table>
112-
<table class="data-col2 u-mb20">
113-
</table>
114-
</td>
115-
</tr>
116-
</table>
117-
</form>
11887
</div>
11988

12089
<script>
121-
GLOBAL.DNS_REC_PREFIX = "<?=htmlentities($_GET['domain']); ?>";
90+
GLOBAL.DNS_REC_PREFIX = "<?=htmlentities($_GET['domain']); ?>";
12291
</script>

0 commit comments

Comments
 (0)