-
Notifications
You must be signed in to change notification settings - Fork 641
Use fully qualified, unique values for FORs, IDs, and NAMEs. #463
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
Conversation
…R, change it to use a fully qualified value. For IDs and FORs, join the key components with a '-', and for NAMEs, join key components with a '.'. Previously, only the last component of the form.key was used to build these values (in most cases); the problem with that is when you have multiple leaves in your model with the same name for the final component. In these cases, if you click on the label for any of these fields, focus is given to the first one instead of the current one as was probably intended. Also, IDs are intended to be unique within the page DOM.
small typo fixes
Hi @gwbarrett, just so you know we haven't missed this PR, it's sort of the same as #496 and as soon as the new builder is up and running we'll make a solution based on both your PR's. We wan't short version for |
Also update error messages when model changes even if error state hasn't changed. Also introduces two global options Default values: pristine : {error: true, success: true}, // Should errors and success be visible regardless of $pristine? validateOnRender: false // Should form fields be validated on form render?
And also some convinience methods on the builder.
..now they are back
Fix MK syntax
# Conflicts: # dist/bootstrap-decorator.js # dist/bootstrap-decorator.min.js # src/directives/decorators/bootstrap/select.html
This reverts commit 173edd4.
…of removing it from the array.
[WD-235] $emit setCapco when an array item is deleted.
… to hide the tab rather than the content.
… delete a document in an array. Also removed Travis references.
…em actually has CAPCO somewhere.
@gwbarrett I'm planning on sorting out this issue for the next update, but it will have to target the bootstrap decorator. I have made a webpack-babel branch in that repo and will attempt to get your changes in there soon. |
The behaviour has been completely overhauled in the latest development branch code, the keys now have the full path hyphenated, so I will close this PR now. The only thing not covered is that if a form field is added multiple times the id's will be the same still. I am working on releasing the bootstrap update soon. |
Anyplace where there is a DOM field ID or NAME, or a label element FOR attribute, change it to use a fully qualified value. For IDs and FORs, join the key components with a '-', and for NAMEs, join key components with a '.'.
Previously, only the last component of the form.key was used to build these values (in most cases); the problem with that is when you have multiple leaves in your model with the same name for the final component. In these cases, if you click on the label for any of these fields, focus is given to the first one instead of the current one as was probably intended.
Also, IDs are intended to be unique within the page DOM.