[Vtigercrm-commits] [vtiger-commits] r9285 - /vtigercrm/trunk/Smarty/templates/CustomFieldMapping.tpl
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Tue Sep 5 09:15:41 EDT 2006
Author: saraj
Date: Tue Sep 5 07:15:37 2006
New Revision: 9285
Log:
changes made to put validation for custom field mapping --Minnie
Modified:
vtigercrm/trunk/Smarty/templates/CustomFieldMapping.tpl
Modified: vtigercrm/trunk/Smarty/templates/CustomFieldMapping.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/CustomFieldMapping.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/CustomFieldMapping.tpl Tue Sep 5 07:15:37 2006
@@ -60,39 +60,57 @@
<td class="colHeader small" valign="top" width="23%">{$APP.Contacts}</td>
<td class="colHeader small" valign="top" width="24%">{$APP.Potentials}</td>
</tr>
- {foreach key=leadcf item=cfarray from=$CUSTOMFIELDMAPPING}
+ {foreach key=leadcf item=cfarray name=cfarray from=$CUSTOMFIELDMAPPING}
<tr>
<td class="listTableRow small">{$cfarray.sno}</td>
<td class="listTableRow small">{$cfarray.leadid}</td>
<td class="listTableRow small">{$cfarray.fieldtype}</td>
{foreach item=acc_cf key=fldnameacc from=$cfarray.account}
<td class="listTableRow small">
- <select name='{$fldnameacc}'>
+ <select name='{$fldnameacc}' id='{$fldnameacc}' onChange='return validateTypeforCFMapping("{$cfarray.fieldtype}","{$cfarray.typeofdata}","{$fldnameacc}",this);' >
<option value='None'>{$APP.LBL_NONE}</option>
{foreach item=element from=$acc_cf}
<option value="{$element.fieldid}" {$element.selected}>{$element.fieldlabel}</option>
{/foreach}
</select>
+ {if $smarty.foreach.cfarray.index eq 0}
+ {foreach item=element from=$acc_cf}
+ <input type='hidden' name='{$element.fieldid}_type' id='{$element.fieldid}_type' value='{$element.fieldtype}'>
+ <input type='hidden' name='{$element.fieldid}_typeofdata' id='{$element.fieldid}_typeofdata' value='{$element.typeofdata}'>
+ {/foreach}
+ {/if}
</td>
{/foreach}
{foreach item=con_cf key=fldnamecon from=$cfarray.contact}
<td class="listTableRow small">
- <select name='{$fldnamecon}'>
+ <select name='{$fldnamecon}' id='{$fldnamecon}' onChange='return validateTypeforCFMapping("{$cfarray.fieldtype}","{$cfarray.typeofdata}","{$fldnamecon}",this);'>
<option value='None'>{$APP.LBL_NONE}</option>
{foreach item=element from=$con_cf}
<option value="{$element.fieldid}" {$element.selected}>{$element.fieldlabel}</option>
{/foreach}
</select>
+ {if $smarty.foreach.cfarray.index eq 0}
+ {foreach item=element from=$con_cf}
+ <input type='hidden' name='{$element.fieldid}_type' id='{$element.fieldid}_type' value='{$element.fieldtype}' >
+ <input type='hidden' name='{$element.fieldid}_typeofdata' id='{$element.fieldid}_typeofdata' value='{$element.typeofdata}'>
+ {/foreach}
+ {/if}
</td>
{/foreach}
{foreach item=pot_cf key=fldnamepot from=$cfarray.potential}
<td class="listTableRow small">
- <select name='{$fldnamepot}'>
+ <select name='{$fldnamepot}' id='{$fldnamepot}' onChange='return validateTypeforCFMapping("{$cfarray.fieldtype}","{$cfarray.typeofdata}","{$fldnamepot}",this);'>
<option value='None'>{$APP.LBL_NONE}</option>
{foreach item=element from=$pot_cf}
<option value="{$element.fieldid}" {$element.selected}>{$element.fieldlabel}</option>
{/foreach}
</select>
+ {if $smarty.foreach.cfarray.index eq 0}
+ {foreach item=element from=$pot_cf}
+ <input type='hidden' name='{$element.fieldid}_type' id='{$element.fieldid}_type' value='{$element.fieldtype}'>
+ <input type='hidden' name='{$element.fieldid}_typeofdata' id='{$element.fieldid}_typeofdata' value='{$element.typeofdata}'>
+ {/foreach}
+ {/if}
</td>
{/foreach}
</tr>
More information about the vtigercrm-commits
mailing list