update
This commit is contained in:
parent
06a8a01a50
commit
ba867487fd
|
|
@ -500,9 +500,13 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||||
<input type="hidden" name="action" id="action">
|
<input type="hidden" name="action" id="action">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
<form method="post" id="bulkForm">
|
||||||
|
<input type="hidden" name="action" id="bulkAction">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th>No</th>
|
<th>
|
||||||
|
<input type="checkbox" onclick="toggleAll(this)">No
|
||||||
|
</th>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
<th>Service Name</th>
|
<th>Service Name</th>
|
||||||
<th>Input</th>
|
<th>Input</th>
|
||||||
|
|
@ -520,7 +524,12 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||||
<?php foreach ($data as $row): ?>
|
<?php foreach ($data as $row): ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?= $i++ ?></td>
|
<td><?= $i++ ?></td>
|
||||||
<td><?= $row["id"] ?></td>
|
<td>
|
||||||
|
<input type="checkbox"
|
||||||
|
class="rowCheckbox"
|
||||||
|
name="ids[]"
|
||||||
|
value="<?= $row['id'] ?>">
|
||||||
|
</td>
|
||||||
<td><?= $row["service_name"] ?></td>
|
<td><?= $row["service_name"] ?></td>
|
||||||
<td><?= $row["input_udp"] ?></td>
|
<td><?= $row["input_udp"] ?></td>
|
||||||
<td><?= $row["output_udp"] ?></td>
|
<td><?= $row["output_udp"] ?></td>
|
||||||
|
|
@ -540,7 +549,7 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</table>
|
</table>
|
||||||
|
</form>
|
||||||
<!-- POPUP -->
|
<!-- POPUP -->
|
||||||
<div id="overlay"></div>
|
<div id="overlay"></div>
|
||||||
<div id="popup">
|
<div id="popup">
|
||||||
|
|
@ -601,6 +610,27 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
function toggleAll(master) {
|
||||||
|
document.querySelectorAll('.rowCheckbox')
|
||||||
|
.forEach(cb => cb.checked = master.checked);
|
||||||
|
}
|
||||||
|
|
||||||
|
function submitBulk(action) {
|
||||||
|
const checked = document.querySelectorAll('.rowCheckbox:checked');
|
||||||
|
|
||||||
|
if (checked.length === 0) {
|
||||||
|
alert('No services selected');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!confirm('Are you sure?')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
document.getElementById('bulkAction').value = action;
|
||||||
|
document.getElementById('bulkForm').submit();
|
||||||
|
}
|
||||||
|
|
||||||
function openAddPopup() {
|
function openAddPopup() {
|
||||||
document.getElementById("popup_title").innerText = "Add Service";
|
document.getElementById("popup_title").innerText = "Add Service";
|
||||||
document.getElementById("saveBtn").setAttribute("onclick", "saveService()");
|
document.getElementById("saveBtn").setAttribute("onclick", "saveService()");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue