web/admin: migrate application form to web
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
		@ -54,11 +54,18 @@ export class ModalButton extends LitElement {
 | 
			
		||||
        super();
 | 
			
		||||
        window.addEventListener("keyup", (e) => {
 | 
			
		||||
            if (e.code === "Escape") {
 | 
			
		||||
                this.resetForms();
 | 
			
		||||
                this.open = false;
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    resetForms(): void {
 | 
			
		||||
        this.querySelectorAll<HTMLFormElement>("[slot=form]").forEach(form => {
 | 
			
		||||
            form.reset();
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    updateHandlers(): void {
 | 
			
		||||
        // Ensure links close the modal
 | 
			
		||||
        this.shadowRoot?.querySelectorAll<HTMLAnchorElement>("a").forEach((a) => {
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user