-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
280 areyousure #366
base: main
Are you sure you want to change the base?
280 areyousure #366
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome to the project :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@garinm90 Nice! Using the plugin is was very simple! Only thing on my mind now is internationalization. How do we get an e.g. german translation into the alert?
@@ -9,6 +9,7 @@ function handleForms(elem) { | |||
}).on("formAdded", "div", function (event) { | |||
handleForms($(event.target)); | |||
}); | |||
$('form').trigger('reinitialize.areYouSure'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved this line up here, as this function is used for all dynamically added inputs and it now also fully works in the shift edit view when changing the signup method (which was done using a select and some view-specific JS).
After doing some digging looks like Django offers a solution for this. I'll look into adding this so future JavaScript modules will also have access to these translations! |
By the way, we are already using jsi18n... |
Are you sure?-Prompts #280
Add are you sure jQuery plugin.
Load this plugin on form pages. Add classes to inputs that dynamically create new forms to be monitored.