mirror of
https://github.com/pretix/pretix.git
synced 2026-05-16 17:03:58 +00:00
Make button read the confirmation message
This commit is contained in:
@@ -513,10 +513,12 @@
|
||||
</form>
|
||||
<dialog role="alertdialog" id="cart-extend-feedback-dialog" aria-labelledby="cart-extend-feedback">
|
||||
<form method="dialog">
|
||||
<span id="cart-extend-feedback" class="text-muted"></span>
|
||||
<button class="btn btn-default" autofocus value="OK">
|
||||
{% icon "check" %} {% trans "OK" %}
|
||||
</button>
|
||||
<p>
|
||||
<span id="cart-extend-feedback" class="text-muted sr-only"></span>
|
||||
<button class="btn btn-default" autofocus value="OK">
|
||||
{% icon "check" %} {% trans "Reservation renewed" %}
|
||||
</button>
|
||||
</p>
|
||||
</form>
|
||||
</dialog>
|
||||
{% else %}
|
||||
|
||||
@@ -106,20 +106,11 @@ var cart = {
|
||||
$("#cart-deadline").attr("data-expires"),
|
||||
$("#cart-deadline").attr("data-max-expiry-extend")
|
||||
);
|
||||
$("#cart-extend-feedback-dialog").on("close", function () {
|
||||
if (this.returnValue) { // OK-Button has been pressed, nothing else has received focus
|
||||
var cart_panel_heading = $(this).closest(".panel").find(".panel-heading").get(0);
|
||||
if (cart_panel_heading) {
|
||||
window.setTimeout(function () {
|
||||
cart_panel_heading.focus();
|
||||
}, 50);
|
||||
}
|
||||
}
|
||||
$("#cart-extend-feedback-dialog").on("keydown", function (e) {
|
||||
// prevent enter or space-bar from bubbling up and closing the cart-panel
|
||||
e.stopPropagation();
|
||||
}).find("button").on("blur", function() {
|
||||
var dialog = this.closest("dialog");
|
||||
if (dialog.open) {
|
||||
dialog.close();
|
||||
}
|
||||
this.closest("dialog").close();
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user