You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
118 lines
3.4 KiB
118 lines
3.4 KiB
<!--
|
|
/*********************************************************************************
|
|
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
|
|
* ("License"); You may not use this file except in compliance with the
|
|
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
|
* the specific language governing rights and limitations under the License.
|
|
* The Original Code is: SugarCRM Open Source
|
|
* The Initial Developer of the Original Code is SugarCRM, Inc.
|
|
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
|
|
* All Rights Reserved.
|
|
* Contributor(s): ______________________________________.
|
|
********************************************************************************/
|
|
-->
|
|
<!-- BEGIN: main -->
|
|
|
|
<table width="75%" cellpadding="2" cellspacing="0" border="0">
|
|
<form action="index.php?module=Settings&action=SaveConvertLead" method="post" name="index">
|
|
<!--form action="index.php?module=Settings" method="post" name="index"-->
|
|
|
|
<tr>
|
|
<th colspan=4 class="formSecHeader" align="left">{MOD.LBL_MAPPING_INFO}</th>
|
|
</tr>
|
|
<tr>
|
|
<th width="10%"> </th>
|
|
<th>{MOD.LBL_ACCOUNT_FIELD}</th>
|
|
<th>{MOD.LBL_CONTACT_FIELD}</th>
|
|
<th>{MOD.LBL_POTENTIAL_FIELD}</th>
|
|
</tr>
|
|
|
|
{CUSTOMFIELDMAPPING}
|
|
|
|
</table>
|
|
|
|
<table width="75%" cellpadding="8" cellspacing="0" border="0" >
|
|
<tr>
|
|
<td align="center">
|
|
<input title="{APP.LBL_SAVE_BUTTON_LABEL}" accessKey="{APP.LBL_SAVE_BUTTON_KEY}" class="button" type="submit" name="button" value="{APP.LBL_SAVE_BUTTON_LABEL}" onclick ="return validateCustomFieldAccounts();">
|
|
|
|
<input title="{APP.LBL_CANCEL_BUTTON_LABEL}>" accessKey="{APP.LBL_CANCEL_BUTTON_KEY}" class="button" type="submit" name="button" value="{APP.LBL_CANCEL_BUTTON_LABEL}"></td>
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</form>
|
|
|
|
<script>
|
|
|
|
function validateCustomFieldAccounts()
|
|
{
|
|
var obj=document.getElementsByTagName("SELECT");
|
|
var i,j=0,k=0,l=0;
|
|
var n=obj.length;
|
|
account = new Array;
|
|
contact = new Array;
|
|
potential = new Array;
|
|
for( i = 0; i < n; i++)
|
|
{
|
|
if(obj[i].name.indexOf("_account")>0)
|
|
{
|
|
account[j]=obj[i].value;
|
|
j++;
|
|
}
|
|
if(obj[i].name.indexOf("_contact")>0)
|
|
{
|
|
contact[k]=obj[i].value;
|
|
k++;
|
|
}
|
|
if(obj[i].name.indexOf("_potential")>0)
|
|
{
|
|
potential[l]=obj[i].value;
|
|
l++;
|
|
}
|
|
}
|
|
for( i = 0; i < account.length; i++)
|
|
{
|
|
for(j=i+1; j<account.length; j++)
|
|
{
|
|
if( account[i] == account[j])
|
|
{
|
|
alert("Duplicate mapping for accounts!!");
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
|
|
for( i = 0; i < contact.length; i++)
|
|
{
|
|
for(k=i+1; k< contact.length; k++)
|
|
{
|
|
if( contact[i] == contact[k])
|
|
{
|
|
alert("Duplicate mapping for Contacts!!");
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
for( i = 0; i < potential.length; i++)
|
|
{
|
|
for(l=i+1; l<potential.length; l++)
|
|
{
|
|
if( potential[i] == potential[l])
|
|
{
|
|
alert("Duplicate mapping for Potential!!");
|
|
return false;
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
<!-- END: main -->
|
|
|
|
|