[Vtigercrm-commits] [vtiger-commits] r6201 - /vtigercrm/trunk/Smarty/templates/CreateProfile.tpl
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Fri May 19 16:40:38 EDT 2006
Author: don
Date: Fri May 19 14:40:34 2006
New Revision: 6201
Log:
duplicate check for profilename done
Modified:
vtigercrm/trunk/Smarty/templates/CreateProfile.tpl
Modified: vtigercrm/trunk/Smarty/templates/CreateProfile.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/CreateProfile.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/CreateProfile.tpl Fri May 19 14:40:34 2006
@@ -15,7 +15,7 @@
<tr>
{include file='SettingsMenu.tpl'}
<td width="75%" valign="top">
- <form action="index.php" method="post" name="new" id="form">
+ <form action="index.php" method="post" name="profileform" id="form">
<input type="hidden" name="module" value="Users">
<input type="hidden" name="mode" value="{$MODE}">
<input type="hidden" name="action" value="CreateProfile1">
@@ -62,7 +62,7 @@
<tr>
<td colspan="2" align="right">
<input type="button" value=" ‹ {$APP.LBL_BACK} " name="back" class="classBtnDisable" disabled />
- <input type="submit" value=" {$APP.LNK_LIST_NEXT} › " class="classBtn" name="Next" onClick="return rolevalidate();"/>
+ <input type="button" value=" {$APP.LNK_LIST_NEXT} › " class="classBtn" name="Next" onClick="rolevalidate();"/>
<input type="button" value=" {$APP.LBL_CANCEL_BUTTON_LABEL} " title="{$APP.LBL_CANCEL_BUTTON_TITLE}" name="Cancel" onClick="window.history.back()"; class="classBtn"/>
</td>
</tr>
@@ -82,12 +82,27 @@
var profilename = document.getElementById('pobox').value;
profilename = profilename.replace(/ /gi,'',profilename);
if(profilename != '')
- return true;
+ dup_validation(profilename);
else
{ldelim}
alert('Enter The Profile name');
document.getElementById('pobox').focus();
- return false;
{rdelim}
{rdelim}
+
+
+function dup_validation(profilename)
+{ldelim}
+ var ajaxObj = new Ajax(ajaxSaveResponse);
+ var urlstring ="module=Users&action=UsersAjax&file=CreateProfile1&ajax=true&dup_check=true&profile_name="+profilename;
+
+ ajaxObj.process("index.php?",urlstring);
+{rdelim}
+function ajaxSaveResponse(response)
+{ldelim}
+ if(response.responseText == 'SUCESS')
+ document.profileform.submit();
+ else
+ alert(response.responseText);
+{rdelim}
</script>
More information about the vtigercrm-commits
mailing list