BUGfix : return correctly the form checking

The check_form_borrowers showed an error in the user entry if needed,
but validated it anyway

Signed-off-by: Chris Cormack <crc@liblime.com>
This commit is contained in:
Paul POULAIN 2007-09-20 10:31:15 +02:00 committed by Chris Cormack
parent 033d9c25cb
commit fa87c4d8ff
2 changed files with 3 additions and 2 deletions

View File

@ -146,6 +146,7 @@ var statut=0;
if (statut==1){
//alert if at least 1 error
alert(message+"\n"+message_champ);
return false;
}
else
{

View File

@ -584,9 +584,9 @@ patron <!-- TMPL_VAR NAME="surname" --> <!-- TMPL_VAR name="firstname" -->
<!-- /TMPL_IF -->
<div id="action">
<!-- TMPL_IF NAME="opadd" -->
<input type="button" name="step4" onclick="check_form_borrowers();unique();" value="Add member" />
<input type="button" name="step4" onclick="return check_form_borrowers();unique();" value="Add member" />
<!-- TMPL_ELSE -->
<input type="button" name="step4" onclick="check_form_borrowers();" value="Modify member" />
<input type="button" name="step4" onclick="return check_form_borrowers();" value="Modify member" />
<!--/TMPL_IF -->
</div>
</form>