06/04 Update Dashboard, no note requirement when marking website checked
This commit is contained in:
@@ -175,29 +175,6 @@
|
||||
|
||||
</div><!-- /site-list -->
|
||||
|
||||
<!-- ── Mark Checked Modal ───────────────────────────────────── -->
|
||||
<div class="modal-overlay" id="modal-check">
|
||||
<div class="modal">
|
||||
<div class="modal-header">
|
||||
<span class="modal-title" id="check-modal-title">Mark Checked</span>
|
||||
<button class="modal-close" onclick="closeModal('modal-check')">✕</button>
|
||||
</div>
|
||||
<form method="post" id="check-form">
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label>Note (optional)</label>
|
||||
<textarea name="user_note" id="check-note" rows="3"
|
||||
placeholder="Any observations or notes…"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" onclick="closeModal('modal-check')">Cancel</button>
|
||||
<button type="submit" class="btn btn-success">✔ Confirm Checked</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ── Note Modal ──────────────────────────────────────────── -->
|
||||
<div class="modal-overlay" id="modal-note">
|
||||
<div class="modal">
|
||||
@@ -305,10 +282,11 @@ document.getElementById('site-list').addEventListener('click', function(e) {
|
||||
|
||||
/* Mark Checked */
|
||||
if (btn.classList.contains('js-check')) {
|
||||
document.getElementById('check-modal-title').textContent = 'Mark Checked — ' + btn.dataset.name;
|
||||
document.getElementById('check-form').action = '/dashboard/check/' + btn.dataset.id;
|
||||
document.getElementById('check-note').value = '';
|
||||
openModal('modal-check');
|
||||
fetch('/dashboard/check/' + btn.dataset.id, {
|
||||
method: 'POST', credentials: 'same-origin',
|
||||
headers: {'Content-Type': 'application/x-www-form-urlencoded', 'X-CSRFToken': getCsrfToken()},
|
||||
body: 'user_note='
|
||||
}).then(function() { location.reload(); });
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user