Skip to content

Commit 6c010a7

Browse files
authored
Remove more tables from forms (hestiacp#2991)
1 parent 7752304 commit 6c010a7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1041
-1498
lines changed

web/css/src/themes/default.css

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2862,7 +2862,7 @@ a.button.cancel {
28622862
.page-title {
28632863
font-size: 1.4rem !important;
28642864
font-weight: 500 !important;
2865-
padding-bottom: 10px !important;
2865+
padding-bottom: 20px !important;
28662866
letter-spacing: -0.01em;
28672867
}
28682868

@@ -3830,6 +3830,10 @@ li[aria-expanded="true"] a {
38303830
clear: both;
38313831
}
38323832

3833+
.u-block {
3834+
display: block !important;
3835+
}
3836+
38333837
.u-hidden {
38343838
display: none !important;
38353839
}
@@ -3902,6 +3906,10 @@ li[aria-expanded="true"] a {
39023906
width: 380px !important;
39033907
}
39043908

3909+
.u-wide-input-width {
3910+
width: 600px !important;
3911+
}
3912+
39053913
.u-min-height100 {
39063914
min-height: 100px !important;
39073915
}

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/inc/main.php

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -217,24 +217,19 @@ function verify_csrf($method, $return = false)
217217
}
218218
}
219219

220-
function show_error_panel($data)
221-
{
222-
$msg_id = '';
223-
$msg_icon = '';
224-
$msg_text = '';
225-
if (!empty($data['error_msg'])) {
226-
$msg_icon = 'fa-exclamation-circle status-icon red';
227-
$msg_text = htmlentities($data['error_msg']);
228-
$msg_id = 'vst-error';
229-
} else {
230-
if (!empty($data['ok_msg'])) {
220+
function show_alert_message($data) {
221+
if (!empty($data['error_msg']) || !empty($data['ok_msg'])) {
222+
if (!empty($data['error_msg'])) {
223+
$msg_icon = 'fa-exclamation-circle status-icon red';
224+
$msg_text = htmlentities($data['error_msg']);
225+
$msg_id = 'vst-error';
226+
} else {
231227
$msg_icon = 'fa-check-circle status-icon green';
232228
$msg_text = $data['ok_msg'];
233229
$msg_id = 'vst-ok';
234230
}
235-
} ?>
236-
<span class="<?=$msg_id; ?>"> <i class="fas <?=$msg_icon; ?>"></i> <?=$msg_text; ?></span>
237-
<?php
231+
echo '<p class="'.$msg_id.' u-mb20"><i class="fas '.$msg_icon.'"></i> '.$msg_text.'</p>';
232+
}
238233
}
239234

240235
function top_panel($user, $TAB)

web/js/pages/edit_dns_rec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ App.Actions.DB.update_dns_record_hint = function(elm, hint) {
1212
hint = '';
1313
}
1414

15-
// dont show pregix if domain name = rec value
15+
// dont show prefix if domain name = rec value
1616
if (hint == GLOBAL.DNS_REC_PREFIX + '.') {
1717
hint = '';
1818
}

web/templates/pages/add_access_key.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
<div class="app-form">
2626
<h1 class="page-title"><?= _('Adding Access Key'); ?></h1>
27-
<?php show_error_panel($_SESSION);?>
27+
<?php show_alert_message($_SESSION);?>
2828
<div class="u-input-width">
2929
<p class="u-mb10"><?= _('Permissions'); ?></p>
3030
<?php foreach ($apis as $api_name => $api_data) { ?>

web/templates/pages/add_cron.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@
349349
</tr>
350350
<tr>
351351
<td>
352-
<?php show_error_panel($_SESSION);?>
352+
<?php show_alert_message($_SESSION);?>
353353
</td>
354354
</tr>
355355
<tr>

web/templates/pages/add_db.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
<div class="app-form">
2323
<h1 class="page-title"><?=_('Adding database');?></h1>
24-
<?php show_error_panel($_SESSION);?>
24+
<?php show_alert_message($_SESSION);?>
2525
<div class="u-input-width">
2626
<?php if (($user_plain == 'admin') && (($_GET['accept'] !== "true"))) {?>
2727
<div class="alert alert-danger alert-with-icon" role="alert">
@@ -86,11 +86,11 @@ <h1 class="page-title"><?=_('Adding database');?></h1>
8686
</label>
8787
<input type="email" class="form-control" name="v_db_email" id="v_db_email" value="<?=htmlentities(trim($v_db_email, "'"))?>">
8888
</div>
89-
<div class="u-mb10">
89+
<div class="u-mb20">
9090
<a href="javascript:elementHideShow('advanced-opts');" class="vst-advanced"><?=_('Advanced options');?></a>
9191
</div>
9292
<div id="advanced-opts" style="display: none;">
93-
<div class="u-mt15 u-mb10">
93+
<div class="u-mb10">
9494
<label for="v_host" class="form-label"><?=_('Host');?></label>
9595
<select class="form-select u-mb20" name="v_host" id="v_host">
9696
<?php

web/templates/pages/add_dns.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
</tr>
3838
<tr>
3939
<td>
40-
<?php show_error_panel($_SESSION);?>
40+
<?php show_alert_message($_SESSION);?>
4141
</td>
4242
</tr>
4343
<?php if (($user_plain == 'admin') && (($_GET['accept'] !== "true"))) {?>
@@ -110,7 +110,7 @@
110110
</tr>
111111
<tr>
112112
<td class="u-pt18">
113-
<table style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="advtable">
113+
<table id="advtable" style="display:<?php if (empty($v_adv)) echo 'none';?> ;">
114114
<tr>
115115
<td class="u-pt6">
116116
<div class="form-check">

web/templates/pages/add_dns_rec.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
<div class="app-form">
2323
<h1 class="page-title"><?=_('Adding DNS Record');?></h1>
24-
<?php show_error_panel($_SESSION);?>
24+
<?php show_alert_message($_SESSION);?>
2525
<div class="u-input-width">
2626
<div class="u-mb10">
2727
<label for="v_domain" class="form-label"><?=_('Domain');?></label>

web/templates/pages/add_firewall.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
<div class="app-form">
2323
<h1 class="page-title"><?=_('Adding Firewall Rule');?></h1>
24-
<?php show_error_panel($_SESSION);?>
24+
<?php show_alert_message($_SESSION);?>
2525
<div class="u-input-width">
2626
<div class="u-mb10">
2727
<label for="v_action" class="form-label"><?=_('Action') ?></label>
@@ -69,8 +69,8 @@ <h1 class="page-title"><?=_('Adding Firewall Rule');?></h1>
6969
</div>
7070

7171
<script>
72-
var iplists = JSON.parse('<?=$ipset_lists_json?>');
73-
iplists.sort(function (a, b) {
72+
var ipLists = JSON.parse('<?=$ipset_lists_json?>');
73+
ipLists.sort(function (a, b) {
7474
return a.name > b.name;
7575
});
7676

@@ -82,7 +82,7 @@ <h1 class="page-title"><?=_('Adding Firewall Rule');?></h1>
8282
newEl.disabled = true;
8383
targetElement.appendChild(newEl);
8484

85-
iplists.forEach(iplist => {
85+
ipLists.forEach(iplist => {
8686
var newEl = document.createElement("option");
8787
newEl.text = iplist.name;
8888
newEl.value = "ipset:" + iplist.name;

0 commit comments

Comments
 (0)