Customer login during checkout: Display SSO login errors inline (#5840)

Replace the JavaScript alert used for SSO popup login errors during the
checkout flow with an inline HTML error message.
This commit is contained in:
Kian Cross
2026-07-06 11:38:43 +02:00
committed by GitHub
parent 3f8ed0f722
commit ddbea7c32e
2 changed files with 5 additions and 2 deletions
@@ -40,6 +40,7 @@
</dd>
</dl>
{% else %}
<div class="alert alert-danger hidden"></div>
<p>
{% blocktrans trimmed with org=request.organizer.name %}
If you created a customer account at {{ org }} before, you can log in now and connect
+4 -2
View File
@@ -39,13 +39,15 @@ $(function () {
return
if (event.data && event.data.__process === "customer_sso_popup") {
if (event.data.status === "ok") {
$("#customer_login .alert.alert-danger").addClass("hidden");
$("#login_sso_data").val(event.data.value)
$("#login_sso_data").closest("form").get(0).submit()
} else {
alert(event.data.value) // todo
$("#customer_login .alert.alert-danger").html(event.data.value);
$("#customer_login .alert.alert-danger").removeClass("hidden");
}
event.source.postMessage({'__process': 'popup_close'}, "*")
}
console.log(event)
}, false);
})
})