[Vtigercrm-commits] [vtiger-commits] r7155 - in /vtigercrm/trunk: Smarty/templates/UserEditView.tpl include/utils/CommonUtils.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Fri Jun 16 02:20:27 EDT 2006


Author: don
Date: Fri Jun 16 00:20:22 2006
New Revision: 7155

Log:
display type =4 for create view has been added

Modified:
    vtigercrm/trunk/Smarty/templates/UserEditView.tpl
    vtigercrm/trunk/include/utils/CommonUtils.php

Modified: vtigercrm/trunk/Smarty/templates/UserEditView.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/UserEditView.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/UserEditView.tpl Fri Jun 16 00:20:22 2006
@@ -31,7 +31,7 @@
 <script language="javascript">
 function check_duplicate()
 {ldelim}
-	var user_name = $('user_name').value;
+	var user_name = window.document.EditView.user_name.value;
 	new Ajax.Request(
                 'index.php',
                 {ldelim}queue: {ldelim}position: 'end', scope: 'command'{rdelim},

Modified: vtigercrm/trunk/include/utils/CommonUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/CommonUtils.php (original)
+++ vtigercrm/trunk/include/utils/CommonUtils.php Fri Jun 16 00:20:22 2006
@@ -939,6 +939,13 @@
 		$block_label[$blockid] = $adb->query_result($result,$i,"blocklabel");
 	}
 	$blockid_list .= ')';
+	if($mode == 'edit')	
+	{
+		$display_type_check = 'vtiger_field.displaytype = 1';
+	}else
+	{
+		$display_type_check = 'vtiger_field.displaytype in (1,4)';
+	}
 	//retreive the vtiger_profileList from database
 	require('user_privileges/user_privileges_'.$current_user->id.'.php');
 	if($disp_view == "detail_view")
@@ -961,7 +968,7 @@
 		{
 			if($is_admin==true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2]== 0)
 			{
-				$sql = "select vtiger_field.* from vtiger_field where vtiger_field.tabid=".$tabid." and vtiger_field.block in ".$blockid_list ." and vtiger_field.displaytype=1 and info_type = '".$info_type."' order by block,sequence";
+				$sql = "select vtiger_field.* from vtiger_field where vtiger_field.tabid=".$tabid." and vtiger_field.block in ".$blockid_list ." and ".$display_type_check." and info_type = '".$info_type."' order by block,sequence";
 			}
 			else
 			{
@@ -973,7 +980,7 @@
 		{
 			if($is_admin==true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] == 0)
 			{
-				$sql = "select vtiger_field.* from vtiger_field where vtiger_field.tabid=".$tabid." and vtiger_field.block in ".$blockid_list." and vtiger_field.displaytype=1 order by block,sequence";
+				$sql = "select vtiger_field.* from vtiger_field where vtiger_field.tabid=".$tabid." and vtiger_field.block in ".$blockid_list." and ".$display_type_check." order by block,sequence";
 			}
 			else
 			{





More information about the vtigercrm-commits mailing list