[Vtigercrm-commits] [vtiger-commits] r4366 - in /vtigercrm/trunk: Smarty/templates/DetailView.tpl Smarty/templates/FieldAccess.tpl modules/Users/UpdateDefaultFieldLevelAccess.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Tue Mar 21 05:47:38 EST 2006


Author: saraj
Date: Tue Mar 21 03:47:30 2006
New Revision: 4366

Log:
issue in orgdefault permission edit has been fixed

Modified:
    vtigercrm/trunk/Smarty/templates/DetailView.tpl
    vtigercrm/trunk/Smarty/templates/FieldAccess.tpl
    vtigercrm/trunk/modules/Users/UpdateDefaultFieldLevelAccess.php

Modified: vtigercrm/trunk/Smarty/templates/DetailView.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/DetailView.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/DetailView.tpl Tue Mar 21 03:47:30 2006
@@ -445,9 +445,34 @@
 						</tr>
 						</table>
 						<br><br>
-						<table border=0 cellspacing=0 cellpadding=0 width=100% style="border:1px solid #ddddcc" class="small">
-						<tr><td><span id="tagfields"></span></td></tr>
+						<table border=0 cellspacing=0 cellpadding=0 width=100% >
+						<tr><td>
+						<table width="250" border="0" cellspacing="0" cellpadding="0">
+						<tr>
+						<td colspan="3"><img src="{$IMAGE_PATH}cloud_top.gif" width=250 height=38 alt=""></td>
+						</tr>
+						<tr>
+						<td width="16" height="10"><img src="{$IMAGE_PATH}cloud_top_left.gif" width="16" height="10"></td>
+						<td width="221" height="10"><img src="{$IMAGE_PATH}tagcloud_03.gif" width="221" height="10"></td>
+						<td width="13" height="10"><img src="{$IMAGE_PATH}cloud_top_right.gif" width="13" height="10"></td>
+						</tr>
+						<tr>
+						<td class="cloudLft"></td>
+						<td>
+						<span id="tagfields"></span>
+						</td>
+						<td class="cloudRht"></td>
+						</tr>
+						<tr>
+						<td width="16" height="13"><img src="{$IMAGE_PATH}cloud_btm_left.gif" width="16" height="13"></td>
+						<td width="221" height="13"><img src="{$IMAGE_PATH}cloud_btm_bdr.gif" width="221" height="13"></td>
+						<td width="13" height="13"><img src="{$IMAGE_PATH}cloud_btm_right.gif" width="13" height="13"></td>
+						</tr>
 						</table>
+						
+						</td></tr>
+						</table>
+
 					</td>
 				</tr>
 				</table>

Modified: vtigercrm/trunk/Smarty/templates/FieldAccess.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/FieldAccess.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/FieldAccess.tpl Tue Mar 21 03:47:30 2006
@@ -19,7 +19,11 @@
 		<form action="index.php" method="post" name="new" id="form">
 		<input type="hidden" name="module" value="Users">
 		<input type="hidden" name="parenttab" value="Settings">
+		{if $MODE neq 'view'}
+		<input type="hidden" name="action" value="UpdateDefaultFieldLevelAccess">
+		{else}
 		<input type="hidden" name="action" value="EditDefOrgFieldLevelAccess">
+		{/if}	
 		<tbody><tr>
 		<td style="font-size: 1px; font-family: Arial,Helvetica,sans-serif;" height="6" width="7"><img src="{$IMAGE_PATH}top_left.jpg" align="top"></td>
 		<td style="font-size: 1px; font-family: Arial,Helvetica,sans-serif; height: 6px;" bgcolor="#ebebeb"></td>

Modified: vtigercrm/trunk/modules/Users/UpdateDefaultFieldLevelAccess.php
==============================================================================
--- vtigercrm/trunk/modules/Users/UpdateDefaultFieldLevelAccess.php (original)
+++ vtigercrm/trunk/modules/Users/UpdateDefaultFieldLevelAccess.php Tue Mar 21 03:47:30 2006
@@ -13,17 +13,17 @@
 require_once('include/utils/UserInfoUtil.php');
 require_once('include/utils/utils.php');
 global $adb;
-$fld_module = $_REQUEST['fld_module'];
-$fieldListResult = getDefOrgFieldList($fld_module);
-$noofrows = $adb->num_rows($fieldListResult);
-$tab_id = getTabid($fld_module);
-for($i=0; $i<$noofrows; $i++)
+
+$field_module = Array('Leads','Accounts','Contacts','Potentials','HelpDesk','Products','Notes','Emails','Activities','Events','Vendors','PriceBooks','Quotes','PurchaseOrder','SalesOrder','Invoice');
+foreach($field_module as $fld_module)
 {
-	$fieldid =  $adb->query_result($fieldListResult,$i,"fieldid");
-	//echo 'fieldid '.$fieldid;
+	$fieldListResult = getDefOrgFieldList($fld_module);
+	$noofrows = $adb->num_rows($fieldListResult);
+	$tab_id = getTabid($fld_module);
+	for($i=0; $i<$noofrows; $i++)
+	{
+		$fieldid =  $adb->query_result($fieldListResult,$i,"fieldid");
 		$visible = $_REQUEST[$fieldid];
-		//echo '      visible   '.$visible;
-		//echo '<BR>';
 		if($visible == 'on')
 		{
 			$visible_value = 0;
@@ -34,20 +34,16 @@
 		}
 		//Updating the Mandatory fields
 		$uitype = $adb->query_result($fieldListResult,$i,"uitype");
-                if($uitype == 2 || $uitype == 51 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16)
-                {
-                       $visible_value = 0; 
-                }		
-	
+		if($uitype == 2 || $uitype == 51 || $uitype == 6 || $uitype == 22 || $uitype == 73 || $uitype == 24 || $uitype == 81 || $uitype == 50 || $uitype == 23 || $uitype == 16)
+		{
+			$visible_value = 0; 
+		}		
+
 		//Updating the database
 		$update_query = "update def_org_field set visible=".$visible_value." where fieldid='".$fieldid."' and tabid=".$tab_id;
-		/*
-		   echo '<BR>';
-		   echo $update_query;
-		   echo '<BR>';
-		*/
 		$adb->query($update_query);
 
+	}
 }
 $loc = "Location: index.php?action=DefaultFieldPermissions&module=Users&fld_module=".$fld_module;
 header($loc);





More information about the vtigercrm-commits mailing list