catolicasc / alfresco-form-model-management

Automatically exported from code.google.com/p/alfresco-form-model-management
0 stars 0 forks source link

Bugs with date, quotations, and required fields #26

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
1) Bug with calendar date field:
I found that whenever I select a date from the calendar in a date-type field 
and save the form the next time I load the form the date value would show one 
day past than what was entered.  For example the original date picked from 
calendar is "2012-12-12" on saving and returning the new date would be 
"2012-12-11". Every saves would make the date go back one day than the previous 
value that was there. 

In the file form.jquery.js I found the part with the line "var iD = new 
Date(nodeVal);" is where the problem is.  On Firebug the iD variables show that 
it is converted to "Date {Wed Dec 11 2012 16:00:00 GMT-0800 (Pacific Standard 
Time)}" when the nodeVal is "2012-12-12" which makes it always one day less 
than the input value. And the subsequent lines of codes use this iD value to 
get the month and day to display as the new date input. On my system I just 
check for valid date format and spit out the original date value that was 
entered if it's valid.     

2) Bug with quotations marks: 
I've discovered that the first quotation mark " that appear on any of the text 
fields will be turned in to || on every form save.  I looked in the code in the 
file form.jquery.js around line 898 there is a $(this).val().replace('"', "||") 
to turn the first quotation mark in to ||.  This is undesirable for us because 
our form inputs frequently have quotation marks in them.  Is there a reason why 
you made the first quotation mark of field input to be changed into || before 
saving?

3) Bug with required fields:
When I mark a text field as required and users try to skip entering input for 
that field the form will not save and provide a red text warning them of the 
error.  But if I mark a field of type radio, dropdown or checkboxes as required 
and users do not make any selection for those fields the form will still save 
without warning.  Can we enforce required fields for the field types radio, 
dropdown and checkboxes?

What version of the product are you using? On what operating system?
alfresco community 4.2b, alf_forms_management_1_3_4_1.amp,      fm-share_1_2_5.amp

Original issue reported on code.google.com by anhthan...@gmail.com on 13 Dec 2012 at 11:01

GoogleCodeExporter commented 8 years ago
Hey anhthan,

I shall look into this this week. Should have something soon.

Original comment by mike.pri...@abstractive.ca on 14 Dec 2012 at 1:01

GoogleCodeExporter commented 8 years ago
I can't remember why i used || instead of escaping ". It will prob remind me 
when i switch it ;)

Original comment by mike.pri...@abstractive.ca on 14 Dec 2012 at 1:02

GoogleCodeExporter commented 8 years ago
Bugs 2 and 3 fixed. I can't seem to replicate the first one. Files checked into 
svn:

form.jquery.js and validation.js

Original comment by mike.pri...@abstractive.ca on 8 Jan 2013 at 10:06

GoogleCodeExporter commented 8 years ago

Original comment by mike.pri...@abstractive.ca on 8 Jan 2013 at 10:06