Skip to content
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

Use form and button elements for Feature settings forms, remove jQuery dependency from related JavaScript #2496

Closed
JakePT opened this issue Dec 7, 2021 · 1 comment · Fixed by #2503
Assignees
Milestone

Comments

@JakePT
Copy link
Contributor

JakePT commented Dec 7, 2021

Is your enhancement related to a problem? Please describe.
The current feature settings boxes are input fields with certain classes and data-field-name attributes, as well as an anchor element which is used to submit the form. When this link is click JS gathers the field data using the field classes and sends it to an AJAX endpoint.

This arrangement made the changes required for #2491 more difficult than verbose than it needed to be, and it has side effects like not being able to press Enter to submit the form.

Describe the solution you'd like
Wrap the feature settings fields in a form element, replace the anchor with a proper submit button, and optimise the JavaScript to handle form data. This would be an opportunity to rewrite dashboard.js without jQuery, and remove a bunch of unnecessary markup from the settings fields.

@JakePT JakePT changed the title Use form and button elements for Feature settings forms Use form and button elements for Feature settings forms, remove jQuery dependency from related JavaScript Dec 7, 2021
@JakePT JakePT self-assigned this Dec 7, 2021
@felipeelia felipeelia added this to the 4.0.0 (beta 2) milestone Dec 7, 2021
@jeffpaul jeffpaul linked a pull request Dec 16, 2021 that will close this issue
6 tasks
@felipeelia
Copy link
Member

Closed by #2503

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants