[Vtigercrm-commits] [vtiger-commits] r7409 - in /vtigercrm/trunk/Smarty/templates: DetailViewUI.tpl UserDetailView.tpl
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Thu Jun 22 00:27:46 EDT 2006
Author: richie
Date: Wed Jun 21 22:27:35 2006
New Revision: 7409
Log:
Ajax edit added for UserDetailView
Modified:
vtigercrm/trunk/Smarty/templates/DetailViewUI.tpl
vtigercrm/trunk/Smarty/templates/UserDetailView.tpl
Modified: vtigercrm/trunk/Smarty/templates/DetailViewUI.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/DetailViewUI.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/DetailViewUI.tpl Wed Jun 21 22:27:35 2006
@@ -13,7 +13,7 @@
-->*}
<!-- This file is used to display the fields based on the ui type in detailview -->
- {if $keyid eq '1' || $keyid eq 2 || $keyid eq '11' || $keyid eq '7' || $keyid eq '9' || $keyid eq '55' || $keyid eq '71' || $keyid eq '72'} <!--TextBox-->
+ {if $keyid eq '1' || $keyid eq 2 || $keyid eq '11' || $keyid eq '7' || $keyid eq '9' || $keyid eq '55' || $keyid eq '71' || $keyid eq '72' || $keyid eq '103'} <!--TextBox-->
<td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" onmouseover="hndMouseOver({$keyid},'{$label}');" onmouseout="fnhide('crmspanid');">
{if $keyid eq '55'}<!--SalutationSymbol-->
{$keysalut}
@@ -27,7 +27,7 @@
<a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">{$APP.LBL_CANCEL_BUTTON_LABEL}</a>
</div>
</td>
- {elseif $keyid eq '13'} <!--Email-->
+ {elseif $keyid eq '13' || $keyid eq '104'} <!--Email-->
<td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" onmouseover="hndMouseOver({$keyid},'{$label}');" onmouseout="fnhide('crmspanid');"> <span id="dtlview_{$label}"><a href="mailto:{$keyval}" target="_blank">{$keyval}</a></span>
<div id="editarea_{$label}" style="display:none;">
<input class="detailedViewTextBox" onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'" type="text" id="txtbox_{$label}" name="{$keyfldname}" maxlength='100' value="{$keyval}"></input>
@@ -48,6 +48,45 @@
<br><input name="button_{$label}" type="button" class="small" value="{$APP.LBL_SAVE_LABEL}" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');fnhide('crmspanid');"/> or
<a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">{$APP.LBL_CANCEL_BUTTON_LABEL}</a>
</div>
+ </td>
+ {elseif $keyid eq '115'} <!--ComboBox Status edit only for admin Users-->
+ {if $keyadmin eq 1}
+ <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" onmouseover="hndMouseOver({$keyid},'{$label}');" onmouseout="fnhide('crmspanid');"> <span id="dtlview_{$label}">{$keyval}</span>
+ <div id="editarea_{$label}" style="display:none;">
+ <select id="txtbox_{$label}" name="{$keyfldname}">
+ {foreach item=arr from=$keyoptions}
+ {foreach key=sel_value item=value from=$arr}
+ <option value="{$sel_value}" {$value}>{$sel_value}</option>
+ {/foreach}
+ {/foreach}
+ </select>
+ <br><input name="button_{$label}" type="button" class="small" value="{$APP.LBL_SAVE_LABEL}" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');fnhide('crmspanid');"/> or
+ <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">{$APP.LBL_CANCEL_BUTTON_LABEL}</a>
+ </div>
+ {else}
+ <td width=25% class="dvtCellInfo" align="left">{$keyval}
+ {/if}
+
+ </td>
+ {elseif $keyid eq '116'} <!--ComboBox currency id edit only for admin Users-->
+ {if $keyadmin eq 1}
+ <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" onmouseover="hndMouseOver({$keyid},'{$label}');" onmouseout="fnhide('crmspanid');"> <span id="dtlview_{$label}">{$keyval}</span>
+ <div id="editarea_{$label}" style="display:none;">
+ <select id="txtbox_{$label}" name="{$keyfldname}">
+ {foreach item=arr key=uivalueid from=$keyoptions}
+ {foreach key=sel_value item=value from=$arr}
+ <option value="{$uivalueid}" {$value}>{$sel_value}</option>
+ {/foreach}
+ {/foreach}
+ </select>
+ <br><input name="button_{$label}" type="button" class="small" value="{$APP.LBL_SAVE_LABEL}" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');fnhide('crmspanid');"/> or
+ <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">{$APP.LBL_CANCEL_BUTTON_LABEL}</a>
+ </div>
+ {else}
+ <td width=25% class="dvtCellInfo" align="left">{$keyval}
+ {/if}
+
+
</td>
{elseif $keyid eq '17'} <!--WebSite-->
<td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" onmouseover="hndMouseOver({$keyid},'{$label}');" onmouseout="fnhide('crmspanid');"> <span id="dtlview_{$label}"><a href="http://{$keyval}" target="_blank">{$keyval}</a></span>
@@ -170,7 +209,24 @@
<br><input name="button_{$label}" type="button" class="small" value="{$APP.LBL_SAVE_LABEL}" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');"/> or
<a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">{$APP.LBL_CANCEL_BUTTON_LABEL}</a>
</div>
- </td>
+ </td>
+ {elseif $keyid eq '156'} <!--CheckBox for is admin-->
+ {if $smarty.request.record neq $CURRENT_USERID && $keyadmin eq 1}
+ <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" onMouseOver="hndMouseOver({$keyid},'{$label}');" onmouseout="fnhide('crmspanid');"> <span id="dtlview_{$label}">{$keyval} </span>
+ <div id="editarea_{$label}" style="display:none;">
+ {if $keyval eq 'on'}
+ <input id="txtbox_{$label}" name="{$keyfldname}" type="checkbox" style="border:1px solid #bababa;" checked value="1">
+ {else}
+ <input id="txtbox_{$label}" type="checkbox" name="{$keyfldname}" style="border:1px solid #bababa;" value="0">
+ {/if}
+ <br><input name="button_{$label}" type="button" class="small" value="{$APP.LBL_SAVE_LABEL}" onclick="dtlViewAjaxSave('{$label}','{$MODULE}',{$keyid},'{$keytblname}','{$keyfldname}','{$ID}');"/> or
+ <a href="javascript:;" onclick="hndCancel('dtlview_{$label}','editarea_{$label}','{$label}')" class="link">{$APP.LBL_CANCEL_BUTTON_LABEL}</a>
+ </div>
+ {else}
+ <td width=25% class="dvtCellInfo" align="left">{$keyval}
+ {/if}
+ </td>
+
{elseif $keyid eq 83}<!-- Handle the Tax in Inventory -->
<td align="right" class="dvtCellLabel">
{$APP.LBL_VAT} {$APP.COVERED_PERCENTAGE}
Modified: vtigercrm/trunk/Smarty/templates/UserDetailView.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/UserDetailView.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/UserDetailView.tpl Wed Jun 21 22:27:35 2006
@@ -1,174 +1,183 @@
-{*<!--
-/*********************************************************************************
- ** The contents of this file are subject to the vtiger CRM Public License Version 1.0
- * ("License"); You may not use this file except in compliance with the License
- * The Original Code is: vtiger CRM Open Source
- * The Initial Developer of the Original Code is vtiger.
- * Portions created by vtiger are Copyright (C) vtiger.
- * All Rights Reserved.
- *
- ********************************************************************************/
--->*}
-<script language="JavaScript" type="text/javascript" src="include/js/menu.js"></script>
-<script language="JavaScript" type="text/javascript" src="include/js/ColorPicker2.js"></script>
-<script language="javascript" type="text/javascript" src="include/js/general.js"></script>
-<script language="JavaScript" type="text/javascript" src="include/js/dtlviewajax.js"></script>
-<span id="crmspanid" style="display:none;position:absolute;" onmouseover="show('crmspanid');">
- <a class="link" align="right" href="javascript:;">Edit</a>
-</span>
-
-<style type="text/css">@import url(themes/blue/style.css);</style>
-
-<table width="100%" border="0" cellpadding="0" cellspacing="0">
-<tr>
-{if $CATEGORY eq 'Settings'}
- {include file='SettingsMenu.tpl'}
-{/if}
-<td width="75%" valign="top">
-<table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr><td class="padTab" align="left">
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <form name="DetailView" method="POST" action="index.php" ENCTYPE="multipart/form-data" id="form">
- <input type="hidden" name="module" value="Users">
- <input type="hidden" name="record" value="{$ID}">
- <input type="hidden" name="isDuplicate" value=false>
- <input type="hidden" name="action">
-
-{if $CATEGORY eq 'Settings'}
- <input type="hidden" name="modechk" value="prefview">
-{/if}
- <input type="hidden" name="user_name" value="{$USER_NAME}">
- <input type="hidden" name="old_password">
- <input type="hidden" name="new_password">
- <input type="hidden" name="return_module">
- <input type="hidden" name="return_action">
- <input type="hidden" name="return_id">
- <input type="hidden" name="forumDisplay">
-{if $CATEGORY eq 'Settings'}
- <input type="hidden" name="parenttab" value="{$PARENTTAB}">
-{/if}
-
- <tr>
- <td style="border-bottom:1px dashed #CCCCCC;">
- <table width="100%" cellpadding="5" cellspacing="0" border="0">
- <tr>
- <td colspan="2" style="padding:5px;">
- {if $CATEGORY eq 'Settings'}
- <span class="lvtHeaderText">
- <b><a href="index.php?module=Settings&action=index&parenttab=Settings">{$MOD.LBL_SETTINGS} </a> > {$MOD.LBL_USER_MANAGEMENT} > {$MOD.LBL_USERS}</b></span>
- {else}
- <span class="lvtHeaderText">
- <b>{$APP.LBL_MY_PREFERENCES}</b>
- </span>
- {/if}
-
- <hr noshade="noshade" size="1" />
- </td>
- </tr>
- <tr>
- <td width="5%"><img src="{$IMAGE_PATH}user.gif" align="absmiddle"></td>
- <td width="95%"><span class="genHeaderGrayBig">{$USER_NAME}</span><br>
- <b class="small">{$UMOD.LBL_DETAIL_VIEW} {$FIRST_NAME} {$LAST_NAME}</b>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr><td> </td></tr>
- <tr valign="center">
- <td class="small" align="center">
- {$EDIT_BUTTON}
- {$CHANGE_PW_BUTTON}
- {$LOGIN_HISTORY_BUTTON}
- {if $CATEGORY eq 'Settings'}
- {$DUPLICATE_BUTTON}
- {/if}
- {$CHANGE_HOMEPAGE_BUTTON}
- {$LISTROLES_BUTTON}
- </td></tr>
-
- <tr><td colspan="2"> </td></tr>
- <tr><td colspan="2">
- <table align="center" border="0" cellpadding="0" cellspacing="0" width="99%">
-
- <tr>
- <td>
- <table class="small" border="0" cellpadding="3" cellspacing="0" width="100%">
- <tr >
- <td id="prof" width="25%" align="center" nowrap="nowrap" class="dvtSelectedCell" onClick="fnVis('prof')"><b>{$UMOD.LBL_USER_LOGIN_ROLE}</b></td>
- <td class="dvtTabCache" width="10" nowrap="nowrap"> </td>
- <td class="dvtTabCache" nowrap="nowrap" width="10"> </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td align="left" valign="top">
- {foreach key=header item=detail from=$BLOCKS}
- <table border=0 cellspacing=0 cellpadding=0 width=100% class="small">
- <tr>
- <td> </td>
- <td> </td>
- <td> </td>
- <td align=right>
- </tr>
- <tr>
- {strip}
- <td colspan=4 style="border-bottom:1px solid #999999;padding:5px;" bgcolor="#e5e5e5">
- <b> {$header}</b>
- </td>
- {/strip}
- </tr>
- {foreach item=detail from=$detail}
- <tr style="height:25px">
- {foreach key=label item=data from=$detail}
- {assign var=keyid value=$data.ui}
- {assign var=keyval value=$data.value}
- {assign var=keytblname value=$data.tablename}
- {assign var=keyfldname value=$data.fldname}
- {assign var=keyoptions value=$data.options}
- {assign var=keysecid value=$data.secid}
- {assign var=keyseclink value=$data.link}
- {assign var=keycursymb value=$data.cursymb}
- {assign var=keysalut value=$data.salut}
- {assign var=keycntimage value=$data.cntimage}
- {assign var=keyadmin value=$data.isadmin}
-
- <input type="hidden" id="hdtxt_IsAdmin" value={$keyadmin}></input>
- {if $label ne ''}
- <td class="dvtCellLabel" align=right width=25%>{$label}</td>
- {include file="DetailViewUI.tpl"}
- {else}
- <td class="dvtCellLabel" align=right> </td>
- <td class="dvtCellInfo" align=left > </td>
- {/if}
- {/foreach}
- </tr>
- {/foreach}
- </table>
- {/foreach}
-
- </td>
- </tr>
-
- <tr><td> </td></tr>
-
- </table>
-
-
-
-</td></tr>
-</table>
-</form>
-</td></tr>
-</table>
-</td></tr>
-</table>
-</td>
-</tr>
-</table>
-
-{$JAVASCRIPT}
-{if $CATEGORY eq 'Settings'}
- {include file='SettingsSubMenu.tpl'}
-{/if}
+{*<!--
+/*********************************************************************************
+ ** The contents of this file are subject to the vtiger CRM Public License Version 1.0
+ * ("License"); You may not use this file except in compliance with the License
+ * The Original Code is: vtiger CRM Open Source
+ * The Initial Developer of the Original Code is vtiger.
+ * Portions created by vtiger are Copyright (C) vtiger.
+ * All Rights Reserved.
+ *
+ ********************************************************************************/
+-->*}
+<script language="JavaScript" type="text/javascript" src="include/js/menu.js"></script>
+<script language="JavaScript" type="text/javascript" src="include/js/ColorPicker2.js"></script>
+<script language="javascript" type="text/javascript" src="include/js/general.js"></script>
+<script language="JavaScript" type="text/javascript" src="include/js/dtlviewajax.js"></script>
+<span id="crmspanid" style="display:none;position:absolute;" onmouseover="show('crmspanid');">
+ <a class="link" align="right" href="javascript:;">Edit</a>
+</span>
+
+<style type="text/css">@import url(themes/blue/style.css);</style>
+
+<table width="100%" border="0" cellpadding="0" cellspacing="0">
+<tr>
+{if $CATEGORY eq 'Settings'}
+ {include file='SettingsMenu.tpl'}
+{/if}
+<td width="75%" valign="top">
+
+<table width="100%" border="0" cellspacing="0" cellpadding="0">
+ <tr><td class="padTab" align="left">
+ <table width="100%" border="0" cellpadding="0" cellspacing="0">
+ <form name="DetailView" method="POST" action="index.php" ENCTYPE="multipart/form-data" id="form">
+ <input type="hidden" name="module" value="Users">
+ <input type="hidden" name="record" value="{$ID}">
+ <input type="hidden" name="isDuplicate" value=false>
+ <input type="hidden" name="action">
+
+{if $CATEGORY eq 'Settings'}
+ <input type="hidden" name="modechk" value="prefview">
+{/if}
+ <input type="hidden" name="user_name" value="{$USER_NAME}">
+ <input type="hidden" name="old_password">
+ <input type="hidden" name="new_password">
+ <input type="hidden" name="return_module">
+ <input type="hidden" name="return_action">
+ <input type="hidden" name="return_id">
+ <input type="hidden" name="forumDisplay">
+{if $CATEGORY eq 'Settings'}
+ <input type="hidden" name="parenttab" value="{$PARENTTAB}">
+{/if}
+
+ <tr>
+ <td style="border-bottom:1px dashed #CCCCCC;">
+ <table width="100%" cellpadding="5" cellspacing="0" border="0">
+ <tr>
+ <td colspan=2 style="padding:5px;">
+ {if $CATEGORY eq 'Settings'}
+ <span class="lvtHeaderText">
+ <b><a href="index.php?module=Settings&action=index&parenttab=Settings">{$MOD.LBL_SETTINGS} </a> > {$MOD.LBL_USER_MANAGEMENT} > {$MOD.LBL_USERS}</b></span>
+ {else}
+ <span class="lvtHeaderText">
+ <b>{$APP.LBL_MY_PREFERENCES}</b>
+ </span>
+ {/if}
+ <span id="vtbusy_info" style="display:none;" valign="bottom"><img src="{$IMAGE_PATH}vtbusy.gif" border="0"></span>
+ <hr noshade="noshade" size="1" />
+ </td>
+ <td align="right"><hr noshade="noshade" size="1" /></td>
+ </tr>
+ <tr>
+ <td width="5%"><img src="{$IMAGE_PATH}user.gif" align="absmiddle"></td>
+ <td width="95%"><span class="genHeaderGrayBig">{$USER_NAME}</span><br>
+ <b class="small">{$UMOD.LBL_DETAIL_VIEW} {$FIRST_NAME} {$LAST_NAME}</b>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr><td> </td></tr>
+ <tr valign="center">
+ <td class="small" align="center">
+ {$EDIT_BUTTON}
+ {$CHANGE_PW_BUTTON}
+ {$LOGIN_HISTORY_BUTTON}
+ {if $CATEGORY eq 'Settings'}
+ {$DUPLICATE_BUTTON}
+ {/if}
+ {$CHANGE_HOMEPAGE_BUTTON}
+ {$LISTROLES_BUTTON}
+ </td></tr>
+
+ <tr><td colspan="2"> </td></tr>
+ <tr><td colspan="2">
+ <table align="center" border="0" cellpadding="0" cellspacing="0" width="99%">
+
+ <tr>
+ <td>
+ <table class="small" border="0" cellpadding="3" cellspacing="0" width="100%">
+ <tr >
+ <td id="prof" width="25%" align="center" nowrap="nowrap" class="dvtSelectedCell" onClick="fnVis('prof')"><b>{$UMOD.LBL_USER_LOGIN_ROLE}</b></td>
+ <td class="dvtTabCache" width="10" nowrap="nowrap"> </td>
+ <td class="dvtTabCache" nowrap="nowrap" width="10"> </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">
+ {foreach key=header item=detail from=$BLOCKS}
+ <table border=0 cellspacing=0 cellpadding=0 width=100% class="small">
+ <tr>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td align=right>
+ </tr>
+ <tr>
+ {strip}
+ <td colspan=4 style="border-bottom:1px solid #999999;padding:5px;" bgcolor="#e5e5e5">
+ <b> {$header}</b>
+ </td>
+ {/strip}
+ </tr>
+ {foreach item=detail from=$detail}
+ <tr style="height:25px">
+ {foreach key=label item=data from=$detail}
+ {assign var=keyid value=$data.ui}
+ {assign var=keyval value=$data.value}
+ {assign var=keytblname value=$data.tablename}
+ {assign var=keyfldname value=$data.fldname}
+ {assign var=keyoptions value=$data.options}
+ {assign var=keysecid value=$data.secid}
+ {assign var=keyseclink value=$data.link}
+ {assign var=keycursymb value=$data.cursymb}
+ {assign var=keysalut value=$data.salut}
+ {assign var=keycntimage value=$data.cntimage}
+ {assign var=keyadmin value=$data.isadmin}
+
+ <input type="hidden" id="hdtxt_IsAdmin" value={$keyadmin}></input>
+ {if $label ne ''}
+ <td class="dvtCellLabel" align=right width=25%>{$label}</td>
+ {include file="DetailViewUI.tpl"}
+ {else}
+ <td class="dvtCellLabel" align=right> </td>
+ <td class="dvtCellInfo" align=left > </td>
+ {/if}
+ {/foreach}
+ </tr>
+ {/foreach}
+ </table>
+ {/foreach}
+
+ </td>
+ </tr>
+
+ <tr><td> </td></tr>
+
+ </table>
+
+
+
+</td></tr>
+</table>
+</form>
+</td></tr>
+</table>
+</td></tr>
+</table>
+</td>
+</tr>
+</table>
+
+{$JAVASCRIPT}
+{if $CATEGORY eq 'Settings'}
+ {include file='SettingsSubMenu.tpl'}
+{/if}
+
+<!-- added for validation -->
+<script language="javascript">
+ var fieldname = new Array({$VALIDATION_DATA_FIELDNAME});
+ var fieldlabel = new Array({$VALIDATION_DATA_FIELDLABEL});
+ var fielddatatype = new Array({$VALIDATION_DATA_FIELDDATATYPE});
+</script>
More information about the vtigercrm-commits
mailing list