[Vtigercrm-commits] [vtiger-commits] r6104 - /vtigercrm/trunk/Smarty/templates/RoleEditView.tpl
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed May 17 05:51:45 EDT 2006
Author: don
Date: Wed May 17 03:51:41 2006
New Revision: 6104
Log:
Duplicate role check done
Modified:
vtigercrm/trunk/Smarty/templates/RoleEditView.tpl
Modified: vtigercrm/trunk/Smarty/templates/RoleEditView.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/RoleEditView.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/RoleEditView.tpl Wed May 17 03:51:41 2006
@@ -10,8 +10,22 @@
********************************************************************************/
-->*}
<script language="JavaScript" type="text/javascript" src="include/js/menu.js"></script>
-<style type="text/css">@import url(themes/blue/style.css);</style>
<script language="javascript">
+function dup_validation()
+{ldelim}
+ //show("status");
+ var ajaxObj = new Ajax(ajaxSaveResponse);
+ var rolename = document.getElementById('rolename').value;
+ var urlstring ="module=Users&action=UsersAjax&file=SaveRole&ajax=true&dup_check=true&roleName="+rolename;
+ ajaxObj.process("index.php?",urlstring);
+{rdelim}
+function ajaxSaveResponse(response)
+{ldelim}
+ if(response.responseText == 'SUCESS')
+ document.newRoleForm.submit();
+ else
+ alert(response.responseText);
+{rdelim}
function validate()
{ldelim}
formSelectColumnString();
@@ -24,7 +38,7 @@
alert('Role should have atlease one profile');
return false;
{rdelim}
- return true;
+ dup_validation();
{rdelim}
</script>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
@@ -68,7 +82,7 @@
</td>
<td align="left" nowrap="nowrap" width="85%"><b>{$CMOD.LBL_ROLE_NAME}</b><br>
{$CMOD.LBL_SPECIFY_ROLE_NAME}
- <input type="text" name="roleName" class="importBox" value="{$ROLENAME}">
+ <input type="text" id="rolename" name="roleName" class="importBox" value="{$ROLENAME}">
</td>
</tr>
<tr><td colspan="2"> </td></tr>
@@ -124,7 +138,7 @@
<tr><td colspan="2" style="border-bottom: 1px dashed rgb(204, 204, 204);"> </td></tr>
<tr>
<td colspan="2" align="center">
- <input value=" {$APP.LBL_SAVE_BUTTON_LABEL} " name="Next" type="submit" class="classBtn" onClick="return validate()" >
+ <input value=" {$APP.LBL_SAVE_BUTTON_LABEL} " name="Next" type="button" class="classBtn" onClick="return validate()" >
<input value=" {$APP.LBL_CANCEL_BUTTON_LABEL} " name="Cancel" type="button" class="classBtn" onClick="window.history.back()">
</td>
</tr>
@@ -220,4 +234,3 @@
</tr>
</table>
{include file='SettingsSubMenu.tpl'}
-
More information about the vtigercrm-commits
mailing list