-
Notifications
You must be signed in to change notification settings - Fork 3
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
Move the real submit buttons to inside the dialogs #63
Conversation
wagtail_newsletter/templates/wagtail_newsletter/panels/newsletter_panel.html
Outdated
Show resolved
Hide resolved
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.
Happy with the overall changes here! The subtitle dialog can be simplified by passing the message string to the {% dialog %}
tag directly.
Glad to see that the dialog-root-selector
helps with reducing the Stimulus targets.
wagtail_newsletter/templates/wagtail_newsletter/panels/newsletter_panel.html
Outdated
Show resolved
Hide resolved
wagtail_newsletter/static/wagtail_newsletter/js/wagtail_newsletter.js
Outdated
Show resolved
Hide resolved
wagtail_newsletter/templates/wagtail_newsletter/panels/newsletter_panel.html
Outdated
Show resolved
Hide resolved
wagtail_newsletter/templates/wagtail_newsletter/panels/newsletter_panel.html
Outdated
Show resolved
Hide resolved
wagtail_newsletter/static/wagtail_newsletter/js/wagtail_newsletter.js
Outdated
Show resolved
Hide resolved
wagtail_newsletter/templates/wagtail_newsletter/panels/newsletter_panel.html
Outdated
Show resolved
Hide resolved
@laymonage thank you for the naming and phrasing suggestions. My brain was fried after too much messing with events, CSS, templates and whatnot 😅 |
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.
Happy with the changes here! Would be nice to completely prevent the "send test email" submission if the email field is left empty, but I couldn't find a way to trigger the browser's "required" popup from my brief research. One small typo but I think you can fix that as you merge.
wagtail_newsletter/static/wagtail_newsletter/js/wagtail_newsletter.js
Outdated
Show resolved
Hide resolved
wagtail_newsletter/static/wagtail_newsletter/js/wagtail_newsletter.js
Outdated
Show resolved
Hide resolved
That used to work, when the dialog had its own form, that only contained the email input. I'm not sure what's going on with Wagtail's page edit form. |
Yeah it's because Wagtail's editor form has the |
<form>
element, the newsletter buttons are no longer triggered when pressing<enter>
in a field - fixes Submitting the page with <enter> activates the wrong button #58.