User tests: Successful: Unsuccessful:
...eated
Fixes an issue with fields that have been created dynamically. Prior to this fix, it runs validation even on disabled fields.
In my case this caused trouble with twitter's typeahead.js autocomplete. Though the "tt-hint" input field was disabled, it would be validated, which caused the submit button having to be pressed twice in order to submit the form.
By looking at your solution I saw one more flaw. Currently we are not initializing elem basic properties which are added dynamically. So like you modified the validateForm function for disabled attribute. If you get some time please do some initializing like we are doing in validateField function.
Labels |
Added:
?
?
|
Was this what you meant?
Also, by what standards do you compress the JS?
@frankmayer I had to ask myself and it looks like there is no standard yet for this. YUI compressor and jscompress.com were mentioned as tools.
I think you can use whatever tool you like the most.
@Bakual Thanks, I'll use default setting then. BTW, where would one look for coding- and other standards for Joomla?
Waiting for confirmation from @Achal-Aggarwal on the proposed change, then I'll do a final commit including the compressed JS.
@frankmayer Coding Standards: http://joomla.github.io/coding-standards/
@frankmayer Yeah exactly what I was thinking about. Thanks @frankmayer. Now newly added form fields are not validated just at form submit but can be validated individually after a form submit fails.
Great ! I'll also make a commit for the compressed file, so it's ready to be pulled in.
Thanks for the PR. Looks good now.
Since we are still tracking the issues in JoomlaCode, may I ask you to open an item there (http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemBrowse&tracker_id=8103)?
Please also provide testing instructions there and reference this PR. Also post the tracker item here once done.
That would be awesome
@Bakual ok, I opened my first tracker item here: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=32886
I hope that's fine.
@Achal-Aggarwal Besides this issue, I am not sure if the behavior of having to hit submit twice might be an indicator of another problem, which is not in this issue's scope.
I normally would expect that if the validation fails, the submit would not be happening after the second or any click. Unfortunately I cannot look into this matter at this time, as I have a ton of work in ongoing projects. Just wanted to let you know.
@frankmayer Looks good, thanks!
Labels |
Added:
?
Removed: ? |
@frankmayer or @Achal-Aggarwal Can you update this PR to staging and resolve the conflitcs? And minize the JS afterwards again.
I can merge it then.
That would be helpful!
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-07-27 16:55:31 |
BTW, by which standard to you compress JS, so that I can also commit the compressed version of this fix.