[Vtigercrm-commits] [vtiger-commits] r10197 - in /vtigercrm/branches/5.0.3: Smarty/templates/QuickCreate.tpl include/js/general.js modules/Accounts/Save.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Fri Feb 16 11:33:48 EST 2007
Author: saraj
Date: Fri Feb 16 09:33:38 2007
New Revision: 10197
Log:
Issue during account duplication check
Modified:
vtigercrm/branches/5.0.3/Smarty/templates/QuickCreate.tpl
vtigercrm/branches/5.0.3/include/js/general.js
vtigercrm/branches/5.0.3/modules/Accounts/Save.php
Modified: vtigercrm/branches/5.0.3/Smarty/templates/QuickCreate.tpl
==============================================================================
--- vtigercrm/branches/5.0.3/Smarty/templates/QuickCreate.tpl (original)
+++ vtigercrm/branches/5.0.3/Smarty/templates/QuickCreate.tpl Fri Feb 16 09:33:38 2007
@@ -395,7 +395,7 @@
<tr>
{if $MODULE eq 'Accounts'}
- <td width=50% align=right><input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="crmbutton small save" onclick="this.form.action.value='Save';AjaxDuplicateValidate('Accounts','accountname',this.form);" type="button" name="button" value=" {$APP.LBL_SAVE_BUTTON_LABEL} " style="width:70px" ></td>
+ <td width=50% align=right><input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="crmbutton small save" onclick="AjaxDuplicateValidate('Accounts','accountname',this.form);" type="button" name="button" value=" {$APP.LBL_SAVE_BUTTON_LABEL} " style="width:70px" ></td>
{else}
<td width=50% align=right><input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="crmbutton small save" type="submit" name="button" value=" {$APP.LBL_SAVE_BUTTON_LABEL}" style="width:70px" ></td>
{/if}
Modified: vtigercrm/branches/5.0.3/include/js/general.js
==============================================================================
--- vtigercrm/branches/5.0.3/include/js/general.js (original)
+++ vtigercrm/branches/5.0.3/include/js/general.js Fri Feb 16 09:33:38 2007
@@ -1744,6 +1744,11 @@
function AjaxDuplicateValidate(module,fieldname,oform)
{
var fieldvalue = getObj(fieldname).value;
+ if(fieldvalue == '')
+ {
+ alert("AccountName Cannot be Empty");
+ return false;
+ }
var url = "module="+module+"&action="+module+"Ajax&file=Save&"+fieldname+"="+fieldvalue+"&dup_check=true"
new Ajax.Request(
'index.php',
Modified: vtigercrm/branches/5.0.3/modules/Accounts/Save.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Accounts/Save.php (original)
+++ vtigercrm/branches/5.0.3/modules/Accounts/Save.php Fri Feb 16 09:33:38 2007
@@ -30,7 +30,7 @@
{
//started
$value = $_REQUEST['accountname'];
- $query = "SELECT accountname FROM vtiger_account WHERE accountname ='".$value."'";
+ $query = "SELECT accountname FROM vtiger_account,vtiger_crmentity WHERE accountname ='".$value."' and vtiger_account.accountid = vtiger_crmentity.crmid and vtiger_crmentity.deleted != 1";
$result = $adb->query($query);
if($adb->num_rows($result) > 0)
{
More information about the vtigercrm-commits
mailing list