Fix OTC submit feedback

This commit is contained in:
2026-06-16 18:01:17 +02:00
parent e8f4b2ac6a
commit 179287566d
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -811,6 +811,7 @@ function render_auth_home_page(array $user, array $otcProducts = [], array $best
echo " if (errorEl) {";
echo " errorEl.textContent = errorMsg;";
echo " errorEl.classList.toggle('hidden', errorMsg === '');";
echo " if (errorMsg !== '') { errorEl.scrollIntoView({ block: 'center', behavior: 'smooth' }); }";
echo " }";
echo " submitBtn.disabled = !isValid;";
echo " submitBtn.setAttribute('aria-disabled', String(!isValid));";
@@ -897,16 +898,19 @@ function render_auth_home_page(array $user, array $otcProducts = [], array $best
echo " if (successEl) {";
echo " successEl.textContent = result.externalRef ? 'Bestellung erfolgreich erfasst! Bestellnummer: ' + result.externalRef : successDefaultText;";
echo " successEl.classList.remove('hidden');";
echo " successEl.scrollIntoView({ block: 'center', behavior: 'smooth' });";
echo " }";
echo " resetForm(true);";
echo " } else if (errorEl) {";
echo " errorEl.textContent = result.error || 'Unbekannter Fehler';";
echo " errorEl.classList.remove('hidden');";
echo " errorEl.scrollIntoView({ block: 'center', behavior: 'smooth' });";
echo " }";
echo " } catch (error) {";
echo " if (errorEl) {";
echo " errorEl.textContent = 'Netzwerkfehler: ' + error.message;";
echo " errorEl.classList.remove('hidden');";
echo " errorEl.scrollIntoView({ block: 'center', behavior: 'smooth' });";
echo " }";
echo " } finally {";
echo " submitBtn.innerHTML = originalBtnText;";