Commit 9231baf25d9576675ba31bcc380cc5813d6b9f07
Exists in
master
and in
29 other branches
Merge branch 'fix-custom_forms-small-bugs' into 'master'
custom_forms: small bug fixes in datepick and remove field - Fixes slide up of field box when removing a field, since the outer box was being left behind and only the content was being slided up. - Fixes date pick on Firefox/Iceweasel, which was not showing the date stored on the database and instead was always being initialized with the current date because the format with dashes '1995-12-17 03:24:00' is not a valid date format for Date(), while '1995-12-17T03:24:00' or '1995/12/17 03:24:00' are correct formats. See merge request !703
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
plugins/custom_forms/public/field.js
@@ -40,7 +40,7 @@ var customFormsPlugin = { | @@ -40,7 +40,7 @@ var customFormsPlugin = { | ||
40 | if (confirm(confirmMsg)) { | 40 | if (confirm(confirmMsg)) { |
41 | fb = jQuery(button).closest('.field-box'); | 41 | fb = jQuery(button).closest('.field-box'); |
42 | jQuery('input.destroy-field', fb).val(1); | 42 | jQuery('input.destroy-field', fb).val(1); |
43 | - jQuery('> div', fb).slideUp({easing:'linear', complete:function(){fb.slideUp({easing:'linear', duration:250})}}); | 43 | + jQuery(fb).slideUp(600, 'linear'); |
44 | } | 44 | } |
45 | }, | 45 | }, |
46 | 46 |
plugins/custom_forms/views/custom_forms_plugin_myprofile/_form.html.erb
@@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
5 | <%= required labelled_form_field _('Name'), f.text_field(:name) %> | 5 | <%= required labelled_form_field _('Name'), f.text_field(:name) %> |
6 | <%= labelled_form_field(_('What is the time limit for this form to be filled?'), ( | 6 | <%= labelled_form_field(_('What is the time limit for this form to be filled?'), ( |
7 | date_range_field('form[begining]', 'form[ending]', @form.begining, @form.ending, | 7 | date_range_field('form[begining]', 'form[ending]', @form.begining, @form.ending, |
8 | - '%Y-%m-%d %H:%M', | 8 | + '%Y/%m/%d %H:%M', |
9 | { :time => true, :change_month => true, :change_year => true, | 9 | { :time => true, :change_month => true, :change_year => true, |
10 | :date_format => 'yy-mm-dd', :time_format => 'hh:mm' }, | 10 | :date_format => 'yy-mm-dd', :time_format => 'hh:mm' }, |
11 | { :size => 14 }) | 11 | { :size => 14 }) |