fix
This commit is contained in:
14
assets/app.js
Normal file
14
assets/app.js
Normal file
@@ -0,0 +1,14 @@
|
||||
// Kleine UX-Helferlein – keine externen Abhängigkeiten nötig.
|
||||
(function(){
|
||||
// Confirm bei Ausbuchen-Buttons (nur mit .danger)
|
||||
document.addEventListener('click', function(e){
|
||||
const btn = e.target.closest('button.btn.danger');
|
||||
if(!btn) return;
|
||||
const form = btn.closest('form');
|
||||
if(!form) return;
|
||||
if(!confirm('Einheit wirklich ausbuchen?')){
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}
|
||||
});
|
||||
})();
|
||||
Reference in New Issue
Block a user