|
Lines 98-135
function check_form_borrowers(nav){
Link Here
|
| 98 |
} |
98 |
} |
| 99 |
} |
99 |
} |
| 100 |
|
100 |
|
| 101 |
if (document.form.BorrowerMandatoryField.value==='') |
|
|
| 102 |
{} |
| 103 |
else |
| 104 |
{ |
| 105 |
var champ_verif = document.form.BorrowerMandatoryField.value.split ('|'); |
| 106 |
message += MSG_MISSING_MANDATORY; |
| 107 |
message += "\n"; |
| 108 |
for (var i=0; i<champ_verif.length; i++) { |
| 109 |
if (document.getElementsByName(""+champ_verif[i]+"")[0]) { |
| 110 |
var val_champ=eval("document.form."+champ_verif[i]+".value"); |
| 111 |
var ref_champ=eval("document.form."+champ_verif[i]); |
| 112 |
//check if it's a select |
| 113 |
if (ref_champ.type=='select-one'){ |
| 114 |
// check to see if first option is selected and is blank |
| 115 |
if (ref_champ.options[0].selected && |
| 116 |
ref_champ.options[0].text === ''){ |
| 117 |
// action if field is empty |
| 118 |
message_champ+=champ_verif[i]+"\n"; |
| 119 |
//test to know if you must show a message with error |
| 120 |
statut=1; |
| 121 |
} |
| 122 |
} else { |
| 123 |
if ( val_champ === '' ) { |
| 124 |
// action if the field is not empty |
| 125 |
message_champ+=champ_verif[i]+"\n"; |
| 126 |
statut=1; |
| 127 |
} |
| 128 |
} |
| 129 |
} |
| 130 |
} |
| 131 |
} |
| 132 |
|
| 133 |
if ( document.form.password.value != document.form.password2.value ){ |
101 |
if ( document.form.password.value != document.form.password2.value ){ |
| 134 |
if ( message_champ !== '' ){ |
102 |
if ( message_champ !== '' ){ |
| 135 |
message_champ += "\n"; |
103 |
message_champ += "\n"; |
|
Lines 182-185
$(document).ready(function(){
Link Here
|
| 182 |
$("#debarreduntil").hide(); |
150 |
$("#debarreduntil").hide(); |
| 183 |
} |
151 |
} |
| 184 |
}); |
152 |
}); |
| 185 |
}); |
153 |
var mandatory_fields = $("input[name='BorrowerMandatoryField']").val().split ('|'); |
|
|
154 |
$(mandatory_fields).each(function(){ |
| 155 |
$("[name='"+this+"']").attr('required', 'required'); |
| 156 |
}); |
| 157 |
}); |