function verify_data(form) { // handles any errors in the email widget var isError = !check_form("EditView"); if (trim(form.last_name.value) == "") { add_error_style('EditView',form.last_name.name, '{$app_strings['ERR_MISSING_REQUIRED_FIELDS']} {$mod_strings['LBL_LIST_NAME']}' ); isError = true; } if (trim(form.sugar_user_name.value) == "") { add_error_style('EditView',form.sugar_user_name.name, '{$app_strings['ERR_MISSING_REQUIRED_FIELDS']} {$mod_strings['LBL_USER_NAME']}' ); isError = true; } if (document.getElementById("required_password").value=='1' && document.getElementById("new_password").value == "") { add_error_style('EditView',form.new_password.name, '{$app_strings['ERR_MISSING_REQUIRED_FIELDS']} {$mod_strings['LBL_NEW_PASSWORD']}' ); isError = true; } if (isError == true) { return false; } if (document.EditView.return_id.value != '' && (document.EditView.return_id.value == form.reports_to_id.value)) { alert('$err_self_reporting'); return false; } if (document.EditView.dec_sep.value != '' && (document.EditView.dec_sep.value == "'")) { alert("{$app_strings['ERR_NO_SINGLE_QUOTE']} {$mod_strings['LBL_DECIMAL_SEP']}"); return false; } if (document.EditView.num_grp_sep.value != '' && (document.EditView.num_grp_sep.value == "'")) { alert("{$app_strings['ERR_NO_SINGLE_QUOTE']} {$mod_strings['LBL_NUMBER_GROUPING_SEP']}"); return false; } if (document.EditView.num_grp_sep.value == document.EditView.dec_sep.value) { alert("{$app_strings['ERR_DECIMAL_SEP_EQ_THOUSANDS_SEP']}"); return false; } if( document.getElementById("portal_only") && document.getElementById("portal_only")=='1' && typeof(document.getElementById("new_password")) != "undefined" && typeof(document.getElementById("new_password").value) != "undefined") { if(document.getElementById("new_password").value != '' || document.getElementById("confirm_pwd").value != '') { if(document.getElementById("new_password").value != document.getElementById("confirm_pwd").value) { alert('$err_password_mismatch'); return false; } } } return true; } EOQ; return $the_script; } function user_get_chooser_js() { $the_script = << EOQ; return $the_script; } function user_get_confsettings_js() { global $mod_strings; global $app_strings; $lbl_last_name = $mod_strings['LBL_MAIL_FROMADDRESS']; $err_missing_required_fields = $app_strings['ERR_MISSING_REQUIRED_FIELDS']; return << EOQ; } ?>