|
|
@ -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); |
|
|
|