[Vtigercrm-commits] [vtiger-commits] r9207 - in /vtigercrm/trunk/Smarty/templates/Settings: EditPickList.tpl PickList.tpl PickListContents.tpl
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed Aug 30 11:34:43 EDT 2006
Author: richie
Date: Wed Aug 30 09:34:31 2006
New Revision: 9207
Log:
Edit allowed for newly added Picklist values and validation integrated --Jeri
Modified:
vtigercrm/trunk/Smarty/templates/Settings/EditPickList.tpl
vtigercrm/trunk/Smarty/templates/Settings/PickList.tpl
vtigercrm/trunk/Smarty/templates/Settings/PickListContents.tpl
Modified: vtigercrm/trunk/Smarty/templates/Settings/EditPickList.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/Settings/EditPickList.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/Settings/EditPickList.tpl Wed Aug 30 09:34:31 2006
@@ -43,7 +43,11 @@
<table border=0 cellspacing=0 cellpadding=5 width=100% class="layerPopupTransport">
<tr>
<td colspan="2" align="center">
+ {if $NON_EDITABLE_ENTRIES neq ''}
<input name="save" value=" {$APP.LBL_SAVE_BUTTON_LABEL} " class="crmButton small save" onClick="SavePickList('{$FIELDNAME}','{$MODULE}', {$UITYPE});" type="button">
+ {else}
+ <input name="save" value=" {$APP.LBL_SAVE_BUTTON_LABEL} " class="crmButton small save" onClick="return picklist_validate('{$EDITABLE_MODE}','{$FIELDNAME}','{$MODULE}', {$UITYPE});" type="button">
+ {/if}
<input name="cancel" value=" {$APP.LBL_CANCEL_BUTTON_LABEL} " class="crmButton small cancel" onClick="hide('editdiv');" type="button">
</td>
</tr>
Modified: vtigercrm/trunk/Smarty/templates/Settings/PickList.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/Settings/PickList.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/Settings/PickList.tpl Wed Aug 30 09:34:31 2006
@@ -168,7 +168,7 @@
<script>
function SavePickList(fieldname,module,uitype)
{
- $("status").style.display="inline";
+ $("status").style.display = "inline";
Effect.Puff($('editdiv'),{duration:2});
var body = escape($("picklist_values").value);
@@ -217,5 +217,18 @@
}
);
}
+function picklist_validate(mode,fieldname,module,uitype)
+{
+ if(mode == 'edit')
+ {
+ if(trim($("picklist_values").value) == '')
+ {
+ alert("Picklist value cannot be empty");
+ $("picklist_values").focus();
+ return false;
+ }
+ }
+ SavePickList(fieldname,module,uitype)
+}
</script>
{/literal}
Modified: vtigercrm/trunk/Smarty/templates/Settings/PickListContents.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/Settings/PickListContents.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/Settings/PickListContents.tpl Wed Aug 30 09:34:31 2006
@@ -30,11 +30,7 @@
<td class="listTableTopButtons small" valign="top" align="left"><b>{$picklistfields.fieldlabel}</b></td>
{/if}
<td class="listTableTopButtons" valign="top" align="right">
- {if $picklistfields.fieldname neq 'eventstatus' && $picklistfields.fieldname neq 'taskstatus'}
- <input type="button" value="{$APP.LBL_EDIT_BUTTON}" class="crmButton small edit" onclick="fetchEditPickList('{$MODULE}','{$picklistfields.fieldname}', {$picklistfields.uitype});posLay(this,'editdiv');" >
- {else}
-
- {/if}
+ <input type="button" value="{$APP.LBL_EDIT_BUTTON}" class="crmButton small edit" onclick="fetchEditPickList('{$MODULE}','{$picklistfields.fieldname}', {$picklistfields.uitype});posLay(this,'editdiv');" >
</td>
{else}
<td class="listTableTopButtons small" colspan="2"> </td>
More information about the vtigercrm-commits
mailing list