[Vtigercrm-commits] [vtiger-commits] r5517 - in /vtigercrm/trunk/Smarty/templates: ProfileDetailView.tpl RoleDetailView.tpl RoleEditView.tpl
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Thu Apr 27 19:02:14 EDT 2006
Author: don
Date: Thu Apr 27 17:02:08 2006
New Revision: 5517
Log:
fixed the UI issues
Modified:
vtigercrm/trunk/Smarty/templates/ProfileDetailView.tpl
vtigercrm/trunk/Smarty/templates/RoleDetailView.tpl
vtigercrm/trunk/Smarty/templates/RoleEditView.tpl
Modified: vtigercrm/trunk/Smarty/templates/ProfileDetailView.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/ProfileDetailView.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/ProfileDetailView.tpl Thu Apr 27 17:02:08 2006
@@ -1,477 +1,457 @@
-<script language="JavaScript" type="text/javascript" src="include/js/menu.js"></script>
-<style type="text/css">@import url(themes/blue/style.css);</style>
-<table width="100%" border="0" cellpadding="0" cellspacing="0">
-<tr>
- {include file='SettingsMenu.tpl'}
-<td width="75%" valign="top">
-
-<table width="100%" border="0" cellpadding="0" cellspacing="0" height="100%">
-<tr>
-<td class="showPanelBg" valign="top" width="100%" colspan="3" style="padding-left:20px; "><br />
-<span class="lvtHeaderText"><b><a href="index.php?module=Settings&action=index&parenttab=Settings">{$MOD.LBL_SETTINGS} </a> > {$MOD.LBL_USER_MANAGEMENT} > {$MOD.LBL_PROFILES}</b></span>
-<hr noshade="noshade" size="1" />
-</td>
-</tr>
-<tr>
-<td width="75%" style="padding-left:20px;" valign="top">
-
- <table width="75%" border="0" cellpadding="5" cellspacing="0" align="center">
- <tr>
- <td colspan="2" class="calDayHourCell">Details of Profile </td>
-
- </tr>
- <tr>
- <td>
- <table border="0" cellspacing="0" cellpadding="0" width="100%">
- <tr>
- <td><table border="0" cellspacing="0" cellpadding="0" width="100%">
- <tr class="small">
- <td><img src="{$IMAGE_PATH}prvPrfTopLeft.gif" /></td>
- <td class="prvPrfTopBg" width="100%" ></td>
-
- <td><img src="{$IMAGE_PATH}prvPrfTopRight.gif" /></td>
- </tr>
- </table>
- <form action="index.php" method="post" name="new" id="form">
- <input type="hidden" name="module" value="Users">
- <input type="hidden" name="action" value="profilePrivileges">
- <input type="hidden" name="parenttab" value="Settings">
- <input type="hidden" name="return_action" value="profilePrivileges">
- <input type="hidden" name="mode" value="edit">
- <input type="hidden" name="profileid" value="{$PROFILEID}">
-
- <table border="0" cellspacing="0" cellpadding= "0" width="100%" class="prvPrfOutline">
- <tr>
- <td>
- <!-- tabs -->
- <table border="0" cellspacing="0" cellpadding="5" width="100%" class="small">
- <tr>
- <td width="20%" id="prvPrfTab1" class="prvPrfSelectedTab" align="center" style="height:31px;" onClick="toggleshowhide('global_privileges','prvPrfTab1');">Global Privileges</td>
- <td width="20%" id="prvPrfTab2" class="prvPrfUnSelectedTab" align="center" onClick="toggleshowhide('tab_privileges','prvPrfTab2');">Tab Privileges</td>
- <td width="20%" id="prvPrfTab3" class="prvPrfUnSelectedTab" align="center" onClick="toggleshowhide('standard_privileges','prvPrfTab3');">Standard Privileges</td>
- <td width="20%" id="prvPrfTab4" class="prvPrfUnSelectedTab" align="center" onClick="toggleshowhide('field_privileges','prvPrfTab4');">Field Privileges</td>
- <td width="20%" id="prvPrfTab5" class="prvPrfUnSelectedTab" align="center" onClick="toggleshowhide('utility_privileges','prvPrfTab5');">Utilities</td>
- </tr>
- </table>
- <div id="global_privileges" style="display:block;">
- <!-- Headers -->
- <table border="0" cellspacing="0" cellpadding="5" width="100%" class="prvPrfBgImgGlobal">
- <tr>
- <td>
- <table border="0" cellspacing="0" cellpadding="5" width="100%" class="small">
- <tr>
- <td><!-- Module name heading -->
- <table border="0" cellspacing="0" cellpadding="2" class="small">
- <tr>
- <td valign="top"><img src="{$IMAGE_PATH}prvPrfHdrArrow.gif"/> </td>
-
- <td class="prvPrfBigText"><b> Global Privileges for "{$PROFILE_NAME}"</b> <br />
- <font class="small">Select the options below to change global privileges </font> </td>
- <td class="small" style="padding-left:10px" align="right"></td>
- </tr>
- </table></td>
- <td align="right" valign="bottom"><font class="small">2 enabled, 0 disabled</font> </td>
-
- </tr>
- </table>
- <!-- privilege lists -->
- <table border="0" cellspacing="0" cellpadding="0" width="100%" >
- <tr>
- <td align="center" style="height:10px"><img src="{$IMAGE_PATH}prvPrfLine.gif" style="width:100%;height:1px" /></td>
- </tr>
- </table>
- <table border="0" cellspacing="0" cellpadding="10" width="100%">
- <tr>
- <td >
- <table border="0" cellspacing="0" cellpadding="5" width="90%" class="small" align="center">
- <tr>
- <td class="prvPrfTexture" style="width:20px"> </td>
- <td width="97%" valign="top">
- <table border="0" cellspacing="0" cellpadding="2" width="100%" class="small">
- <tr id="gva">
- <td valign="top">{$GLOBAL_PRIV.0}</td>
- <td ><b>View all</b> </td>
- </tr>
- <tr >
- <td valign="top"></td>
- <td width="100%" >Allows "{$PROFILE_NAME}" to view all information / modules of vtiger CRM</td>
- </tr>
- <tr>
- <td> </td>
- </tr>
- <tr>
- <td valign="top">{$GLOBAL_PRIV.1}</td>
- <td ><b>Edit all</b> </td>
- </tr>
- <tr>
- <td valign="top"></td>
- <td > Allows "{$PROFILE_NAME}" to edit all information / modules of vtiger CRM</td>
- </tr>
- </table>
- </td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- </table>
- </div>
-
- <div id="standard_privileges" style="display:none;">
- <table border=0 cellspacing=0 cellpadding=5 width=100% >
- <tr>
- <td>
- <table border=0 cellspacing=0 cellpadding=5 width=100% class=small>
- <tr>
- <td>
- <!-- Module name heading -->
- <table border=0 cellspacing=0 cellpadding=2 class=small>
- <tr>
- <td valign=top >
- <img src="{$IMAGE_PATH}prvPrfHdrArrow.gif">
- </td>
- <td class="prvPrfBigText">
- <b> Standard Action Privileges for "{$PROFILE_NAME}"</b> <br>
- <font class=small>Select the standard actions to be permitted </font>
- </td>
- </tr>
- </table>
- </td>
- <td align=right valign=bottom>
-
- </td>
- </tr>
- </table>
- <!-- privilege lists -->
- <table border=0 cellspacing=0 cellpadding=0 width=100% >
- <tr>
- <td align=center style="height:10px"><img src="{$IMAGE_PATH}prvPrfLine.gif" style="width:100%;height:1px"></td>
- </tr>
- </table>
- <table border=0 cellspacing=0 cellpadding=10 width=100%>
- <tr>
- <td >
- <table border=0 cellspacing=0 cellpadding=5 width=90% class=small align=center >
- <tr>
- <td class="prvPrfTexture" style="width:20px"> </td>
- <td width=97% valign=top onMouseOver="this.className='prvPrfHoverOn'" onMouseOut="this.className='prvPrfHoverOff'" >
- <table border=0 cellspacing=0 cellpadding=5 width=100% class=small>
-
- <tr>
- <td>Entity</td>
- <td>Create/Edit</td>
- <td>Delete</td>
- <td>View</td>
- </tr>
-
- {foreach item=value from=$STANDARD_PRIV}
- <tr>
- {foreach item=element from=$value}
- <td>{$element}</td>
- {/foreach}
- </tr>
- {/foreach}
-
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </div>
-
- <div id="tab_privileges" style="display:none;">
- <table border=0 cellspacing=0 cellpadding=5 width=100% >
- <tr>
- <td>
- <table border=0 cellspacing=0 cellpadding=5 width=100% class=small>
- <tr>
- <td>
- <!-- Module name heading -->
- <table border=0 cellspacing=0 cellpadding=2 class=small>
- <tr>
- <td valign=top >
- <img src="{$IMAGE_PATH}prvPrfHdrArrow.gif">
- </td>
- <td class="prvPrfBigText">
- <b> Tab Privileges for "{$PROFILE_NAME}"</b> <br>
- <font class=small>Select the tabs/modules to be permitted </font>
- </td>
- </tr>
- </table>
- </td>
- <td align=right valign=bottom>
-
- </td>
- </tr>
- </table>
- <!-- privilege lists -->
- <table border=0 cellspacing=0 cellpadding=0 width=100% >
- <tr>
- <td align=center style="height:10px"><img src="{$IMAGE_PATH}prvPrfLine.gif" style="width:100%;height:1px"></td>
- </tr>
- </table>
- <table border=0 cellspacing=0 cellpadding=10 width=100%>
- <tr>
- <td >
- <!-- Home tab -->
- <table border=0 cellspacing=0 cellpadding=5 width=90% class=small align=center >
- <tr>
- <td class="prvPrfTexture" style="width:20px"> </td>
- <td width=97% valign=top onMouseOver="this.className='prvPrfHoverOn'" onMouseOut="this.className='prvPrfHoverOff'" >
- <table border=0 cellspacing=0 cellpadding=5 width=100% class=small>
-
-
- {foreach item=value from=$TAB_PRIV}
- <tr>
- {foreach item=element from=$value}
- <td width=35%>{$element.0}</td>
- <td width=15%>{$element.1}</td>
- {/foreach}
- </tr>
- {/foreach}
-
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
-
- </table>
- </div>
-
- <div id="utility_privileges" style="display:none;">
- <table border=0 cellspacing=0 cellpadding=5 width=100% >
- <tr>
- <td>
- <table border=0 cellspacing=0 cellpadding=5 width=100% class=small>
- <tr>
- <td>
- <!-- Module name heading -->
- <table border=0 cellspacing=0 cellpadding=2 class=small>
- <tr>
- <td valign=top >
- <img src="{$IMAGE_PATH}prvPrfHdrArrow.gif">
- </td>
- <td class="prvPrfBigText">
- <b> Utility Action Privileges for "{$PROFILE_NAME}"</b> <br>
- <font class=small>Select the utility actions to be permitted </font>
- </td>
- </tr>
- </table>
- </td>
- <td align=right valign=bottom>
-
- </td>
- </tr>
- </table>
- <!-- privilege lists -->
- <table border=0 cellspacing=0 cellpadding=0 width=100% >
- <tr>
- <td align=center style="height:10px"><img src="{$IMAGE_PATH}prvPrfLine.gif" style="width:100%;height:1px"></td>
- </tr>
- </table>
- <table border=0 cellspacing=0 cellpadding=10 width=100%>
- <tr>
- <td >
- <!-- Home tab -->
- <table border="0" cellspacing="0" cellpadding="5" width="90%" class="small" align="center" >
-
- {foreach key=module item=value from=$UTILITIES_PRIV}
- <tr>
- <td colspan="4" style="border-bottom:1px solid #efefef"><b>{$module}</b></td>
- </tr>
- <tr>
- <td class="prvPrfTexture" style="width:20px"> </td>
- <td width="97%" valign="top" onmouseover="this.className='prvPrfHoverOn'" onmouseout="this.className='prvPrfHoverOff'" >
- <table border="0" cellspacing="0" cellpadding="5" width="100%" class="small">
- {foreach item=element from=$value}
- <tr>
- <td width=25%>{$element.0.0}</td>
- <td width=25%>{$element.0.1}</td>
- <td width=25%>{$element.1.0}</td>
- <td width=25%>{$element.1.1}</td>
- {/foreach}
- </tr>
- </table>
- </td>
- </tr>
-
- {/foreach}
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
-
- </table>
-
- </div>
-
-
- <div id="field_privileges" style="display:none;">
- <table border="0" cellspacing="0" cellpadding="5" width="100%" >
- <tr>
- <td><table border="0" cellspacing="0" cellpadding="5" width="100%" class="small">
- <tr>
- <td><!-- Module name heading -->
- <table border="0" cellspacing="0" cellpadding="2" class="small">
- <tr>
- <td valign="top" ><img src="{$IMAGE_PATH}prvPrfHdrArrow.gif" /> </td>
-
- <td class="prvPrfBigText"><b> Field Privileges for "{$PROFILE_NAME}"</b> <br />
- <font class="small">Select the fields to be permitted </font> </td>
- </tr>
- </table></td>
- <td align="right" valign="bottom">
- </td>
- </tr>
- </table>
- <!-- privilege lists -->
- <table border="0" cellspacing="0" cellpadding="0" width="100%" >
- <tr>
- <td align="center" style="height:10px"><img src="{$IMAGE_PATH}prvPrfLine.gif" style="width:100%;height:1px" /></td>
- </tr>
-
- </table>
- <table border="0" cellspacing="0" cellpadding="10" width="100%">
- <tr>
- <td >
- <table border="0" cellspacing="0" cellpadding="5" width="100%" class="small">
- <tr>
- <td>
- <select name="module_list" onchange="showmoduleperm(this)">
- {foreach key=module item=label from=$PRI_FIELD_LIST}
- <option value="{$label}">{$label}</option>
- {/foreach}
- </td>
- <td width=50%> </td>
- </tr>
- <tr>
- <td colspan=2>
-
- {foreach key=module item=value from=$FIELD_PRIVILEGES}
- {if $module eq 'Leads'}
- <div id="field_{$module}" style="display:block;">
- {else}
- <div id="field_{$module}" style="display:none;">
- {/if}
- <table border="0" cellspacing="0" cellpadding="5" width="100%" class="small">
- {foreach item=row_value from=$value}
- <tr>
- {foreach item=element from=$row_value}
- <td>{$element.0}</td>
- <td>{$element.1}</td>
- {/foreach}
- </tr>
- {/foreach}
- </table>
- </div>
- {/foreach}
-
- </td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- </table>
- </div>
-
- </td>
-
- </tr>
- </table>
- <table border="0" cellspacing="0" cellpadding="0" width="100%" class="small">
- <tr>
- <td><img src="{$IMAGE_PATH}prvPrfBottomLeft.gif" /></td>
- <td class="prvPrfBottomBg" width="100%"></td>
- <td><img src="{$IMAGE_PATH}prvPrfBottomRight.gif" /></td>
- </tr>
- </table></td>
-
- </tr>
- </table></td>
- </tr>
- <tr><td colspan="2" style="border-bottom:1px dashed #CCCCCC;"> </td></tr>
- <tr><td colspan="2"> </td></tr>
- <tr>
- <td colspan="2" align="center">
- <input type="submit" value=" Edit " name="edit"/>
- { if $PROFILEID != 1 && $PROFILEID != 2 && $PROFILEID != 3 && $PROFILEID != 4 }
-
- <input type="button" value=" Delete " name="Delete" onClick="DeleteProfile('{$PROFILEID}')"/>
- {/if}
- <input type="button" value=" Cancel " name="Cancel" onClick="window.history.back();"/>
-
- </td>
- </tr>
- <tr><td colspan="2"> </td></tr>
- <tr><td colspan="2" style="border-top:1px solid #CCCCCC;"> </td></tr>
- </table>
-
-</td>
-<td width="1%" style="border-right:1px dotted #CCCCCC;"> </td>
-</tr>
-</table>
-</td>
-</tr>
-</table>
-</td>
-</tr>
-</table>
-<div id="tempdiv" style="display:block;position:absolute;left:350px;top:200px;"></div>
-<div id="status" style="display:none;position:absolute;background-color:#bbbbbb;vertical-align:center;left:887px;top:0px;height:17px;">Processing Request...</div>
- {include file='SettingsSubMenu.tpl'}
-
-<script>
-function ajaxSaveResponse(response)
-{ldelim}
- hide("status");
- document.getElementById("tempdiv").innerHTML=response.responseText;
-{rdelim}
-
-function DeleteProfile(profileid)
-{ldelim}
- show("status");
- var ajaxObj = new Ajax(ajaxSaveResponse);
- var urlstring = "module=Users&action=UsersAjax&file=ProfileDeleteStep1&profileid="+profileid;
- ajaxObj.process("index.php?",urlstring);
-{rdelim}
-</script>
-
-<script language="javascript" type="text/javascript">
-var Selected_div= 'global_privileges';
-divarray = new Array('global_privileges','tab_privileges','standard_privileges','field_privileges','utility_privileges');
-tabarray = new Array('prvPrfTab1','prvPrfTab2','prvPrfTab3','prvPrfTab4','prvPrfTab5');
-var defaultmodule = 'field_Leads';
-function toggleshowhide(currentselecteddiv,currentselectedtab)
-{ldelim}
- for(i = 0; i < divarray.length ;i++)
- {ldelim}
- if(Selected_div == divarray[i])
- break;
- {rdelim}
- hide (Selected_div);
- document.getElementById(tabarray[i]).className="prvPrfUnSelectedTab";
- show (currentselecteddiv);
- document.getElementById(currentselectedtab).className="prvPrfSelectedTab";
- Selected_div = currentselecteddiv;
-{rdelim}
-function showmoduleperm(selectmodule_view)
-{ldelim}
- hide(defaultmodule);
- defaultmodule='field_'+selectmodule_view.options[selectmodule_view.options.selectedIndex].value;
- show(defaultmodule);
-{rdelim}
-
-</script>
+<script language="JavaScript" type="text/javascript" src="include/js/menu.js"></script>
+<style type="text/css">@import url(themes/blue/style.css);</style>
+<table width="100%" border="0" cellpadding="0" cellspacing="0">
+<tr>
+ {include file='SettingsMenu.tpl'}
+<td width="75%" valign="top">
+
+<table width="100%" border="0" cellpadding="0" cellspacing="0" height="100%">
+<tr>
+<td class="showPanelBg" valign="top" width="100%" colspan="3" style="padding-left:20px; "><br />
+<span class="lvtHeaderText"><b><a href="index.php?module=Settings&action=index&parenttab=Settings">{$MOD.LBL_SETTINGS} </a> > {$MOD.LBL_USER_MANAGEMENT} > {$MOD.LBL_PROFILES}</b></span>
+<hr noshade="noshade" size="1" />
+</td>
+</tr>
+<tr>
+<td width="75%" style="padding-left:20px;" valign="top">
+
+ <table width="75%" border="0" cellpadding="5" cellspacing="0" align="center">
+ <tr>
+ <td width="5%" style="border-bottom:1px dashed #CCCCCC;">
+ <img src="{$IMAGE_PATH}profile.gif" align="absmiddle">
+ </td>
+ <td style="border-bottom:1px dashed #CCCCCC;">
+ <span class="genHeaderGrayBig">Detail View of Profile</span><br>
+ <span class="genHeaderSmall">{$PROFILE_NAME}</span>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><table border="0" cellspacing="0" cellpadding="0" width="100%">
+ <tr class="small">
+ <td><img src="{$IMAGE_PATH}prvPrfTopLeft.gif" /></td>
+ <td class="prvPrfTopBg" width="100%" ></td>
+
+ <td><img src="{$IMAGE_PATH}prvPrfTopRight.gif" /></td>
+ </tr>
+ </table>
+ <form action="index.php" method="post" name="new" id="form">
+ <input type="hidden" name="module" value="Users">
+ <input type="hidden" name="action" value="profilePrivileges">
+ <input type="hidden" name="parenttab" value="Settings">
+ <input type="hidden" name="return_action" value="profilePrivileges">
+ <input type="hidden" name="mode" value="edit">
+ <input type="hidden" name="profileid" value="{$PROFILEID}">
+
+ <table border="0" cellspacing="0" cellpadding= "0" width="100%" class="prvPrfOutline">
+ <tr>
+ <td>
+ <!-- tabs -->
+ <table border="0" cellspacing="0" cellpadding="5" width="100%" class="small">
+ <tr>
+ <td width="20%" id="prvPrfTab1" class="prvPrfSelectedTab" align="center" style="height:31px;" onClick="toggleshowhide('global_privileges','prvPrfTab1');">Global Privileges</td>
+ <td width="20%" id="prvPrfTab2" class="prvPrfUnSelectedTab" align="center" onClick="toggleshowhide('tab_privileges','prvPrfTab2');">Tab Privileges</td>
+ <td width="20%" id="prvPrfTab3" class="prvPrfUnSelectedTab" align="center" onClick="toggleshowhide('standard_privileges','prvPrfTab3');">Standard Privileges</td>
+ <td width="20%" id="prvPrfTab4" class="prvPrfUnSelectedTab" align="center" onClick="toggleshowhide('field_privileges','prvPrfTab4');">Field Privileges</td>
+ <td width="20%" id="prvPrfTab5" class="prvPrfUnSelectedTab" align="center" onClick="toggleshowhide('utility_privileges','prvPrfTab5');">Utilities</td>
+ </tr>
+ </table>
+ <div id="global_privileges" style="display:block;">
+ <!-- Headers -->
+ <table border="0" cellspacing="0" cellpadding="5" width="100%" class="prvPrfBgImgGlobal">
+ <tr>
+ <td>
+ <table border="0" cellspacing="0" cellpadding="5" width="100%" class="small">
+ <tr>
+ <td><!-- Module name heading -->
+ <table border="0" cellspacing="0" cellpadding="2" class="small">
+ <tr>
+ <td valign="top"><img src="{$IMAGE_PATH}prvPrfHdrArrow.gif"/> </td>
+
+ <td class="prvPrfBigText"><b> Global Privileges for "{$PROFILE_NAME}"</b> <br />
+ <font class="small">Select the options below to change global privileges </font> </td>
+ <td class="small" style="padding-left:10px" align="right"></td>
+ </tr>
+ </table></td>
+ <td align="right" valign="bottom"> </td>
+
+ </tr>
+ </table>
+ <!-- privilege lists -->
+ <table border="0" cellspacing="0" cellpadding="0" width="100%" >
+ <tr>
+ <td align="center" style="height:10px"><img src="{$IMAGE_PATH}prvPrfLine.gif" style="width:100%;height:1px" /></td>
+ </tr>
+ </table>
+ <table border="0" cellspacing="0" cellpadding="10" width="100%">
+ <tr>
+ <td >
+ <table border="0" cellspacing="0" cellpadding="5" width="90%" class="small" align="center">
+ <tr>
+ <td class="prvPrfTexture" style="width:20px"> </td>
+ <td width="97%" valign="top">
+ <table border="0" cellspacing="0" cellpadding="2" width="100%" class="small">
+ <tr id="gva">
+ <td valign="top">{$GLOBAL_PRIV.0}</td>
+ <td ><b>View all</b> </td>
+ </tr>
+ <tr >
+ <td valign="top"></td>
+ <td width="100%" >Allows "{$PROFILE_NAME}" to view all information / modules of vtiger CRM</td>
+ </tr>
+ <tr>
+ <td> </td>
+ </tr>
+ <tr>
+ <td valign="top">{$GLOBAL_PRIV.1}</td>
+ <td ><b>Edit all</b> </td>
+ </tr>
+ <tr>
+ <td valign="top"></td>
+ <td > Allows "{$PROFILE_NAME}" to edit all information / modules of vtiger CRM</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table></td>
+ </tr>
+ </table></td>
+ </tr>
+ </table>
+ </div>
+
+ <div id="standard_privileges" style="display:none;">
+ <table border=0 cellspacing=0 cellpadding=5 width=100% >
+ <tr>
+ <td>
+ <table border=0 cellspacing=0 cellpadding=5 width=100% class=small>
+ <tr>
+ <td>
+ <!-- Module name heading -->
+ <table border=0 cellspacing=0 cellpadding=2 class=small>
+ <tr>
+ <td valign=top >
+ <img src="{$IMAGE_PATH}prvPrfHdrArrow.gif">
+ </td>
+ <td class="prvPrfBigText">
+ <b> Standard Action Privileges for "{$PROFILE_NAME}"</b> <br>
+ <font class=small>Select the standard actions to be permitted </font>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td align=right valign=bottom>
+
+ </td>
+ </tr>
+ </table>
+ <!-- privilege lists -->
+ <table border=0 cellspacing=0 cellpadding=0 width=100% >
+ <tr>
+ <td align=center style="height:10px"><img src="{$IMAGE_PATH}prvPrfLine.gif" style="width:100%;height:1px"></td>
+ </tr>
+ </table>
+ <table border=0 cellspacing=0 cellpadding=10 width=100%>
+ <tr>
+ <td >
+ <table border=0 cellspacing=0 cellpadding=5 width=90% class=small align=center >
+ <tr>
+ <td class="prvPrfTexture" style="width:20px"> </td>
+ <td width=97% valign=top onMouseOver="this.className='prvPrfHoverOn'" onMouseOut="this.className='prvPrfHoverOff'" >
+ <table border=0 cellspacing=0 cellpadding=5 width=100% class=small>
+
+ <tr>
+ <td>Entity</td>
+ <td>Create/Edit</td>
+ <td>Delete</td>
+ <td>View</td>
+ </tr>
+
+ {foreach item=value from=$STANDARD_PRIV}
+ <tr>
+ {foreach item=element from=$value}
+ <td>{$element}</td>
+ {/foreach}
+ </tr>
+ {/foreach}
+
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </div>
+
+ <div id="tab_privileges" style="display:none;">
+ <table border=0 cellspacing=0 cellpadding=5 width=100% >
+ <tr>
+ <td>
+ <table border=0 cellspacing=0 cellpadding=5 width=100% class=small>
+ <tr>
+ <td>
+ <!-- Module name heading -->
+ <table border=0 cellspacing=0 cellpadding=2 class=small>
+ <tr>
+ <td valign=top >
+ <img src="{$IMAGE_PATH}prvPrfHdrArrow.gif">
+ </td>
+ <td class="prvPrfBigText">
+ <b> Tab Privileges for "{$PROFILE_NAME}"</b> <br>
+ <font class=small>Select the tabs/modules to be permitted </font>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td align=right valign=bottom>
+
+ </td>
+ </tr>
+ </table>
+ <!-- privilege lists -->
+ <table border=0 cellspacing=0 cellpadding=0 width=100% >
+ <tr>
+ <td align=center style="height:10px"><img src="{$IMAGE_PATH}prvPrfLine.gif" style="width:100%;height:1px"></td>
+ </tr>
+ </table>
+ <table border=0 cellspacing=0 cellpadding=10 width=100%>
+ <tr>
+ <td >
+ <!-- Home tab -->
+ <table border=0 cellspacing=0 cellpadding=5 width=90% class=small align=center >
+ <tr>
+ <td class="prvPrfTexture" style="width:20px"> </td>
+ <td width=97% valign=top onMouseOver="this.className='prvPrfHoverOn'" onMouseOut="this.className='prvPrfHoverOff'" >
+ <table border=0 cellspacing=0 cellpadding=5 width=100% class=small>
+
+
+ {foreach item=value from=$TAB_PRIV}
+ <tr>
+ {foreach item=element from=$value}
+ <td width=35%>{$element.0}</td>
+ <td width=15%>{$element.1}</td>
+ {/foreach}
+ </tr>
+ {/foreach}
+
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ </table>
+ </div>
+
+ <div id="utility_privileges" style="display:none;">
+ <table border=0 cellspacing=0 cellpadding=5 width=100% >
+ <tr>
+ <td>
+ <table border=0 cellspacing=0 cellpadding=5 width=100% class=small>
+ <tr>
+ <td>
+ <!-- Module name heading -->
+ <table border=0 cellspacing=0 cellpadding=2 class=small>
+ <tr>
+ <td valign=top >
+ <img src="{$IMAGE_PATH}prvPrfHdrArrow.gif">
+ </td>
+ <td class="prvPrfBigText">
+ <b> Utility Action Privileges for "{$PROFILE_NAME}"</b> <br>
+ <font class=small>Select the utility actions to be permitted </font>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td align=right valign=bottom>
+
+ </td>
+ </tr>
+ </table>
+ <!-- privilege lists -->
+ <table border=0 cellspacing=0 cellpadding=0 width=100% >
+ <tr>
+ <td align=center style="height:10px"><img src="{$IMAGE_PATH}prvPrfLine.gif" style="width:100%;height:1px"></td>
+ </tr>
+ </table>
+ <table border=0 cellspacing=0 cellpadding=10 width=100%>
+ <tr>
+ <td >
+ <!-- Home tab -->
+ <table border="0" cellspacing="0" cellpadding="5" width="90%" class="small" align="center" >
+
+ {foreach key=module item=value from=$UTILITIES_PRIV}
+ <tr>
+ <td colspan="4" style="border-bottom:1px solid #efefef"><b>{$module}</b></td>
+ </tr>
+ <tr>
+ <td class="prvPrfTexture" style="width:20px"> </td>
+ <td width="97%" valign="top" onmouseover="this.className='prvPrfHoverOn'" onmouseout="this.className='prvPrfHoverOff'" >
+ <table border="0" cellspacing="0" cellpadding="5" width="100%" class="small">
+ {foreach item=element from=$value}
+ <tr>
+ <td width=25%>{$element.0.0}</td>
+ <td width=25%>{$element.0.1}</td>
+ <td width=25%>{$element.1.0}</td>
+ <td width=25%>{$element.1.1}</td>
+ {/foreach}
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ {/foreach}
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ </table>
+
+ </div>
+
+
+ <div id="field_privileges" style="display:none;">
+ <table border="0" cellspacing="0" cellpadding="5" width="100%" >
+ <tr>
+ <td><table border="0" cellspacing="0" cellpadding="5" width="100%" class="small">
+ <tr>
+ <td><!-- Module name heading -->
+ <table border="0" cellspacing="0" cellpadding="2" class="small">
+ <tr>
+ <td valign="top" ><img src="{$IMAGE_PATH}prvPrfHdrArrow.gif" /> </td>
+
+ <td class="prvPrfBigText"><b> Field Privileges for "{$PROFILE_NAME}"</b> <br />
+ <font class="small">Select the fields to be permitted </font> </td>
+ </tr>
+ </table></td>
+ <td align="right" valign="bottom">
+ </td>
+ </tr>
+ </table>
+ <!-- privilege lists -->
+ <table border="0" cellspacing="0" cellpadding="0" width="100%" >
+ <tr>
+ <td align="center" style="height:10px"><img src="{$IMAGE_PATH}prvPrfLine.gif" style="width:100%;height:1px" /></td>
+ </tr>
+
+ </table>
+ <table border="0" cellspacing="0" cellpadding="10" width="100%">
+ <tr>
+ <td >
+ <table border="0" cellspacing="0" cellpadding="5" width="100%" class="small">
+ <tr>
+ <td>
+ <select name="module_list" onchange="showmoduleperm(this)">
+ {foreach key=module item=label from=$PRI_FIELD_LIST}
+ <option value="{$label}">{$label}</option>
+ {/foreach}
+ </td>
+ <td width=50%> </td>
+ </tr>
+ <tr>
+ <td colspan=2>
+
+ {foreach key=module item=value from=$FIELD_PRIVILEGES}
+ {if $module eq 'Leads'}
+ <div id="field_{$module}" style="display:block;">
+ {else}
+ <div id="field_{$module}" style="display:none;">
+ {/if}
+ <table border="0" cellspacing="0" cellpadding="5" width="100%" class="small">
+ {foreach item=row_value from=$value}
+ <tr>
+ {foreach item=element from=$row_value}
+ <td>{$element.0}</td>
+ <td>{$element.1}</td>
+ {/foreach}
+ </tr>
+ {/foreach}
+ </table>
+ </div>
+ {/foreach}
+
+ </td>
+ </tr>
+ </table></td>
+ </tr>
+ </table></td>
+ </tr>
+ </table>
+ </div>
+
+ </td>
+
+ </tr>
+ </table>
+ <table border="0" cellspacing="0" cellpadding="0" width="100%" class="small">
+ <tr>
+ <td><img src="{$IMAGE_PATH}prvPrfBottomLeft.gif" /></td>
+ <td class="prvPrfBottomBg" width="100%"></td>
+ <td><img src="{$IMAGE_PATH}prvPrfBottomRight.gif" /></td>
+ </tr>
+ </table></td>
+
+ </tr>
+ </table></td>
+ </tr>
+ <tr><td colspan="2" style="border-bottom:1px dashed #CCCCCC;"> </td></tr>
+ <tr><td colspan="2"> </td></tr>
+ <tr>
+ <td colspan="2" align="center">
+ <input type="submit" value=" Edit " name="edit" class="classBtn"/>
+ <input type="button" value=" Cancel " name="Cancel" onClick="window.history.back();" class="classBtn"/>
+
+ </td>
+ </tr>
+ <tr><td colspan="2"> </td></tr>
+ <tr><td colspan="2" style="border-top:1px solid #CCCCCC;"> </td></tr>
+ </table>
+
+</td>
+<td width="1%" style="border-right:1px dotted #CCCCCC;"> </td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+ {include file='SettingsSubMenu.tpl'}
+
+<script language="javascript" type="text/javascript">
+var Selected_div= 'global_privileges';
+divarray = new Array('global_privileges','tab_privileges','standard_privileges','field_privileges','utility_privileges');
+tabarray = new Array('prvPrfTab1','prvPrfTab2','prvPrfTab3','prvPrfTab4','prvPrfTab5');
+var defaultmodule = 'field_Leads';
+function toggleshowhide(currentselecteddiv,currentselectedtab)
+{ldelim}
+ for(i = 0; i < divarray.length ;i++)
+ {ldelim}
+ if(Selected_div == divarray[i])
+ break;
+ {rdelim}
+ hide (Selected_div);
+ document.getElementById(tabarray[i]).className="prvPrfUnSelectedTab";
+ show (currentselecteddiv);
+ document.getElementById(currentselectedtab).className="prvPrfSelectedTab";
+ Selected_div = currentselecteddiv;
+{rdelim}
+function showmoduleperm(selectmodule_view)
+{ldelim}
+ hide(defaultmodule);
+ defaultmodule='field_'+selectmodule_view.options[selectmodule_view.options.selectedIndex].value;
+ show(defaultmodule);
+{rdelim}
+
+</script>
Modified: vtigercrm/trunk/Smarty/templates/RoleDetailView.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/RoleDetailView.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/RoleDetailView.tpl Thu Apr 27 17:02:08 2006
@@ -1,118 +1,116 @@
-<script language="JavaScript" type="text/javascript" src="include/js/menu.js"></script>
-<style type="text/css">@import url(themes/blue/style.css);</style>
-
-<table width="100%" border="0" cellpadding="0" cellspacing="0">
-<tr>
- {include file='SettingsMenu.tpl'}
-<td width="75%" valign="top">
-
-<form id="form" name="new" action="index.php" method="post">
-<input type="hidden" name="module" value="Users">
-<input type="hidden" name="action" value="createrole">
-<input type="hidden" name="parenttab" value="Settings">
-<input type="hidden" name="returnaction" value="RoleDetailView">
-<input type="hidden" name="roleid" value="{$ROLEID}">
-<input type="hidden" name="mode" value="edit">
-
-<table width="100%" border="0" cellpadding="0" cellspacing="0" height="100%">
-<tr>
-<td class="showPanelBg" valign="top" width="100%" colspan="3" style="padding-left:20px; "><br />
-<span class="lvtHeaderText"><b><a href="index.php?module=Settings&action=index&parenttab=Settings">{$MOD.LBL_SETTINGS} </a> > {$MOD.LBL_USER_MANAGEMENT} > {$CMOD.LBL_CREATE_NEW_GROUP}</b></span>
-<hr noshade="noshade" size="1"/>
-</td>
-</tr>
-<tr>
-<td width="75%" style="padding-left:20px;" valign="top">
-
- <table align="center" border="0" cellpadding="5" cellspacing="0" width="75%">
- <tbody><tr>
- <td colspan="2" style="border-bottom: 1px dashed rgb(204, 204, 204);"> </td>
- </tr>
- <tr>
- <td style="border-bottom: 1px dashed rgb(204, 204, 204); padding-right: 10px;" align="left" width="30%"><b>{$ROLE_NAME}</b></td>
- <td style="border-bottom: 1px dashed rgb(204, 204, 204);" align="right" width="70%">
- <input title="Edit" accessKey="C" class="small" onclick="this.form.action.value=\'createrole\'" type="submit" name="Edit" value="Edit Role"> <input title="Delete" accessKey="D" class="small" onclick="DeleteRole('{$ROLEID}')" type="button" name="Delete" value="Delete Role">
- </td>
- </tr>
- <tr>
- <td style="padding-right: 10px;" align="right"> </td>
- <td> </td>
- </tr>
- <tr>
- <td colspan="2" style="border-bottom: 1px solid rgb(204, 204, 204); padding-right: 10px;" align="right" valign="top">
- <div style="overflow: auto; position: relative; left: 10px; top: 0px; width: 100%; height: 225px; text-align: left;">
- <table border="0" cellpadding="0" cellspacing="0" width="100%">
- <tbody>
-
- <tr>
- <td align="right" valign="top" width="30%"><b>Associated Users :</b></td>
- <td align="left" valign="top" width="70%">
- <ul style="list-style-type: none;">
- {foreach item=elements from=$ROLEINFO.userinfo}
- <li><a href="index.php?module=Users&action=DetailView&record={$elements.0}">{$elements.1}</a></li>
- {/foreach}
- </ul>
- </td>
- </tr>
-
- <tr>
- <td align="right" valign="top" width="30%"><b>Associated profiles :</b></td>
- <td align="left" valign="top" width="70%">
- <ul style="list-style-type: none;">
- {foreach item=elements from=$ROLEINFO.profileinfo}
- <li><a href="index.php?module=Users&action=profilePrivileges&profileid={$elements.0}&mode=view">{$elements.1}</a></li>
- {/foreach}
- </ul>
- </td>
- </tr>
-
- </tbody>
- </table>
- </div>
- </td>
-
- </tr>
- <tr>
- <td colspan="2" style="border-top: 1px solid rgb(204, 204, 204);" align="center">
- <input title="Cancel" accessKey="C" class="small" onclick="window.history.back()" type="button" name="Cancel" value=" ‹ Back">
- </td>
- </tr>
- </tbody></table>
-
-</td>
-<td colspan="2"> </td>
-</tr>
-</table>
-</form>
-</td>
-
-</tr>
-</table>
-</td>
-<td width="1%" style="border-right:1px dotted #CCCCCC;"> </td>
-</tr>
-</table>
-</td>
-</tr>
-</table>
-</td>
-</tr>
-</table>
-
- {include file='SettingsSubMenu.tpl'}
-<div id="tempdiv" style="display:block;position:absolute;left:350px;top:200px;"></div>
-<script>
- function DeleteRole(roleid)
- {ldelim}
- //show("an_busy");
- var ajaxObj = new Ajax(ajaxSaveResponse);
- var urlstring = "module=Users&action=UsersAjax&file=RoleDeleteStep1&roleid="+roleid;
- ajaxObj.process("index.php?",urlstring);
- {rdelim}
-
- function ajaxSaveResponse(response)
- {ldelim}
- document.getElementById("tempdiv").innerHTML=response.responseText;
- {rdelim}
-</script>
-
+<script language="JavaScript" type="text/javascript" src="include/js/menu.js"></script>
+<style type="text/css">@import url(themes/blue/style.css);</style>
+
+<table width="100%" border="0" cellpadding="0" cellspacing="0">
+<tr>
+ {include file='SettingsMenu.tpl'}
+<td width="75%" valign="top">
+
+<form id="form" name="new" action="index.php" method="post">
+<input type="hidden" name="module" value="Users">
+<input type="hidden" name="action" value="createrole">
+<input type="hidden" name="parenttab" value="Settings">
+<input type="hidden" name="returnaction" value="RoleDetailView">
+<input type="hidden" name="roleid" value="{$ROLEID}">
+<input type="hidden" name="mode" value="edit">
+
+<table width="100%" border="0" cellpadding="0" cellspacing="0" height="100%">
+ <tr>
+ <td class="showPanelBg" valign="top" width="95%" style="padding-left:20px; "><br />
+ <span class="lvtHeaderText"><b><a href="index.php?module=Settings&action=index&parenttab=Settings">{$MOD.LBL_SETTINGS} </a> > {$MOD.LBL_USER_MANAGEMENT} > Role of {$ROLE_NAME} </b></span>
+ <hr noshade="noshade" size="1" />
+ </td>
+ </tr>
+ <tr><td> </td></tr>
+ <tr>
+ <td width="95%" style="padding-left:20px;" valign="top"> <table width="95%" cellpadding="5" cellspacing="0" class="leadTable" align="center">
+ <tr>
+ <td style="padding:5px;border-bottom:2px dotted #CCCCCC;" width="5%" ><img src="{$IMAGE_PATH}roles.gif" align="absmiddle" /> </td>
+ <td style="padding:5px;border-bottom:2px dotted #AAAAAA;"><span class="genHeaderGrayBig">{$ROLE_NAME} Role</span><br />
+ <span class="big">Detail view of {$ROLE_NAME} Role</span> </td>
+ </tr>
+ <tr><td colspan="2"> </td></tr>
+ <tr>
+ <td colspan="2" >
+ <table width="100%" cellpadding="5" cellspacing="0" border="0" >
+ <tr>
+ <td colspan="4" class="detailedViewHeader"><b>Group Details</b></td>
+ </tr>
+ <tr>
+ <td class="dvtCellLabel" width="5%"> </td>
+ <td class="dvtCellLabel" align="right" width="25%"><b>Role Name :</b></td>
+ <td class="dvtCellInfo" align="left" width="25%">{$ROLE_NAME}</td>
+ <td class="dvtCellInfo" width="45%"> </td>
+ </tr>
+ <tr><td colspan="4" class="dvtCellInfo"> </td></tr>
+ <tr>
+ <td colspan="4" class="detailedViewHeader"><b>Member List</b></td>
+ </tr>
+
+ <tr>
+ <td class="dvtCellLabel" align="left"><img src="{$IMAGE_PATH}profile_icon.gif" align="top"></td>
+ <td class="dvtCellLabel" align="right" valign="top"><b>Associated profiles :</b></td>
+ <td colspan="2" align="left" class="dvtCellInfo">
+ {foreach item=elements from=$ROLEINFO.profileinfo}
+ <a href="index.php?module=Users&action=profilePrivileges&parenttab=Settings&profileid={$elements.0}&mode=view">{$elements.1}</a><br>
+ {/foreach}
+ </td>
+ </tr>
+ {if $ROLEINFO.userinfo.0 neq ''}
+ <tr>
+ <td class="dvtCellLabel" align="left"><img src="{$IMAGE_PATH}user_icon.gif" align="top"></td>
+ <td class="dvtCellLabel" align="right" valign="top"><b>Associated Users :</b></td>
+ <td colspan="2" align="left" class="dvtCellInfo">
+ {foreach item=elements from=$ROLEINFO.userinfo}
+ <a href="index.php?module=Users&action=DetailView&parenttab=Settings&record={$elements.0}">{$elements.1}</a><br>
+ {/foreach}
+ </td>
+ </tr>
+ {/if}
+ <tr><td colspan="4" class="dvtCellInfo"> </td></tr>
+ <tr>
+ <td colspan="4" class="dvtCellInfo" align="center">
+ <!-- <input title="Back" accessKey="C" class="classBtn" onclick="window.history.back();" type="button" name="New" value=" < Back " > -->
+ <input value=" Edit " title="Edit" accessKey="E" class="classBtn" type="submit" name="Edit" >
+
+ <input title="Delete" accessKey="D" class="classBtn" onclick="DeleteRole('{$ROLEID}')" type="button" name="Delete" value="Delete">
+ </td>
+ </tr>
+ <tr><td colspan="2"> </td></tr>
+ </table></td>
+
+ </tr>
+</table>
+</form>
+</td>
+
+</tr>
+</table>
+</td>
+<td width="1%" style="border-right:1px dotted #CCCCCC;"> </td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+
+ {include file='SettingsSubMenu.tpl'}
+<div id="tempdiv" style="display:block;position:absolute;left:350px;top:200px;"></div>
+<script>
+ function DeleteRole(roleid)
+ {ldelim}
+ //show("an_busy");
+ var ajaxObj = new Ajax(ajaxSaveResponse);
+ var urlstring = "module=Users&action=UsersAjax&file=RoleDeleteStep1&roleid="+roleid;
+ ajaxObj.process("index.php?",urlstring);
+ {rdelim}
+
+ function ajaxSaveResponse(response)
+ {ldelim}
+ document.getElementById("tempdiv").innerHTML=response.responseText;
+ {rdelim}
+</script>
+
Modified: vtigercrm/trunk/Smarty/templates/RoleEditView.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/RoleEditView.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/RoleEditView.tpl Thu Apr 27 17:02:08 2006
@@ -1,210 +1,212 @@
-<script language="JavaScript" type="text/javascript" src="include/js/menu.js"></script>
-<style type="text/css">@import url(themes/blue/style.css);</style>
-
-<script language="javascript">
-function validate()
-{ldelim}
- formSelectColumnString();
- if( !emptyCheck( "roleName", "Role Name" ) )
- return false;
-
- if(document.newRoleForm.selectedColumnsString.value.replace(/^\s+/g, '').replace(/\s+$/g, '').length==0)
- {ldelim}
-
- alert('Role should have atlease one profile');
- return false;
- {rdelim}
- return true;
-{rdelim}
-</script>
-
-<table width="100%" border="0" cellpadding="0" cellspacing="0">
-<tr>
- {include file='SettingsMenu.tpl'}
-<td width="75%" valign="top">
-
-<form name="newRoleForm" action="index.php" method="post">
-<input type="hidden" name="module" value="Users">
-<input type="hidden" name="action" value="SaveRole">
-<input type="hidden" name="parenttab" value="Settings">
-<input type="hidden" name="returnaction" value="{$RETURN_ACTION}">
-<input type="hidden" name="roleid" value="{$ROLEID}">
-<input type="hidden" name="mode" value="{$MODE}">
-<input type="hidden" name="parent" value="{$PARENT}">
-
-<table width="100%" border="0" cellpadding="0" cellspacing="0" height="100%">
-<tr>
-<td class="showPanelBg" valign="top" width="100%" colspan="3" style="padding-left:20px; "><br />
-<span class="lvtHeaderText"><b><a href="index.php?module=Settings&action=index&parenttab=Settings">{$MOD.LBL_SETTINGS} </a> > {$MOD.LBL_USER_MANAGEMENT} > {$CMOD.LBL_CREATE_NEW_GROUP}</b></span>
-<hr noshade="noshade" size="1"/>
-</td>
-</tr>
-<tr>
-<td width="75%" style="padding-left:20px;" valign="top">
-
- <table align="center" border="0" cellpadding="5" cellspacing="0" width="75%">
- <tbody><tr>
- <td colspan="2"> </td>
- </tr>
- <tr>
- <td class="genHeaderSmall" style="padding-right: 10px;" align="right" nowrap valign="top" width="25%">Step 1 : </td>
- <td align="left" nowrap="nowrap" width="75%"><b>Role Name</b><br>
- Specify a name for new role
- <input type="text" name="roleName" class="detailedViewTextBox" onfocus="this.className='detailedViewTextBoxOn'" onblur="this.className='detailedViewTextBox'" value="{$ROLENAME}">
-
- </td>
- </tr>
- <tr>
- <td colspan="2"> </td>
- </tr>
- <tr>
- <td class="genHeaderSmall" style="padding-right: 10px;" align="right" nowrap valign="top">Step 2 : </td>
-
- <td><b>Assign Profile(s)</b><br>
- Select the Profiles below and click on assign button </td>
- </tr>
- <tr>
- <td class="genHeaderSmall" style="padding-right: 10px;" align="right" valign="top"> </td>
- <td> </td>
- </tr>
- <tr>
-
- <td class="genHeaderSmall" style="padding-right: 10px;" align="right" valign="top"> </td>
- <td><table align="center" border="0" cellpadding="0" cellspacing="0" width="75%">
- <tbody><tr>
- <td align="center"><b>Profiles Available</b><br>
- <select id="availList" name="availList" size="10" multiple style="width: 150px;">
- {foreach item=element from=$PROFILELISTS}
- <option value="{$element.0}">{$element.1}</option>
- {/foreach}
- </select>
- </td>
- <td align="center">
- <input type="hidden" name="selectedColumnsString"/>
- <input name="Button" value=" Add " type="button" class="button" onClick="addColumn()">
- <br>
- <br>
- <input type="button" name="Button1" value=" Remove " onClick="delColumn()">
- </td>
- <td align="center"><b>Assigned Profiles </b><br>
- <select id="selectedColumns" name="selectedColumns" multiple size="10" style="width: 150px;">
- {foreach item=element from=$SELPROFILELISTS}
- <option value="{$element.0}">{$element.1}</option>
- {/foreach}
- </select>
- </td>
-
- </tr>
- </tbody></table></td>
- </tr>
- <tr>
- <td align="right" nowrap>Reports to:</td>
- <td><b>{$PARENTNAME}</b></td>
- </tr>
- <tr>
- <td colspan="2" style="border-bottom: 1px dashed rgb(204, 204, 204);"> </td>
-
- </tr>
- <tr>
- <td colspan="2" align="center">
- <input value="Create" name="Next" type="submit" class="button" onClick="return validate()" >
- <input value=" Cancel " name="Cancel" type="button" class="button" onClick="window.history.back()">
- </td>
- </tr>
- <tr>
-
- <td colspan="2" style="border-top: 1px solid rgb(204, 204, 204);"> </td>
- </tr>
- </tbody></table>
-
-<td colspan="2" style="border-top:1px solid #CCCCCC;"> </td>
-</tr>
-</table>
-</form>
-</td>
-
-</tr>
-</table>
-
-<script language="JavaScript" type="text/JavaScript">
- var moveupLinkObj,moveupDisabledObj,movedownLinkObj,movedownDisabledObj;
- function setObjects()
- {ldelim}
- availListObj=getObj("availList")
- selectedColumnsObj=getObj("selectedColumns")
-
- {rdelim}
-
- function addColumn()
- {ldelim}
- for (i=0;i<selectedColumnsObj.length;i++)
- {ldelim}
- selectedColumnsObj.options[i].selected=false
- {rdelim}
-
- for (i=0;i<availListObj.length;i++)
- {ldelim}
- if (availListObj.options[i].selected==true)
- {ldelim}
- for (j=0;j<selectedColumnsObj.length;j++)
- {ldelim}
- if (selectedColumnsObj.options[j].value==availListObj.options[i].value)
- {ldelim}
- var rowFound=true
- var existingObj=selectedColumnsObj.options[j]
- break
- {rdelim}
- {rdelim}
-
- if (rowFound!=true)
- {ldelim}
- var newColObj=document.createElement("OPTION")
- newColObj.value=availListObj.options[i].value
- if (browser_ie) newColObj.innerText=availListObj.options[i].innerText
- else if (browser_nn4 || browser_nn6) newColObj.text=availListObj.options[i].text
- selectedColumnsObj.appendChild(newColObj)
- availListObj.options[i].selected=false
- newColObj.selected=true
- rowFound=false
- {rdelim}
- else
- {ldelim}
- existingObj.selected=true
- {rdelim}
- {rdelim}
- {rdelim}
- {rdelim}
-
- function delColumn()
- {ldelim}
- for (i=0;i<=selectedColumnsObj.options.length;i++)
- {ldelim}
- if (selectedColumnsObj.options.selectedIndex>=0)
- selectedColumnsObj.remove(selectedColumnsObj.options.selectedIndex)
- {rdelim}
- {rdelim}
-
- function formSelectColumnString()
- {ldelim}
- var selectedColStr = "";
- for (i=0;i<selectedColumnsObj.options.length;i++)
- {ldelim}
- selectedColStr += selectedColumnsObj.options[i].value + ";";
- {rdelim}
- document.newRoleForm.selectedColumnsString.value = selectedColStr;
- {rdelim}
- setObjects();
-</script>
-
-</td>
-<td width="1%" style="border-right:1px dotted #CCCCCC;"> </td>
-</tr>
-</table>
-</td>
-</tr>
-</table>
-</td>
-</tr>
-</table>
- {include file='SettingsSubMenu.tpl'}
-
+<script language="JavaScript" type="text/javascript" src="include/js/menu.js"></script>
+<style type="text/css">@import url(themes/blue/style.css);</style>
+<script language="javascript">
+function validate()
+{ldelim}
+ formSelectColumnString();
+ if( !emptyCheck( "roleName", "Role Name" ) )
+ return false;
+
+ if(document.newRoleForm.selectedColumnsString.value.replace(/^\s+/g, '').replace(/\s+$/g, '').length==0)
+ {ldelim}
+
+ alert('Role should have atlease one profile');
+ return false;
+ {rdelim}
+ return true;
+{rdelim}
+</script>
+<table width="100%" border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ {include file='SettingsMenu.tpl'}
+ <td width="75%" valign="top">
+ <form name="newRoleForm" action="index.php" method="post">
+ <input type="hidden" name="module" value="Users">
+ <input type="hidden" name="action" value="SaveRole">
+ <input type="hidden" name="parenttab" value="Settings">
+ <input type="hidden" name="returnaction" value="{$RETURN_ACTION}">
+ <input type="hidden" name="roleid" value="{$ROLEID}">
+ <input type="hidden" name="mode" value="{$MODE}">
+ <input type="hidden" name="parent" value="{$PARENT}">
+ <table width="100%" border="0" cellpadding="0" cellspacing="0" height="100%">
+ <tr>
+ <td class="showPanelBg" valign="top" width="100%" style="padding-left:20px; "><br />
+ <span class="lvtHeaderText"><b>
+ <a href="index.php?module=Settings&action=index&parenttab=Settings">{$MOD.LBL_SETTINGS} </a>
+ > {$MOD.LBL_USER_MANAGEMENT} > {$CMOD.LBL_CREATE_NEW_ROLE}</b></span>
+ <hr noshade="noshade" size="1"/>
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top" class="leadTable">
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <tr>
+ <td align="left" style="padding:10px;border-bottom:1px dashed #CCCCCC;">
+ <img src="{$IMAGE_PATH}roles.gif" align="absmiddle">
+ <span class="genHeaderGray">{$CMOD.LBL_CREATE_NEW_ROLE}</span>
+ </td>
+ </tr>
+ </table>
+ <table align="center" border="0" cellpadding="5" cellspacing="0" width="95%">
+ <tbody>
+ <tr><td colspan="2"> </td></tr>
+ <tr>
+ <td class="genHeaderSmall" style="padding-right: 10px;" align="right" nowrap valign="top" width="15%">
+ <img src="{$IMAGE_PATH}one.gif" align="absmiddle">
+ </td>
+ <td align="left" nowrap="nowrap" width="85%"><b>Role Name</b><br>
+ Specify a name for new role :
+ <input type="text" name="roleName" class="importBox" value="{$ROLENAME}">
+ </td>
+ </tr>
+ <tr><td colspan="2"> </td></tr>
+ <tr>
+ <td class="genHeaderSmall" style="padding-right: 10px;" align="right" nowrap valign="top">
+ <img src="{$IMAGE_PATH}two.gif" align="absmiddle">
+ </td>
+ <td><b>Assign Profile(s)</b><br>Select the Profiles below and click on assign button </td>
+ </tr>
+ <tr>
+ <td class="genHeaderSmall" style="padding-right: 10px;" align="right" valign="top"> </td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td class="genHeaderSmall" style="padding-right: 10px;" align="right" valign="top"> </td>
+ <td>
+ <table align="center" border="0" cellpadding="0" cellspacing="0" width="75%">
+ <tbody>
+ <tr>
+ <td align="center"><b>Profiles Available</b><br>
+ <select id="availList" name="availList" size="10" multiple style="width: 150px;">
+ {foreach item=element from=$PROFILELISTS}
+ <option value="{$element.0}">{$element.1}</option>
+ {/foreach}
+ </select>
+ </td>
+ <td align="center">
+ <input type="hidden" name="selectedColumnsString"/>
+ <input name="Button" value=" ›› " type="button" class="classBtn" onClick="addColumn()">
+ <br><br>
+ <input type="button" name="Button1" value=" ‹‹ " class="classBtn" onClick="delColumn()">
+ </td>
+ <td align="center"><b>Assigned Profiles </b><br>
+ <select id="selectedColumns" name="selectedColumns" multiple size="10" style="width: 150px;">
+ {foreach item=element from=$SELPROFILELISTS}
+ <option value="{$element.0}">{$element.1}</option>
+ {/foreach}
+ </select>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td class="genHeaderSmall" style="padding-right: 10px;" align="right" valign="top"> </td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td align="right" nowrap><img src="{$IMAGE_PATH}three.gif" align="absmiddle"></td>
+ <td><b>Reports to Role</b><br>{$PARENTNAME}</td>
+ </tr>
+ <tr><td colspan="2" style="border-bottom: 1px dashed rgb(204, 204, 204);"> </td></tr>
+ <tr>
+ <td colspan="2" align="center">
+ <input value=" Create " name="Next" type="submit" class="classBtn" onClick="return validate()" >
+ <input value=" Cancel " name="Cancel" type="button" class="classBtn" onClick="window.history.back()">
+ </td>
+ </tr>
+
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </form>
+ </td>
+ </tr>
+ </table>
+
+<script language="JavaScript" type="text/JavaScript">
+ var moveupLinkObj,moveupDisabledObj,movedownLinkObj,movedownDisabledObj;
+ function setObjects()
+ {ldelim}
+ availListObj=getObj("availList")
+ selectedColumnsObj=getObj("selectedColumns")
+
+ {rdelim}
+
+ function addColumn()
+ {ldelim}
+ for (i=0;i<selectedColumnsObj.length;i++)
+ {ldelim}
+ selectedColumnsObj.options[i].selected=false
+ {rdelim}
+
+ for (i=0;i<availListObj.length;i++)
+ {ldelim}
+ if (availListObj.options[i].selected==true)
+ {ldelim}
+ for (j=0;j<selectedColumnsObj.length;j++)
+ {ldelim}
+ if (selectedColumnsObj.options[j].value==availListObj.options[i].value)
+ {ldelim}
+ var rowFound=true
+ var existingObj=selectedColumnsObj.options[j]
+ break
+ {rdelim}
+ {rdelim}
+
+ if (rowFound!=true)
+ {ldelim}
+ var newColObj=document.createElement("OPTION")
+ newColObj.value=availListObj.options[i].value
+ if (browser_ie) newColObj.innerText=availListObj.options[i].innerText
+ else if (browser_nn4 || browser_nn6) newColObj.text=availListObj.options[i].text
+ selectedColumnsObj.appendChild(newColObj)
+ availListObj.options[i].selected=false
+ newColObj.selected=true
+ rowFound=false
+ {rdelim}
+ else
+ {ldelim}
+ existingObj.selected=true
+ {rdelim}
+ {rdelim}
+ {rdelim}
+ {rdelim}
+
+ function delColumn()
+ {ldelim}
+ for (i=0;i<=selectedColumnsObj.options.length;i++)
+ {ldelim}
+ if (selectedColumnsObj.options.selectedIndex>=0)
+ selectedColumnsObj.remove(selectedColumnsObj.options.selectedIndex)
+ {rdelim}
+ {rdelim}
+
+ function formSelectColumnString()
+ {ldelim}
+ var selectedColStr = "";
+ for (i=0;i<selectedColumnsObj.options.length;i++)
+ {ldelim}
+ selectedColStr += selectedColumnsObj.options[i].value + ";";
+ {rdelim}
+ document.newRoleForm.selectedColumnsString.value = selectedColStr;
+ {rdelim}
+ setObjects();
+</script>
+
+</td>
+<td width="1%" style="border-right:1px dotted #CCCCCC;"> </td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+ {include file='SettingsSubMenu.tpl'}
+
More information about the vtigercrm-commits
mailing list