Skip to content

Commit 351b6a6

Browse files
authored
Fix bulk edit not working and add loader (hestiacp#3310)
* Fix bulk edit not working and add loader * Fix package bulk editing
1 parent 1eb8083 commit 351b6a6

20 files changed

+24
-23
lines changed

web/js/init.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
document.addEventListener('DOMContentLoaded', () => {
2-
// Refactored
3-
document.querySelector('#vstobjects')?.addEventListener('submit', () => {
2+
function showLoader() {
43
document.querySelector('.fullscreen-loader').classList.add('show');
5-
});
4+
}
5+
document.querySelector('#vstobjects')?.addEventListener('submit', showLoader);
6+
document.querySelector('[x-bind="BulkEdit"]')?.addEventListener('submit', showLoader);
67

78
document.querySelectorAll('.toolbar-right .sort-by')?.forEach((el) => {
89
el.addEventListener('click', () => $('.context-menu.sort-order').toggle());

web/templates/pages/list_access_keys.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<li entity="sort-key"><span class="name"><?= _("Access Key") ?> <i class="fas fa-arrow-down-a-z"></i></span><span class="up"><i class="fas fa-arrow-up-a-z"></i></span></li>
1616
<li entity="sort-comment"><span class="name"><?= _("Comment") ?> <i class="fas fa-arrow-down-a-z"></i></span><span class="up"><i class="fas fa-arrow-up-a-z"></i></span></li>
1717
</ul>
18-
<form x-bind="BulkEdit" action="/bulk/access-key/" method="post">
18+
<form x-data x-bind="BulkEdit" action="/bulk/access-key/" method="post">
1919
<input type="hidden" name="token" value="<?=$_SESSION['token']?>">
2020
<select class="form-select" name="action">
2121
<option value=""><?= _("apply to selected") ?></option>

web/templates/pages/list_backup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</div>
1010
<div class="toolbar-right">
1111
<?php if ($read_only !== "true") { ?>
12-
<form x-bind="BulkEdit" action="/bulk/backup/" method="post">
12+
<form x-data x-bind="BulkEdit" action="/bulk/backup/" method="post">
1313
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
1414
<select class="form-select" name="action">
1515
<option value=""><?= _("apply to selected") ?></option>

web/templates/pages/list_backup_detail.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<a href="/schedule/restore/?token=<?= $_SESSION["token"] ?>&backup=<?= htmlentities($_GET["backup"]) ?>" class="button button-secondary"><i class="fas fa-arrow-rotate-left icon-green"></i><?= _("Restore All") ?></a>
77
</div>
88
<div class="toolbar-right">
9-
<form x-bind="BulkEdit" action="/bulk/restore/" method="post">
9+
<form x-data x-bind="BulkEdit" action="/bulk/restore/" method="post">
1010
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
1111
<input type="hidden" name="backup" value="<?= htmlentities($_GET["backup"]) ?>">
1212
<select class="form-select" name="action">

web/templates/pages/list_cron.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<li entity="sort-date" sort_as_int="1"><span class="name <?php if ($_SESSION['userSortOrder'] === 'date') { echo 'active'; } ?>"><?= _("Date") ?> <i class="fas fa-arrow-down-a-z"></i></span><span class="up"><i class="fas fa-arrow-up-a-z"></i></span></li>
2626
</ul>
2727
<?php if ($read_only !== 'true') {?>
28-
<form x-bind="BulkEdit" action="/bulk/cron/" method="post">
28+
<form x-data x-bind="BulkEdit" action="/bulk/cron/" method="post">
2929
<input type="hidden" name="token" value="<?=$_SESSION['token']?>">
3030
<select class="form-select" name="action">
3131
<option value=""><?= _("apply to selected") ?></option>

web/templates/pages/list_db.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<li entity="sort-user"><span class="name"><?= _("Username") ?> <i class="fas fa-arrow-down-a-z"></i></span><span class="up"><i class="fas fa-arrow-up-a-z"></i></span></li>
5555
</ul>
5656
<?php if ($read_only !== 'true') {?>
57-
<form x-bind="BulkEdit" action="/bulk/db/" method="post">
57+
<form x-data x-bind="BulkEdit" action="/bulk/db/" method="post">
5858
<input type="hidden" name="token" value="<?=$_SESSION['token']?>">
5959
<select class="form-select" name="action">
6060
<option value=""><?= _("apply to selected") ?></option>

web/templates/pages/list_dns.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<li entity="sort-records"><span class="name"><?= _("Records") ?> <i class="fas fa-arrow-down-a-z"></i></span><span class="up"><i class="fas fa-arrow-up-a-z"></i></span></li>
2424
</ul>
2525
<?php if ($read_only !== 'true') {?>
26-
<form x-bind="BulkEdit" action="/bulk/dns/" method="post">
26+
<form x-data x-bind="BulkEdit" action="/bulk/dns/" method="post">
2727
<input type="hidden" name="token" value="<?=$_SESSION['token']?>">
2828
<select class="form-select" name="action">
2929
<option value=""><?= _("apply to selected") ?></option>

web/templates/pages/list_dns_public.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<li entity="sort-records"><span class="name"><?= _("Records") ?> <i class="fas fa-arrow-down-a-z"></i></span><span class="up"><i class="fas fa-arrow-up-a-z"></i></span></li>
2626
</ul>
2727
<?php if ($read_only !== 'true') {?>
28-
<form x-bind="BulkEdit" action="/bulk/dns/" method="post">
28+
<form x-data x-bind="BulkEdit" action="/bulk/dns/" method="post">
2929
<input type="hidden" name="token" value="<?=$_SESSION['token']?>" />
3030
<select class="form-select" name="action">
3131
<option value=""><?= _("apply to selected") ?></option>

web/templates/pages/list_dns_rec.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<li entity="sort-type"><span class="name"><?= _("Type") ?> <i class="fas fa-arrow-down-a-z"></i></span><span class="up"><i class="fas fa-arrow-up-a-z"></i></span></li>
2626
</ul>
2727
<?php if ($read_only !== 'true') {?>
28-
<form x-bind="BulkEdit" action="/bulk/dns/" method="post">
28+
<form x-data x-bind="BulkEdit" action="/bulk/dns/" method="post">
2929
<input type="hidden" name="domain" value="<?=htmlentities($_GET['domain'])?>">
3030
<input type="hidden" name="token" value="<?=$_SESSION['token']?>">
3131
<select class="form-select" name="action">

web/templates/pages/list_firewall.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<li entity="sort-ip" sort_as_int="1"><span class="name"><?= _("IP address") ?> <i class="fas fa-arrow-down-a-z"></i></span><span class="up"><i class="fas fa-arrow-up-a-z"></i></span></li>
2222
<li entity="sort-comment"><span class="name"><?= _("Comment") ?> <i class="fas fa-arrow-down-a-z"></i></span><span class="up"><i class="fas fa-arrow-up-a-z"></i></span></li>
2323
</ul>
24-
<form x-bind="BulkEdit" action="/bulk/firewall/" method="post">
24+
<form x-data x-bind="BulkEdit" action="/bulk/firewall/" method="post">
2525
<input type="hidden" name="token" value="<?= $_SESSION["token"] ?>">
2626
<select class="form-select" name="action">
2727
<option value=""><?= _("apply to selected") ?></option>

0 commit comments

Comments
 (0)