Fix broken action buttons and add delete confirmation modal
- shares.js, users.js: JSON.stringify() inside onclick="..." attributes produced unescaped " chars that broke HTML attribute parsing — all dynamic onclick JSON now passed through esc() so the browser decodes " back to " before executing the handler - Replace browser confirm() dialogs with a styled Bootstrap modal (#deleteModal) for share and user deletion — reusable across all tabs - users.js: rename shadow variable 'confirm' → 'pwConfirm' to avoid shadowing the now-removed confirm() call - main.js: auto-refresh now reloads shares and users every 30 s, not just the dashboard Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
67dacd4044
commit
74737568b0
4 files changed
+92
-45
No files matched your search
@@ -65,6 +65,25 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Delete confirm modal -->
|
||||
<div class="modal fade" id="deleteModal" tabindex="-1">
|
||||
<div class="modal-dialog modal-sm">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header border-0 pb-0">
|
||||
<h5 class="modal-title" style="color:var(--red)">Delete</h5>
|
||||
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body pt-2">
|
||||
<p id="deleteModalMsg" class="mb-0" style="color:var(--muted)"></p>
|
||||
</div>
|
||||
<div class="modal-footer border-0 pt-0">
|
||||
<button type="button" class="btn btn-secondary btn-sm" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="button" class="btn btn-danger btn-sm" id="deleteModalConfirm">Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Header -->
|
||||
<div class="topbar d-flex justify-content-between align-items-center">
|
||||
<span class="fw-semibold fs-5">MicroNAS</span>
|
||||
|
||||
Reference in new issue
Block a user