Browse Source

DIV-934 - Error when child'd birthdate is incorrect format

pull/160/head
Michael Olund 6 years ago
parent
commit
bade84bfcc
1 changed files with 11 additions and 10 deletions
  1. +11
    -10
      edivorce/apps/core/static/js/ajax.js

+ 11
- 10
edivorce/apps/core/static/js/ajax.js View File

@ -5,6 +5,17 @@ var ajaxOnChange = function () {
// show/hide additional information if needed // show/hide additional information if needed
reveal(el); reveal(el);
var isValid = true;
// Check if date is in valid format DD/MM/YYYY
if (el.is(".date-picker") || el.is(".date-pickers") || el.is(".date-picker-future")){
isValid = validateDate(el);
}
if (el.is("#email_textbox")){
isValid = validateEmail(el);
}
var skipAjax = el.attr('data-skip_ajax'); var skipAjax = el.attr('data-skip_ajax');
if (skipAjax !== undefined && skipAjax === "true") { if (skipAjax !== undefined && skipAjax === "true") {
return; return;
@ -22,16 +33,6 @@ var ajaxOnChange = function () {
var question = el.prop('name'); var question = el.prop('name');
var value = getValue(el, question); var value = getValue(el, question);
var isValid = true;
// Check if date is in valid format DD/MM/YYYY
if (el.is(".date-picker") || el.is(".date-pickers") || el.is(".date-picker-future")){
isValid = validateDate(el);
}
if (el.is("#email_textbox")){
isValid = validateEmail(el);
}
// special behaviour for radio button with textbox // special behaviour for radio button with textbox
radioWithTextboxControl(el); radioWithTextboxControl(el);


Loading…
Cancel
Save