mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Add "Are you sure?"-dialog to dirty forms (#1506)
* Add "Are you sure?"-dialog to dirty forms * Better form detection
This commit is contained in:
committed by
Raphael Michel
parent
4e8bda0c96
commit
22eb9d3493
@@ -742,3 +742,9 @@ $(function () {
|
||||
$("#ajaxerr").on("click", ".ajaxerr-close", ajaxErrDialog.hide);
|
||||
moment.locale($("body").attr("data-datetimelocale"));
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
$('form[method=post]').filter(function () {
|
||||
return $(this).find("button:not([type=button]), input[type=submit]").length > 0;
|
||||
}).areYouSure( {'message': gettext('You have unsaved changes!')});
|
||||
});
|
||||
Reference in New Issue
Block a user