From e46196c14354c4aa555025413b182cb39d83b839 Mon Sep 17 00:00:00 2001 From: Terranom674 Date: Tue, 18 Aug 2026 22:18:34 +0200 Subject: [PATCH] Keep NC wizard open across validation errors and form posts --- template/admin_tabs.tpl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/template/admin_tabs.tpl b/template/admin_tabs.tpl index 75eb83a..2ced7aa 100644 --- a/template/admin_tabs.tpl +++ b/template/admin_tabs.tpl @@ -80,6 +80,14 @@ if(dialog){ dialog.addEventListener('cancel',function(event){event.preventDefault();event.stopImmediatePropagation();closeAfterReset();},true); dialog.addEventListener('click',function(event){if(event.target===dialog){event.preventDefault();event.stopImmediatePropagation();closeAfterReset();}},true); + + // Every wizard POST explicitly preserves the open state before the + // browser leaves the page. Validation errors therefore return to the + // same wizard step instead of closing/resetting the dialog. + [].slice.call(dialog.querySelectorAll('form[data-bratonien-wizard-form]')).forEach(function(form){ + form.addEventListener('submit',function(){setOpen(true);},true); + }); + try{if(sessionStorage.getItem(storageKey)==='1')showWizard();}catch(e){} } }