Skip to content

Commit 9bac1d6

Browse files
authored
Simplify inline alerts code (hestiacp#3719)
* Simplify inline alerts code * Tidy * Apply some Prettier formatting to list pages * Prevent wrapping in Disk and Bandwidth cells * Fix .badge text alignment in some cases * Improve List Users email output
1 parent 4eaf092 commit 9bac1d6

File tree

20 files changed

+73
-76
lines changed

20 files changed

+73
-76
lines changed

web/add/db/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,12 @@
201201
htmlentities($user_plain) . "_" . htmlentities($_POST["v_database"]),
202202
),
203203
"</a>",
204-
'<a class="u-text-bold" href="/edit/db/?database=' .
204+
'<a href="/edit/db/?database=' .
205205
htmlentities($user_plain) .
206206
"_" .
207207
htmlentities($_POST["v_database"]) .
208208
'">',
209-
'<a class="u-text-bold" href="' . $db_admin_link . '" target="_blank">',
209+
'<a href="' . $db_admin_link . '" target="_blank">',
210210
);
211211
unset($v_database);
212212
unset($v_dbuser);

web/add/dns/index.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,7 @@
200200
htmlentities($_POST["v_domain"]),
201201
),
202202
"</a>",
203-
'<a class="u-text-bold" href="/edit/dns/?domain=' .
204-
htmlentities($_POST["v_domain"]) .
205-
'">',
203+
'<a href="/edit/dns/?domain=' . htmlentities($_POST["v_domain"]) . '">',
206204
);
207205

208206
unset($v_domain);
@@ -283,8 +281,8 @@
283281
htmlentities($_POST["v_rec"]),
284282
htmlentities($_POST["v_domain"]),
285283
),
286-
"</span>",
287-
"<span class='u-text-bold'>",
284+
"</code>",
285+
"<code>",
288286
);
289287
unset($v_domain);
290288
unset($v_rec);

web/add/ip/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
htmlentities($_POST["v_ip"]),
9595
),
9696
"</a>",
97-
'<a class="u-text-bold" href="/edit/ip/?ip=' . htmlentities($_POST["v_ip"]) . '">',
97+
'<a href="/edit/ip/?ip=' . htmlentities($_POST["v_ip"]) . '">',
9898
);
9999
unset($v_ip);
100100
unset($v_netmask);

web/add/mail/index.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,7 @@
190190
htmlentities($_POST["v_domain"]),
191191
),
192192
"</a>",
193-
'<a class="u-text-bold" href="/list/mail/?domain=' .
194-
htmlentities($_POST["v_domain"]) .
195-
'">',
193+
'<a href="/list/mail/?domain=' . htmlentities($_POST["v_domain"]) . '">',
196194
);
197195
unset($v_domain, $v_webmail);
198196
}
@@ -512,7 +510,7 @@
512510
htmlentities($_POST["v_domain"]),
513511
),
514512
"</a>",
515-
'<a class="u-text-bold" href="/edit/mail/?account=' .
513+
'<a href="/edit/mail/?account=' .
516514
htmlentities(strtolower($_POST["v_account"])) .
517515
"&domain=" .
518516
htmlentities($_POST["v_domain"]) .

web/add/package/index.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,7 @@
203203
htmlentities($_POST["v_package"]),
204204
),
205205
"</a>",
206-
'<a class="u-text-bold" href="/edit/package/?package=' .
207-
htmlentities($_POST["v_package"]) .
208-
'">',
206+
'<a href="/edit/package/?package=' . htmlentities($_POST["v_package"]) . '">',
209207
);
210208
unset($v_package);
211209
}

web/add/user/index.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,8 @@
229229
htmlentities($_POST["v_username"]),
230230
),
231231
"</a>",
232-
'<a class="u-text-bold" href="/edit/user/?user=' .
233-
htmlentities($_POST["v_username"]) .
234-
'">',
235-
'<a class="u-text-bold" href="/login/?loginas=' .
232+
'<a href="/edit/user/?user=' . htmlentities($_POST["v_username"]) . '">',
233+
'<a href="/login/?loginas=' .
236234
htmlentities($_POST["v_username"]) .
237235
"&token=" .
238236
htmlentities($_SESSION["token"]) .

web/add/web/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
$_SESSION["ok_msg"] = htmlify_trans(
128128
sprintf(_("Domain {%s} has been created successfully."), htmlentities($v_domain)),
129129
"</a>",
130-
'<a class="u-text-bold" href="/edit/web/?domain=' . htmlentities($v_domain) . '">',
130+
'<a href="/edit/web/?domain=' . htmlentities($v_domain) . '">',
131131
);
132132
unset($v_domain);
133133
unset($v_aliases);

web/css/src/themes/default.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2122,6 +2122,7 @@
21222122
color: #6c6c6c;
21232123
padding-left: 4px;
21242124
padding-right: 4px;
2125+
text-align: center;
21252126
text-shadow: 0 1px #fafafa;
21262127
border: 1px solid #b8b8b8;
21272128
background-color: #eaeaea;

web/css/src/utilities.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@
139139
min-height: 600px !important;
140140
}
141141

142+
.u-max-width250 {
143+
max-width: 250px !important;
144+
}
145+
142146
.u-max-width300 {
143147
max-width: 300px !important;
144148
}

web/templates/pages/list_access_keys.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
<div class="units-table-row animate__animated animate__fadeIn js-unit"
7474
data-sort-key="<?= strtolower($key) ?>"
7575
data-sort-comment="<?= strtolower($key_comment) ?>"
76-
data-sort-date="<?= strtotime($data[$key]['DATE'] .' '. $data[$key]['TIME'] ) ?>">
76+
data-sort-date="<?= strtotime($data[$key]["DATE"] . " " . $data[$key]["TIME"]) ?>">
7777
<div class="units-table-cell">
7878
<div>
7979
<input id="check<?= $i ?>" class="js-unit-checkbox" type="checkbox" title="<?= _("Select") ?>" name="key[]" value="<?= $key ?>">

0 commit comments

Comments
 (0)