[Vtigercrm-commits] [vtiger-commits] r3897 - /vtigercrm/trunk/modules/Users/Forms.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Thu Feb 23 06:16:44 EST 2006
Author: saraj
Date: Thu Feb 23 04:16:39 2006
New Revision: 3897
Log:
Incorporated field validations while creating new users for CRM
Modified:
vtigercrm/trunk/modules/Users/Forms.php
Modified: vtigercrm/trunk/modules/Users/Forms.php
==============================================================================
--- vtigercrm/trunk/modules/Users/Forms.php (original)
+++ vtigercrm/trunk/modules/Users/Forms.php Thu Feb 23 04:16:39 2006
@@ -34,6 +34,8 @@
$lbl_last_name = $mod_strings['LBL_LIST_LAST_NAME'];
$lbl_user_name = $mod_strings['LBL_LIST_USER_NAME'];
+$lbl_new_password = $mod_strings['LBL_LIST_PASSWORD'];
+$lbl_confirm_new_password = $mod_strings['LBL_LIST_CONFIRM_PASSWORD'];
$lbl_user_email1 = $mod_strings['LBL_LIST_EMAIL'];
$err_missing_required_fields = $app_strings['ERR_MISSING_REQUIRED_FIELDS'];
$err_invalid_email_address = $app_strings['ERR_INVALID_EMAIL_ADDRESS'];
@@ -57,13 +59,21 @@
function verify_data(form) {
var isError = false;
var errorMessage = "";
+ if (trim(form.user_name.value) == "") {
+ isError = true;
+ errorMessage += "\\n$lbl_user_name";
+ }
+ if (trim(form.new_password.value) == "") {
+ isError = true;
+ errorMessage += "\\n$lbl_new_password";
+ }
+ if (trim(form.confirm_new_password.value) == "") {
+ isError = true;
+ errorMessage += "\\n$lbl_confirm_new_password";
+ }
if (trim(form.last_name.value) == "") {
isError = true;
errorMessage += "\\n$lbl_last_name";
- }
- if (trim(form.user_name.value) == "") {
- isError = true;
- errorMessage += "\\n$lbl_user_name";
}
if (trim(form.email1.value) == "") {
isError = true;
More information about the vtigercrm-commits
mailing list