[Vtigercrm-commits] [vtiger-commits] r10584 - in /vtigercrm/branches/5.0.3: Smarty/templates/ActivityDetailView.tpl include/js/general.js modules/Calendar/addEventUI.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Fri Apr 6 09:50:44 EDT 2007


Author: richie
Date: Fri Apr  6 07:50:25 2007
New Revision: 10584

Log:
fix for field level security. Fixes #3606 --minnie

Modified:
    vtigercrm/branches/5.0.3/Smarty/templates/ActivityDetailView.tpl
    vtigercrm/branches/5.0.3/include/js/general.js
    vtigercrm/branches/5.0.3/modules/Calendar/addEventUI.php

Modified: vtigercrm/branches/5.0.3/Smarty/templates/ActivityDetailView.tpl
==============================================================================
--- vtigercrm/branches/5.0.3/Smarty/templates/ActivityDetailView.tpl (original)
+++ vtigercrm/branches/5.0.3/Smarty/templates/ActivityDetailView.tpl Fri Apr  6 07:50:25 2007
@@ -151,6 +151,7 @@
 								<td class="cellInfo" align="left" nowrap valign="top">{$ACTIVITYDATA.assigned_user_id}</td>
 								{/if}
                                                          </tr>
+							{if $LABEL.taskpriority neq '' || $LABEL.sendnotification neq ''}
 							 <tr>
 								{if $LABEL.taskpriority neq ''}
                                                                 <td class="cellLabel" align="right" nowrap valign="top"><b>{$LABEL.taskpriority}</b></td>
@@ -161,12 +162,15 @@
                                                                 <td class="cellInfo" align="left" nowrap valign="top">{$ACTIVITYDATA.sendnotification}</td>
 								{/if}
                                                          </tr>
+							{/if}
+							{if $LABEL.createdtime neq '' || $LABEL.modifiedtime neq ''}
                                                          <tr>
                                                                 <td class="cellLabel" align="right" nowrap valign="top"align="right">{if $LABEL.createdtime neq ''}<b>{$LABEL.createdtime}</b>{/if}</td>
                                                                 <td class="cellInfo" align="left" nowrap valign="top">{if $LABEL.createdtime neq ''}{$ACTIVITYDATA.createdtime}{/if}</td>
                                                                 <td class="cellLabel" align="right" nowrap valign="top"align="right">{if $LABEL.modifiedtime neq ''}<b>{$LABEL.modifiedtime}</b>{/if}</td>
                                                                 <td class="cellInfo" align="left" nowrap valign="top">{if $LABEL.modifiedtime neq ''}{$ACTIVITYDATA.modifiedtime}{/if}</td>
                                                          </tr>
+							{/if}
 						     </table>
 						     <table border=0 cellspacing=1 cellpadding=0 width=100%>
 							<tr><td width=50% valign=top >
@@ -294,14 +298,22 @@
                         					<td colspan="2" align="center" style="padding:0px">
                                 				<table border="0" cellpadding="5" cellspacing="1" width="100%" >
                                        					<tr>
-                                                				<td class="cellLabel" width=33% align="left">{if $LABEL.taskstatus neq ''}<b>{$LABEL.taskstatus}</b>{/if}</td>
-										<td class="cellLabel" width=33% align="left">{if $LABEL.taskpriority neq ''}<b>{$LABEL.taskpriority}</b>{/if}</td>
-										<td class="cellLabel" width=34% align="left">{if $LABEL.assigned_user_id neq ''}<b>{$LABEL.assigned_user_id}</b>{/if}</td>
+										{if $LABEL.taskstatus neq ''}
+                                                					<td class="cellLabel" width=33% align="left"><b>{$LABEL.taskstatus}</b></td>
+										{/if}
+										{if $LABEL.taskpriority neq ''}
+											<td class="cellLabel" width=33% align="left"><b>{$LABEL.taskpriority}</b></td>
+										{/if}
+										<td class="cellLabel" width=34% align="left"><b>{$LABEL.assigned_user_id}</b></td>
 									</tr>
 									<tr>
-                                                				<td class="cellInfo" align="left" valign="top">{if $LABEL.taskstatus neq ''}{$ACTIVITYDATA.taskstatus}{/if}</td>
-										<td class="cellInfo" align="left" valign="top">{if $LABEL.taskpriority neq ''}{$ACTIVITYDATA.taskpriority}{/if}</td>
-										<td class="cellInfo" align="left" valign="top">{if $LABEL.taskpriority neq ''}{$ACTIVITYDATA.assigned_user_id}{/if}</td>
+										{if $LABEL.taskstatus neq ''}
+                                                					<td class="cellInfo" align="left" valign="top">{$ACTIVITYDATA.taskstatus}</td>
+										{/if}
+										{if $LABEL.taskpriority neq ''}		
+											<td class="cellInfo" align="left" valign="top">{$ACTIVITYDATA.taskpriority}</td>
+										{/if}
+										<td class="cellInfo" align="left" valign="top">{$ACTIVITYDATA.assigned_user_id}</td>
 									</tr>
 								</table>
 								</td>
@@ -322,7 +334,7 @@
 									<tr><td class="cellInfo">&nbsp;</td></tr>
 								</table>
 							</td>
-						     </table>
+						     </table>	
 						     <table border=0 cellspacing=0 cellpadding=5 width=100% >
 							<tr>
 								<td class="cellLabel" align=right nowrap width=20%>{if $LABEL.createdtime neq ''}<b>{$LABEL.createdtime}</b>{/if}</td>

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 Apr  6 07:50:25 2007
@@ -1818,27 +1818,29 @@
 		else
 			 window.open("index.php?module=Contacts&action=Popup&html=Popup_picker&popuptype=specific&form=EditView","test","width=640,height=602,resizable=0,scrollbars=0");	
         }
-        else if(($("parentid")) && type != 'task' )
+        else if(($("parentid")) && type != 'task')
         {
-                rel_parent_module = frmName.parent_type.value;
-		record_id = frmName.parent_id.value;
-                module = rel_parent_module.split("&");	
-		if(record_id != '' && module[0] == "Leads")
-		{
-			alert(alert_arr.CANT_SELECT_CONTACTS);
-		}
-		else
-		{
-			if(check == 'true')
-				search_string = "&return_module=Calendar&select=enable&popuptype=detailview&form_submit=false";
+		if(getObj("parent_type")){
+                	rel_parent_module = frmName.parent_type.value;
+			record_id = frmName.parent_id.value;
+        	        module = rel_parent_module.split("&");	
+			if(record_id != '' && module[0] == "Leads")
+			{
+				alert(alert_arr.CANT_SELECT_CONTACTS);
+			}
 			else
-				search_string="&popuptype=specific";
-			if(record_id != '')
-				window.open("index.php?module=Contacts&action=Popup&html=Popup_picker&popuptype=specific&form=EditView"+search_string+"&relmod_id="+record_id+"&parent_module="+module[0],"test","width=640,height=602,resizable=0,scrollbars=0");
-			else
-				window.open("index.php?module=Contacts&action=Popup&html=Popup_picker&popuptype=specific&form=EditView"+search_string,"test","width=640,height=602,resizable=0,scrollbars=0");
-
-
+			{
+				if(check == 'true')
+					search_string = "&return_module=Calendar&select=enable&popuptype=detailview&form_submit=false";
+				else
+					search_string="&popuptype=specific";
+				if(record_id != '')
+					window.open("index.php?module=Contacts&action=Popup&html=Popup_picker&form=EditView"+search_string+"&relmod_id="+record_id+"&parent_module="+module[0],"test","width=640,height=602,resizable=0,scrollbars=0");
+				else
+					window.open("index.php?module=Contacts&action=Popup&html=Popup_picker&form=EditView"+search_string,"test","width=640,height=602,resizable=0,scrollbars=0");
+			}
+		}else{
+			window.open("index.php?module=Contacts&action=Popup&html=Popup_picker&return_module=Calendar&select=enable&popuptype=detailview&form=EditView&form_submit=false","test","width=640,height=602,resizable=0,scrollbars=0");
 		}
         }
 	else if(($("contact_name")) && type == 'task')

Modified: vtigercrm/branches/5.0.3/modules/Calendar/addEventUI.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Calendar/addEventUI.php (original)
+++ vtigercrm/branches/5.0.3/modules/Calendar/addEventUI.php Fri Apr  6 07:50:25 2007
@@ -648,8 +648,10 @@
 				if(isPermitted("Calendar","EditView") == "yes")
 				{
 				?>
-				<a href="javascript:;" id="complete" onClick="fninvsh('eventcalAction')" class="calMnu">- <?php echo $mod_strings['LBL_HELD']?></a>
-				<a href="javascript:;" id="pending" onClick="fninvsh('eventcalAction')" class="calMnu">- <?php echo $mod_strings['LBL_NOTHELD']?></a>
+					<?php if(getFieldVisibilityPermission('Events',$current_user->id,'eventstatus') == '0') { ?>
+						<a href="javascript:;" id="complete" onClick="fninvsh('eventcalAction')" class="calMnu">- <?php echo $mod_strings['LBL_HELD']?></a>
+						<a href="javascript:;" id="pending" onClick="fninvsh('eventcalAction')" class="calMnu">- <?php echo $mod_strings['LBL_NOTHELD']?></a>
+					<?php }?>		
 				<span style="border-top:1px dashed #CCCCCC;width:99%;display:block;"></span>
 				<a href="javascript:;" id="postpone" onClick="fninvsh('eventcalAction')" class="calMnu">- <?php echo $mod_strings['LBL_POSTPONE']?></a>
 				<a href="javascript:;" id="changeowner" onClick="fnvshobj(this,'act_changeowner');fninvsh('eventcalAction')" class="calMnu">- <?php echo $mod_strings['LBL_CHANGEOWNER']?></a>
@@ -927,8 +929,11 @@
                                 if(isPermitted("Calendar","EditView") == "yes")
                                 {
                                 ?>
-                                <a href="" id="taskcomplete" onClick="fninvsh('taskcalAction');" class="calMnu">- <?php echo $mod_strings['LBL_COMPLETED']?></a>
-                                <a href="" id="taskpending" onClick="fninvsh('taskcalAction');" class="calMnu">- <?php echo $mod_strings['LBL_DEFERRED']?></a>
+					<?php if(getFieldVisibilityPermission('Calendar',$current_user->id,'taskstatus') == '0') { ?>
+	                                	<a href="" id="taskcomplete" onClick="fninvsh('taskcalAction');" class="calMnu">- <?php echo $mod_strings['LBL_COMPLETED']?></a>
+        	                        	<a href="" id="taskpending" onClick="fninvsh('taskcalAction');" class="calMnu">- <?php echo $mod_strings['LBL_DEFERRED']?></a>
+					<?php } ?>		
+						
                                 <span style="border-top:1px dashed #CCCCCC;width:99%;display:block;"></span>
                                 <a href="" id="taskpostpone" onClick="fninvsh('taskcalAction');" class="calMnu">- <?php echo $mod_strings['LBL_POSTPONE']?></a>
                                 <a href="" id="taskchangeowner" onClick="fnvshobj(this,'act_changeowner'); fninvsh('taskcalAction');" class="calMnu">- <?php echo $mod_strings['LBL_CHANGEOWNER']?></a>





More information about the vtigercrm-commits mailing list