Fix OTC submit feedback
This commit is contained in:
@@ -166,7 +166,7 @@ try {
|
|||||||
|
|
||||||
$pdo->commit();
|
$pdo->commit();
|
||||||
|
|
||||||
$excelTrigger = dispatch_order_import_webhooks($pdo, $env);
|
$excelTrigger = trigger_excel_webhook($externalRef, $env);
|
||||||
|
|
||||||
json_response(201, [
|
json_response(201, [
|
||||||
'ok' => true,
|
'ok' => true,
|
||||||
|
|||||||
@@ -811,6 +811,7 @@ function render_auth_home_page(array $user, array $otcProducts = [], array $best
|
|||||||
echo " if (errorEl) {";
|
echo " if (errorEl) {";
|
||||||
echo " errorEl.textContent = errorMsg;";
|
echo " errorEl.textContent = errorMsg;";
|
||||||
echo " errorEl.classList.toggle('hidden', errorMsg === '');";
|
echo " errorEl.classList.toggle('hidden', errorMsg === '');";
|
||||||
|
echo " if (errorMsg !== '') { errorEl.scrollIntoView({ block: 'center', behavior: 'smooth' }); }";
|
||||||
echo " }";
|
echo " }";
|
||||||
echo " submitBtn.disabled = !isValid;";
|
echo " submitBtn.disabled = !isValid;";
|
||||||
echo " submitBtn.setAttribute('aria-disabled', String(!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 " if (successEl) {";
|
||||||
echo " successEl.textContent = result.externalRef ? 'Bestellung erfolgreich erfasst! Bestellnummer: ' + result.externalRef : successDefaultText;";
|
echo " successEl.textContent = result.externalRef ? 'Bestellung erfolgreich erfasst! Bestellnummer: ' + result.externalRef : successDefaultText;";
|
||||||
echo " successEl.classList.remove('hidden');";
|
echo " successEl.classList.remove('hidden');";
|
||||||
|
echo " successEl.scrollIntoView({ block: 'center', behavior: 'smooth' });";
|
||||||
echo " }";
|
echo " }";
|
||||||
echo " resetForm(true);";
|
echo " resetForm(true);";
|
||||||
echo " } else if (errorEl) {";
|
echo " } else if (errorEl) {";
|
||||||
echo " errorEl.textContent = result.error || 'Unbekannter Fehler';";
|
echo " errorEl.textContent = result.error || 'Unbekannter Fehler';";
|
||||||
echo " errorEl.classList.remove('hidden');";
|
echo " errorEl.classList.remove('hidden');";
|
||||||
|
echo " errorEl.scrollIntoView({ block: 'center', behavior: 'smooth' });";
|
||||||
echo " }";
|
echo " }";
|
||||||
echo " } catch (error) {";
|
echo " } catch (error) {";
|
||||||
echo " if (errorEl) {";
|
echo " if (errorEl) {";
|
||||||
echo " errorEl.textContent = 'Netzwerkfehler: ' + error.message;";
|
echo " errorEl.textContent = 'Netzwerkfehler: ' + error.message;";
|
||||||
echo " errorEl.classList.remove('hidden');";
|
echo " errorEl.classList.remove('hidden');";
|
||||||
|
echo " errorEl.scrollIntoView({ block: 'center', behavior: 'smooth' });";
|
||||||
echo " }";
|
echo " }";
|
||||||
echo " } finally {";
|
echo " } finally {";
|
||||||
echo " submitBtn.innerHTML = originalBtnText;";
|
echo " submitBtn.innerHTML = originalBtnText;";
|
||||||
|
|||||||
Reference in New Issue
Block a user