forked from CGM_Public/pretix_original
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:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user