diff --git a/web/root/ecwebv3/lib/client.js b/web/root/ecwebv3/lib/client.js index ae281cdcb46bac144f76b43e58f2336d3244681b..d9f159598892ea257bc9afcbff54a2a4a9092a25 100644 --- a/web/root/ecwebv3/lib/client.js +++ b/web/root/ecwebv3/lib/client.js @@ -331,9 +331,10 @@ var validateNewUserForm = function() { sexCheck++; } if(theForm.elements[e].id == 'birthDate') { - if(theForm.elements[e].value.match(/\d\d-\d\d-\d\d/) == null) { + if(theForm.elements[e].value.match(/\d\d\/\d\d\/\d\d/) == null) { theForm.elements[e].style.backgroundColor = '#FA5882'; - document.getElementById(theForm.elements[e].id + 'Error').innerHTML = 'Invalid date (DD-MM-YY)'; + document.getElementById(theForm.elements[e].id + 'Error').innerHTML = format('Invalid date (%s)' + ,(system.settings&SYS_EURODATE) ? "DD/MM/YY" : "MM/DD/YY"); returnValue = false; } else { theForm.elements[e].style.backgroundColor = '#82FA58'; diff --git a/web/root/ecwebv3/pages/999-newUser.ssjs b/web/root/ecwebv3/pages/999-newUser.ssjs index 771e2f7e29749417397754f10e14a0e384ee0cb3..a97df4a0362e8d30c7356b390c27d3f088a15b1f 100644 --- a/web/root/ecwebv3/pages/999-newUser.ssjs +++ b/web/root/ecwebv3/pages/999-newUser.ssjs @@ -86,8 +86,8 @@ if(http_request.query.hasOwnProperty('font')) { } if(system.newuser_questions&UQ_BIRTH) { - if(!http_request.query.hasOwnProperty('birthDate') || http_request.query.birthDate.toString().match(/\d\d-\d\d-\d\d/) == null) - failString += '- Birth date not provided<br />'; + if(!http_request.query.hasOwnProperty('birthDate') || http_request.query.birthDate.toString().match(/\d\d\/\d\d\/\d\d/) == null) + failString += '- Birthdate not provided<br />'; else newUserObject.birthdate = http_request.query.birthDate.toString(); } @@ -159,7 +159,7 @@ if(http_request.query.hasOwnProperty('font')) { if(system.newuser_questions&UQ_SEX) print("Sex: <input class='border font' type='radio' name='sex' id='sex' value='m' />M <input class='border font' type='radio' name='sex' id='sex' value='f' />F <span id='sexError'></span><br /><br />"); // lol if(system.newuser_questions&UQ_BIRTH) - print("Birthdate DD-MM-YY:<br /><input class='border font' type='text' size='8' name='birthDate' id='birthDate' /> <span id='birthDateError'></span><br /><br />"); + print(format("Birthdate (%s):<br /><input class='border font' type='text' size='8' name='birthDate' id='birthDate' /> <span id='birthDateError'></span><br /><br />", (system.settings&SYS_EURODATE) ? "DD/MM/YY" : "MM/DD/YY")); if(system.newuser_questions&UQ_COMPANY) print("Company:<br /><input class='border font' type='text' size='30' name='company' id='company' /> <span id='companyError'></span><br /><br />"); if(system.newuser_questions&UQ_NONETMAIL == 0)