Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib
In directory usw-pr-cvs1:/tmp/cvs-serv4126/chat/lib
Modified Files:
profile_work.lib.js
Log Message:
Modifications related to the new password reminder feature
Index: profile_work.lib.js
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/profile_work.lib.js,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** profile_work.lib.js 2001/04/19 21:05:04 1.3
--- profile_work.lib.js 2001/05/16 20:54:32 1.4
***************
*** 118,121 ****
--- 118,153 ----
/**
+ * Validates briefly the nick inside the profile reminder form
+ */
+ function pmcRemindProfileValidate()
+ {
+ // The replace function (js1.2) isn't supported -> no js tests are done
+ if (typeof(document.forms[formName].elements['nick'].value.replace) == 'undefined')
+ return true;
+
+ var nickField = document.forms[formName].elements['nick'];
+ var reNick = /\\|,| /;
+
+ if (nickField.value.replace(/ /g, '') == '') // nick is empty
+ {
+ nickField.value = '';
+ nickField.focus();
+ alert(jsErrorNick1);
+ return false;
+ }
+ else if (reNick.test(nickField.value)) // invalid characters in
+ { // the nick
+ nickField.focus();
+ alert(jsErrorNick2);
+ return false;
+ }
+
+ // All the tests have been succesfully passed -> submit the from
+ document.forms[formName].elements['isJsValidated'].value = 1;
+ return true;
+ } // end of the function 'pmcRemindProfileValidate()'
+
+
+ /**
* Inserts the login and the password at the start page form
*/
|