-
Notifications
You must be signed in to change notification settings - Fork 1
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
CompatForm: Insert duplicate submit button when more than one is present #104
Conversation
e51b859
to
8e44197
Compare
What about overriding I'd like to just use the trait and be done with it. Calling a special method, in this case, is too tedious for me 😉 |
if I would use the Trait in |
I see. I forgot that this is only relevant if there are multiple submit buttons and then the set submit button isn't reliable. (even if available) |
50044d5
to
bb88818
Compare
c5a5b4f
to
e540ffb
Compare
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.
Please also add a another test case to CompatFormTest
which verifies that an explicit call to setSubmitButton()
duplicates said submit button, and not the first registered one.
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.
LGTM!
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.
Please squash your commits to the following:
- One for the trait + less file
- One for the composer.json
- One for the CompatFormTest
- One for the DuplicateSubmitButttonTest + TestCase
c73fa30
to
7cfc922
Compare
7cfc922
to
7dc5d98
Compare
969655b
to
43a6800
Compare
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.
PR title and description have to be adjusted as well.
PrefixSubmitButton
Trait0ad95ab
to
857b6bf
Compare
e6393f3
to
7b624ba
Compare
7b624ba
to
c508a5d
Compare
c508a5d
to
811318c
Compare
Creates a new
SubmitElement
from the primary submit button of the form with cloned Attributes from the givenFormSubmitElement
. The new submit button is always at the top of the form.The element has a fixed
primary-submit-btn-duplicate
class, which hides to button, but not the functionality when submitting the form.