[Vtigercrm-commits] [vtiger-commits] r10989 - in /vtigercrm/branches/5.0.3: Smarty/templates/ modules/Migration/DBChanges/ modules/Settings/ modules/Users/

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Wed May 23 14:03:05 EDT 2007


Author: richie
Date: Wed May 23 12:02:51 2007
New Revision: 10989

Log:
* Added new uitype 3 for Invoice No, and make invoice number non editable in field level access and profile creation because without invoice no we cannot create invoice so that we have restricted access, Fixed #3916

Modified:
    vtigercrm/branches/5.0.3/Smarty/templates/DisplayFields.tpl
    vtigercrm/branches/5.0.3/modules/Migration/DBChanges/503rc2_to_503.php
    vtigercrm/branches/5.0.3/modules/Settings/EditDefOrgFieldLevelAccess.php
    vtigercrm/branches/5.0.3/modules/Settings/UpdateDefaultFieldLevelAccess.php
    vtigercrm/branches/5.0.3/modules/Settings/profilePrivileges.php
    vtigercrm/branches/5.0.3/modules/Users/DefaultDataPopulator.php
    vtigercrm/branches/5.0.3/modules/Users/SaveProfile.php
    vtigercrm/branches/5.0.3/modules/Users/UpdateProfileChanges.php

Modified: vtigercrm/branches/5.0.3/Smarty/templates/DisplayFields.tpl
==============================================================================
--- vtigercrm/branches/5.0.3/Smarty/templates/DisplayFields.tpl (original)
+++ vtigercrm/branches/5.0.3/Smarty/templates/DisplayFields.tpl Wed May 23 12:02:51 2007
@@ -37,6 +37,9 @@
 			<td width=30% align=left class="dvtCellInfo">
 				<input type="text" name="{$fldname}" tabindex="{$vt_tab}" value="{$fldvalue|escape}" tabindex="{$vt_tab}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'">
 			</td>
+		{elseif $uitype eq 3}<!-- Non Editable field, only configured value will be loaded -->
+				<td width=20% class="dvtCellLabel" align=right>{$fldlabel}</td>
+                                <td width=30% align=left class="dvtCellInfo"><input readonly type="text" tabindex="{$vt_tab}" name="{$fldname}" id ="{$fldname}" {if $MODE eq 'edit'} value="{$fldvalue|escape}" {else} value="{$inv_no}" {/if} class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'"></td>
 		{elseif $uitype eq 11 || $uitype eq 1 || $uitype eq 13 || $uitype eq 7 || $uitype eq 9}
 			<td width=20% class="dvtCellLabel" align=right>{$fldlabel}</td>
 
@@ -46,10 +49,6 @@
 					<span id="vtbusy_info" style="display:none;">
 						<img src="{$IMAGE_PATH}vtbusy.gif" border="0"></span>
 				</td>
-			{elseif $fldname eq 'invoice_no' && $MODULE eq 'Invoice'}
-
-                                <td width=30% align=left class="dvtCellInfo"><input readonly type="text" tabindex="{$vt_tab}" name="{$fldname}" id ="{$fldname}" {if $MODE eq 'edit'} value="{$fldvalue|escape}" {else} value="{$inv_no}" {/if} class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'"></td>
-		
 
 			{else}
 				<td width=30% align=left class="dvtCellInfo"><input type="text" tabindex="{$vt_tab}" name="{$fldname}" id ="{$fldname}" value="{$fldvalue|escape}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'"></td>

Modified: vtigercrm/branches/5.0.3/modules/Migration/DBChanges/503rc2_to_503.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Migration/DBChanges/503rc2_to_503.php (original)
+++ vtigercrm/branches/5.0.3/modules/Migration/DBChanges/503rc2_to_503.php Wed May 23 12:02:51 2007
@@ -99,8 +99,9 @@
 
 
 //Added for Custom Invoice Number, No need for security population
+//Invoice Number has been set the uitype as 3 which is a new UI type. user can configure but non editable
 $newfieldid = $adb->getUniqueID("vtiger_field");
-ExecuteQuery("insert into vtiger_field values(23,".$newfieldid.",'invoice_no','vtiger_invoice',1,'1','invoice_no','Invoice No',1,0,0,100,3,69,1,'V~M',1,NULL,'BAS')");
+ExecuteQuery("insert into vtiger_field values(23,".$newfieldid.",'invoice_no','vtiger_invoice',1,'3','invoice_no','Invoice No',1,0,0,100,3,69,1,'V~M',1,NULL,'BAS')");
 //Populate security entries for this new field
 $profileresult = $adb->query("select * from vtiger_profile");
 $countprofiles = $adb->num_rows($profileresult);

Modified: vtigercrm/branches/5.0.3/modules/Settings/EditDefOrgFieldLevelAccess.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Settings/EditDefOrgFieldLevelAccess.php (original)
+++ vtigercrm/branches/5.0.3/modules/Settings/EditDefOrgFieldLevelAccess.php Wed May 23 12:02:51 2007
@@ -59,7 +59,7 @@
 		$fieldlabel = $adb->query_result($fieldListResult,$i,"fieldlabel");
                 $mandatory = '';
 		$readonly = '';
-                if($uitype == 2 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 20 || $uitype == 53 || $displaytype == 3 || ($displaytype != 3 && $fieldlabel == "Activity Type" && $uitype == 15))
+                if($uitype == 2 || $uitype == 3 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 20 || $uitype == 53 || $displaytype == 3 || ($displaytype != 3 && $fieldlabel == "Activity Type" && $uitype == 15))
                 {
                         $mandatory = '<font color="red">*</font>';
 						$readonly = 'disabled';

Modified: vtigercrm/branches/5.0.3/modules/Settings/UpdateDefaultFieldLevelAccess.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Settings/UpdateDefaultFieldLevelAccess.php (original)
+++ vtigercrm/branches/5.0.3/modules/Settings/UpdateDefaultFieldLevelAccess.php Wed May 23 12:02:51 2007
@@ -37,7 +37,7 @@
 		//Updating the Mandatory vtiger_fields
 		$uitype = $adb->query_result($fieldListResult,$i,"uitype");
 		$fieldname = $adb->query_result($fieldListResult,$i,"fieldname");
-		if($uitype == 2 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 53 || $displaytype == 3 || $uitype == 20 || ($displaytype != 3 && $fieldname == "activitytype" && $uitype == 15))
+		if($uitype == 2 || $uitype == 3 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 53 || $displaytype == 3 || $uitype == 20 || ($displaytype != 3 && $fieldname == "activitytype" && $uitype == 15))
 		{
 			$visible_value = 0; 
 		}		

Modified: vtigercrm/branches/5.0.3/modules/Settings/profilePrivileges.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Settings/profilePrivileges.php (original)
+++ vtigercrm/branches/5.0.3/modules/Settings/profilePrivileges.php Wed May 23 12:02:51 2007
@@ -475,7 +475,7 @@
 			$readonly = '';
 			$field=array();
 			
-			if($uitype == 2 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 53 || $displaytype == 3 || $uitype == 20 || ($fldLabel == "Activity Type" && $displaytype != 3 && $uitype == 15))
+			if($uitype == 2 || $uitype == 3 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 53 || $displaytype == 3 || $uitype == 20 || ($fldLabel == "Activity Type" && $displaytype != 3 && $uitype == 15))
 			{
 				$mandatory = '<font color="red">*</font>';
 				$readonly = 'disabled';
@@ -528,7 +528,7 @@
 				$field=array();
 
 				
-				if($uitype == 2 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 53 || $displaytype == 3 || $uitype == 20 || ($fldLabel == "Activity Type" && $displaytype != 3 && $uitype == 15))
+				if($uitype == 2 || $uitype == 3 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 53 || $displaytype == 3 || $uitype == 20 || ($fldLabel == "Activity Type" && $displaytype != 3 && $uitype == 15))
 				{
 					$mandatory = '<font color="red">*</font>';
 					$readonly = 'disabled';
@@ -578,7 +578,7 @@
 				$field=array();
 
 				
-				if($uitype == 2 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 53 || $displaytype == 3 || $uitype == 20 || ($fldLabel == "Activity Type" && $displaytype != 3 && $uitype == 15))
+				if($uitype == 2 || $uitype == 3 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 53 || $displaytype == 3 || $uitype == 20 || ($fldLabel == "Activity Type" && $displaytype != 3 && $uitype == 15))
 				{
 					$mandatory = '<font color="red">*</font>';
 					$readonly = 'disabled';

Modified: vtigercrm/branches/5.0.3/modules/Users/DefaultDataPopulator.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Users/DefaultDataPopulator.php (original)
+++ vtigercrm/branches/5.0.3/modules/Users/DefaultDataPopulator.php Wed May 23 12:02:51 2007
@@ -867,7 +867,7 @@
  //Block74
  $this->db->query("insert into vtiger_field values (23,".$this->db->getUniqueID("vtiger_field").",'terms_conditions','vtiger_invoice',1,'19','terms_conditions','Terms & Conditions',1,0,0,100,1,73,1,'V~O',1,null,'ADV')");
 //Added for Custom invoice Number
-$this->db->query("insert into vtiger_field values (23,".$this->db->getUniqueID("vtiger_field").",'invoice_no','vtiger_invoice',1,'1','invoice_no','Invoice No',1,0,0,100,3,69,1,'V~M',1,null,'BAS')");	
+$this->db->query("insert into vtiger_field values (23,".$this->db->getUniqueID("vtiger_field").",'invoice_no','vtiger_invoice',1,'3','invoice_no','Invoice No',1,0,0,100,3,69,1,'V~M',1,null,'BAS')");	
 
 //Invoice Details -- END
  //users Details Starts Block 79,80,81

Modified: vtigercrm/branches/5.0.3/modules/Users/SaveProfile.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Users/SaveProfile.php (original)
+++ vtigercrm/branches/5.0.3/modules/Users/SaveProfile.php Wed May 23 12:02:51 2007
@@ -180,7 +180,7 @@
 		$uitype = $adb->query_result($fieldListResult,$i,"uitype");
 		$displaytype =  $adb->query_result($fieldListResult,$i,"displaytype");
 		$fieldname =  $adb->query_result($fieldListResult,$i,"fieldname");
-		if($uitype == 2 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 53 || $displaytype == 3 || $uitype == 20 || ($displaytype != 3 && $fieldname == "activitytype" && $uitype == 15))
+		if($uitype == 2 || $uitype == 3 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 53 || $displaytype == 3 || $uitype == 20 || ($displaytype != 3 && $fieldname == "activitytype" && $uitype == 15))
 		{
 			$visible_value = 0;
 		}

Modified: vtigercrm/branches/5.0.3/modules/Users/UpdateProfileChanges.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Users/UpdateProfileChanges.php (original)
+++ vtigercrm/branches/5.0.3/modules/Users/UpdateProfileChanges.php Wed May 23 12:02:51 2007
@@ -164,7 +164,7 @@
 		$uitype = $adb->query_result($fieldListResult,$i,"uitype");
 		$displaytype =  $adb->query_result($fieldListResult,$i,"displaytype");
 		$fieldname =  $adb->query_result($fieldListResult,$i,"fieldname");
-		if($uitype == 2 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 53 || $displaytype == 3 || $uitype == 20 || ($displaytype != 3 && $fieldname == "activitytype" && $uitype == 15))
+		if($uitype == 2 || $uitype == 3 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16 || $uitype == 53 || $displaytype == 3 || $uitype == 20 || ($displaytype != 3 && $fieldname == "activitytype" && $uitype == 15))
 		{
 			$visible_value = 0;
 		}





More information about the vtigercrm-commits mailing list