|
|
|
@ -450,7 +450,7 @@ $(function () { |
|
|
|
$('#claimant_children').find('tbody:first').find('tr:gt(0)').each(function () { |
|
|
|
var childData = {}; |
|
|
|
$(this).find('.child-field').each(function () { |
|
|
|
childData[$(this).attr('data-target-form-field')] = $(this).text(); |
|
|
|
childData[$(this).attr('data-target-form-field')] = $(this).text().trim(); |
|
|
|
}); |
|
|
|
childrenData.push(childData); |
|
|
|
}); |
|
|
|
@ -497,7 +497,7 @@ $(function () { |
|
|
|
questionWell.find('.required').hide(); |
|
|
|
$(inputField).removeClass('error'); |
|
|
|
if (inputField.type === 'text') { |
|
|
|
if (inputField.value === '') { |
|
|
|
if (inputField.value.trim() === '') { |
|
|
|
isNotEmpty = false; |
|
|
|
$(inputField).addClass('error'); |
|
|
|
questionWell.addClass('error'); |
|
|
|
@ -960,10 +960,17 @@ var saveListControlRow = function(tableId) { |
|
|
|
|
|
|
|
tableRows.each(function() { |
|
|
|
var item = {}; |
|
|
|
var hasVal = false; |
|
|
|
$(this).find(saveSelector).each(function() { |
|
|
|
item[$(this).prop('name')] = $(this).val(); |
|
|
|
var val = $(this).val().trim(); |
|
|
|
item[$(this).prop('name')] = val; |
|
|
|
if (val !== "" && val !== '0.00') { |
|
|
|
hasVal = true; |
|
|
|
} |
|
|
|
}); |
|
|
|
payload.push(item); |
|
|
|
if (hasVal) { |
|
|
|
payload.push(item); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
var jsonPayload = JSON.stringify(payload); |
|
|
|
@ -971,7 +978,6 @@ var saveListControlRow = function(tableId) { |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var replaceSuffix = function(str, suffix) { |
|
|
|
if (str !== undefined && str.lastIndexOf('_') !== -1) { |
|
|
|
str = str.substr(0, str.lastIndexOf('_')); |
|
|
|
|