Add admin interface
This commit is contained in:
@@ -28,6 +28,14 @@
|
||||
}
|
||||
wireCopy(document);
|
||||
|
||||
// Destructive buttons ask first. The attribute carries the question, so the
|
||||
// markup decides what is worth confirming and this stays generic.
|
||||
Array.prototype.forEach.call(document.querySelectorAll('[data-confirm]'), function (button) {
|
||||
button.addEventListener('click', function (e) {
|
||||
if (!window.confirm(button.dataset.confirm)) e.preventDefault();
|
||||
});
|
||||
});
|
||||
|
||||
var form = document.getElementById('upload');
|
||||
if (!form) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user