[Vtigercrm-commits] [vtiger-commits] r5283 - in /vtigercrm/trunk: Smarty/templates/FieldAccess.tpl modules/Users/DefaultFieldPermissions.php modules/Users/EditDefOrgFieldLevelAccess.php modules/Users/UpdateDefaultFieldLevelAccess.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon Apr 24 11:00:39 EDT 2006
Author: don
Date: Mon Apr 24 09:00:30 2006
New Revision: 5283
Log:
issue in DeforgFld Access has been fixed Ticket ID 692
Modified:
vtigercrm/trunk/Smarty/templates/FieldAccess.tpl
vtigercrm/trunk/modules/Users/DefaultFieldPermissions.php
vtigercrm/trunk/modules/Users/EditDefOrgFieldLevelAccess.php
vtigercrm/trunk/modules/Users/UpdateDefaultFieldLevelAccess.php
Modified: vtigercrm/trunk/Smarty/templates/FieldAccess.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/FieldAccess.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/FieldAccess.tpl Mon Apr 24 09:00:30 2006
@@ -19,6 +19,7 @@
<form action="index.php" method="post" name="new" id="form">
<input type="hidden" name="module" value="Users">
<input type="hidden" name="parenttab" value="Settings">
+ <input type="hidden" name="fld_module" id="fld_module">
{if $MODE neq 'view'}
<input type="hidden" name="action" value="UpdateDefaultFieldLevelAccess">
{else}
@@ -48,7 +49,11 @@
<select name="selectmodule" style="width: 200px; font-size: 10px;" onChange="changemodules(this)">
{foreach item=module from=$FIELD_INFO}
- <option>{$module}</option>
+ {if $module == $DEF_MODULE}
+ <option selected>{$module}</option>
+ {else}
+ <option>{$module}</option>
+ {/if}
{/foreach}
</select>
@@ -65,7 +70,7 @@
<td style="padding: 10px;" colspan="2">
{foreach key=module item=info from=$FIELD_LISTS}
- {if $module == 'Leads'}
+ {if $module == $DEF_MODULE}
<div id="{$module}_fields" style="display:block">
{else}
<div id="{$module}_fields" style="display:none">
@@ -127,13 +132,14 @@
</tr>
</table>
{include file='SettingsSubMenu.tpl'}
+<script>
+var def_field='{$DEF_MODULE}_fields';
{literal}
-<script>
-var def_field='Leads_fields';
function changemodules(selectmodule)
{
hide(def_field);
module=selectmodule.options[selectmodule.options.selectedIndex].value;
+ document.getElementById('fld_module').value = module;
def_field = module+"_fields";
show(def_field);
}
Modified: vtigercrm/trunk/modules/Users/DefaultFieldPermissions.php
==============================================================================
--- vtigercrm/trunk/modules/Users/DefaultFieldPermissions.php (original)
+++ vtigercrm/trunk/modules/Users/DefaultFieldPermissions.php Mon Apr 24 09:00:30 2006
@@ -22,7 +22,6 @@
$smarty = new vtigerCRM_Smarty;
-//echo get_module_title("Users", $_REQUEST['fld_module'].': '.$mod_strings['LBL_FIELD_LEVEL_ACCESS'], true);
global $adb;
global $theme;
@@ -40,6 +39,11 @@
$noofrows = $adb->num_rows($fieldListResult);
$allfields[$fld_module] = getStdOutput($fieldListResult, $noofrows, $mod_strings,$profileid);
}
+
+if($_REQUEST['fld_module'] != '')
+ $smarty->assign("DEF_MODULE",$_REQUEST['fld_module']);
+else
+ $smarty->assign("DEF_MODULE",'Leads');
//Standard PickList Fields
function getStdOutput($fieldListResult, $noofrows, $mod_strings,$profileid)
Modified: vtigercrm/trunk/modules/Users/EditDefOrgFieldLevelAccess.php
==============================================================================
--- vtigercrm/trunk/modules/Users/EditDefOrgFieldLevelAccess.php (original)
+++ vtigercrm/trunk/modules/Users/EditDefOrgFieldLevelAccess.php Mon Apr 24 09:00:30 2006
@@ -36,6 +36,12 @@
$noofrows = $adb->num_rows($fieldListResult);
$allfields[$fld_module] = getStdOutput($fieldListResult, $noofrows, $mod_strings,$profileid);
}
+
+if($_REQUEST['fld_module'] != '')
+ $smarty->assign("DEF_MODULE",$_REQUEST['fld_module']);
+else
+ $smarty->assign("DEF_MODULE",'Leads');
+
//Standard PickList Fields
function getStdOutput($fieldListResult, $noofrows, $mod_strings,$profileid)
{
Modified: vtigercrm/trunk/modules/Users/UpdateDefaultFieldLevelAccess.php
==============================================================================
--- vtigercrm/trunk/modules/Users/UpdateDefaultFieldLevelAccess.php (original)
+++ vtigercrm/trunk/modules/Users/UpdateDefaultFieldLevelAccess.php Mon Apr 24 09:00:30 2006
@@ -45,7 +45,7 @@
}
}
-$loc = "Location: index.php?action=DefaultFieldPermissions&module=Users&fld_module=".$fld_module;
+$loc = "Location: index.php?action=DefaultFieldPermissions&module=Users&fld_module=".$_REQUEST['fld_module'];
header($loc);
?>
More information about the vtigercrm-commits
mailing list