[Vtigercrm-commits] [vtiger-commits] r4339 - in /vtigercrm/trunk: Smarty/templates/OrgSharingDetailView.tpl modules/Users/CreateSharingRule.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon Mar 20 10:26:49 EST 2006
Author: saraj
Date: Mon Mar 20 08:26:38 2006
New Revision: 4339
Log:
edit for orgfield has been integrated
Modified:
vtigercrm/trunk/Smarty/templates/OrgSharingDetailView.tpl
vtigercrm/trunk/modules/Users/CreateSharingRule.php
Modified: vtigercrm/trunk/Smarty/templates/OrgSharingDetailView.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/OrgSharingDetailView.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/OrgSharingDetailView.tpl Mon Mar 20 08:26:38 2006
@@ -137,7 +137,7 @@
<img src="{$IMAGE_PATH}arrow.jpg" align="absmiddle">
<b>{$modulename}</b>
</td>
- <td align="right" colspan=2><input title="New" class="small" type="button" name="Create" value="Add Privileges" onClick="callEditDiv('{$modulename}')"></td>
+ <td align="right" colspan=2><input title="New" class="small" type="button" name="Create" value="Add Privileges" onClick="callEditDiv('{$modulename}','create','{$elements.0}')"></td>
</tr>
<tr>
<th class="lvtCol" nowrap width="9%">Rule No.</th>
@@ -152,7 +152,7 @@
<td>{$elements.1}</td>
<td>{$elements.2}</td>
<td>{$elements.3}</td>
- <td align="center"><a href="index.php?module=Users&action=DeleteSharingRule&shareid={$elements.0}"><img src="{$IMAGE_PATH}delete.gif" align="absmiddle" height="15" width="16" border=0></td>
+ <td align="center"><a href="javascript:onClick=callEditDiv('{$modulename}','edit','{$elements.0}')"><img src="{$IMAGE_PATH}editfield.gif" align="absmiddle" height="15" width="16" border=0></a>|<a href="index.php?module=Users&action=DeleteSharingRule&shareid={$elements.0}"><img src="{$IMAGE_PATH}delete.gif" align="absmiddle" height="15" width="16" border=0></a></td>
</tr>
{/foreach}
</tbody></table>
@@ -167,12 +167,12 @@
<img src="{$IMAGE_PATH}arrow.jpg" align="absmiddle">
<b>{$modulename}</b>
</td>
- <td align="right"><input title="New" class="small" type="button" name="Create" value="Add Privileges" onClick="callEditDiv('{$modulename}')"></td>
+ <td align="right"><input title="New" class="small" type="button" name="Create" value="Add Privileges" onClick="callEditDiv('{$modulename}','create','')"></td>
</tr>
<tr>
<td colspan="2" style="padding: 20px;" bgcolor="#ffffff" align="center">
No Custom Access Rules defined .
- <a href="javascript:onClick=callEditDiv('{$modulename}')">Click here</a>
+ <a href="javascript:onClick=callEditDiv('{$modulename}','create','')">Click here</a>
to create a new Rule
</td>
</tr>
@@ -217,11 +217,11 @@
document.getElementById("tempdiv").innerHTML=response.responseText;
{rdelim}
-function callEditDiv(modulename)
+function callEditDiv(modulename,mode,id)
{ldelim}
show("status");
var ajaxObj = new Ajax(ajaxSaveResponse);
- var urlstring = "module=Users&action=UsersAjax&orgajax=true&mode=create&sharing_module="+modulename;
+ var urlstring = "module=Users&action=UsersAjax&orgajax=true&mode="+mode+"&sharing_module="+modulename+"&shareid="+id;
ajaxObj.process("index.php?",urlstring);
{rdelim}
Modified: vtigercrm/trunk/modules/Users/CreateSharingRule.php
==============================================================================
--- vtigercrm/trunk/modules/Users/CreateSharingRule.php (original)
+++ vtigercrm/trunk/modules/Users/CreateSharingRule.php Mon Mar 20 08:26:38 2006
@@ -36,9 +36,9 @@
$combovalues .='<option value="groups::'.$groupid.'" selected>Group::'.$groupname.'</option>';
}
global $adb;
+ $mode = $_REQUEST['mode'];
if(isset($_REQUEST['shareid']) && $_REQUEST['shareid'] != '')
{
- $mode = 'edit';
$shareid=$_REQUEST['shareid'];
$shareInfo=getSharingRuleInfo($shareid);
$tabid=$shareInfo[1];
@@ -47,7 +47,6 @@
}
else
{
- $mode = 'create';
$sharing_module=$_REQUEST['sharing_module'];
$tabid=getTabid($sharing_module);
}
@@ -110,7 +109,7 @@
<table width="100%" border="0" cellpadding="3" cellspacing="0">
<tr>
<td class="genHeaderSmall" align="left" style="border-bottom:1px solid #CCCCCC;" width="60%">'.$sharing_module.' - Add Custom Privilege Rule</td>
- <td align="right" style="border-bottom:1px solid #CCCCCC;" width="40%"><a href="#" onClick="document.getElementById(\'orgLay\').style.display=\'none\'";>Close</a></td>
+ <td align="right" style="border-bottom:1px solid #CCCCCC;" width="40%"><a href="javascript:onClick=hide(\'orgLay\')";>Close</a></td>
</tr>
<tr><td colspan="2"> </td></tr>
More information about the vtigercrm-commits
mailing list