Removed ids on forms, switched to class selectors and scoped all jquery selects to their own template #360
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm trying to use this module for some off-label purposes (using the templates inside bootstrap modal, as well as the auth route pages) . As part of that, I needed to clean up some stuff so that more than one instance of the sign in form can exist in the DOM at a time (e.g. a hidden version which could be shown as a bootstrap modal).
Here's the changes that I've made. Hopefully it's not too controversial and you can accept my PR:
Forms are referenced by ID (#signIn etc). Since we shouldn't assume anything about the enclosing project's layouts and other html, and since IDs must be unique, it's better to reference by class rather than just occupy a rather generic named id. So I removed the IDs and switched the selectors to classes instead.
There are some instances where template events are getting the value of an input using a very general selector and with global scope, e.g.
So if any other exists in the layout for example, there will be problems. This would be much better scoped to the template, like so:
Hope this makes sense.