Lines 40-66
function active(numlayer)
Link Here
|
40 |
} |
40 |
} |
41 |
} |
41 |
} |
42 |
function Check(f) { |
42 |
function Check(f) { |
43 |
var total_errors=0; |
43 |
var total_errors = CheckMandatorySubfields(f); |
44 |
$("input[name='mandatory'],select[name='mandatory']").each(function(i){ |
44 |
if (total_errors > 0) { |
45 |
if($(this).val() == 1){ |
45 |
var alertString2 = _("Form not submitted because of the following problem(s)"); |
46 |
var mandatory_field = $("input[name='field_value'],select[name='field_value']").eq(i); |
|
|
47 |
if(mandatory_field.val() == ''){ |
48 |
mandatory_field.addClass("missing"); |
49 |
total_errors++; |
50 |
} |
51 |
} |
52 |
}); |
53 |
|
54 |
var alertString2; |
55 |
if (total_errors==0) { |
56 |
return true; |
57 |
} else { |
58 |
alertString2 = _("Form not submitted because of the following problem(s)"); |
59 |
alertString2 += "\n------------------------------------------------------------------------------------\n"; |
46 |
alertString2 += "\n------------------------------------------------------------------------------------\n"; |
60 |
alertString2 += "\n- "+ total_errors+_(" mandatory fields empty (highlighted)"); |
47 |
alertString2 += "\n- "+ total_errors + _(" mandatory fields empty (highlighted)"); |
61 |
alert(alertString2); |
48 |
alert(alertString2); |
62 |
return false; |
49 |
return false; |
63 |
} |
50 |
} |
|
|
51 |
return true; |
64 |
} |
52 |
} |
65 |
function CheckMultipleAdd(f) { |
53 |
function CheckMultipleAdd(f) { |
66 |
|
54 |
|
67 |
- |
|
|