3 /*********************************************************************************
4 * SugarCRM Community Edition is a customer relationship management program developed by
5 * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
7 * This program is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU Affero General Public License version 3 as published by the
9 * Free Software Foundation with the addition of the following permission added
10 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
11 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
12 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
14 * This program is distributed in the hope that it will be useful, but WITHOUT
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
19 * You should have received a copy of the GNU Affero General Public License along with
20 * this program; if not, see http://www.gnu.org/licenses or write to the Free
21 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
25 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
27 * The interactive user interfaces in modified source and object code versions
28 * of this program must display Appropriate Legal Notices, as required under
29 * Section 5 of the GNU Affero General Public License version 3.
31 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
32 * these Appropriate Legal Notices must retain the display of the "Powered by
33 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
34 * technical reasons, the Appropriate Legal Notices must display the words
35 * "Powered by SugarCRM".
36 ********************************************************************************/
46 <span class="error">{$ERROR}</span>
49 <form enctype="multipart/form-data" name="importstep1" method="post" action="index.php" id="importstep1">
50 <input type="hidden" name="module" value="Import">
51 <input type="hidden" name="action" value="Step2">
52 <input type="hidden" name="import_module" value="{$IMPORT_MODULE}">
54 <table width="100%" border="0" cellspacing="0" cellpadding="0" class="edit view">
57 <table width="100%" border="0" cellspacing="0" cellpadding="0">
59 <td valign="top" width='50%' scope="row"><table border="0" cellpadding="0" cellspacing="0">
61 <td align="left" scope="row" colspan="3"><h3>{$MOD.LBL_WHAT_IS} <span class="required">*</span></h3></td>
64 <td colspan="3" scope="row"><input class="radio" type="radio" name="source" id="source_csv" value="csv" checked="checked" {if $selectedData->source == 'csv'}checked="checked"{/if} />
65 {$MOD.LBL_CSV} {sugar_help text=$MOD.LBL_DELIMITER_COMMA_HELP}</td>
67 <tr id="customEnclosure">
68 <td scope="row"> {$MOD.LBL_CUSTOM_ENCLOSURE}</td>
69 <td colspan="2" scope="row">
70 <select name="custom_enclosure" id="custom_enclosure">
71 <option value=""" {if $selectedData->custom_enclosure == '"' or !$selectedData->custom_enclosure}selected="selected"{/if}>{$MOD.LBL_OPTION_ENCLOSURE_DOUBLEQUOTE}</option>
72 <option value="'" {if $selectedData->custom_enclosure == "'" or $selectedData->custom_enclosure == '''}selected="selected"{/if}>{$MOD.LBL_OPTION_ENCLOSURE_QUOTE}</option>
73 <option value="" {if isset($selectedData->custom_enclosure) and $selectedData->custom_enclosure == ""}selected="selected"{/if}>{$MOD.LBL_OPTION_ENCLOSURE_NONE}</option>
74 <option value="other" {if $selectedData->custom_other}selected="selected"{/if}>{$MOD.LBL_OPTION_ENCLOSURE_OTHER}</option>
76 <input type="text" name="custom_enclosure_other" style="{if !$selectedData->custom_other}display: none;{/if} width: 5em;" maxlength="1" value="{$selectedData->custom_enclosure}" />
77 {sugar_help text=$MOD.LBL_ENCLOSURE_HELP}
81 <td colspan="3" scope="row"><input class="radio" type="radio" name="source" id="source_tab" value="tab" {if $selectedData->source == 'tab'}checked="checked"{/if} />
82 {$MOD.LBL_TAB} {sugar_help text=$MOD.LBL_DELIMITER_TAB_HELP}</td>
85 <td colspan="3" scope="row"><input class="radio" type="radio" name="source" id="source_other" value="other" {if $selectedData->source == 'other'}checked="checked"{/if}/>
86 {$MOD.LBL_CUSTOM_DELIMITED} {sugar_help text=$MOD.LBL_DELIMITER_CUSTOM_HELP}</td>
88 <tr id="customDelimiter" style='display:none'>
89 <td scope="row"> {$MOD.LBL_CUSTOM_DELIMITER} <span class="required">*</span></td>
90 <td colspan="2" scope="row">
91 <input type="text" name="custom_delimiter" value="{$selectedData->custom_delimiter}" style="width: 5em;" maxlength="1" />
96 <td colspan="3" scope="row"><input class="radio" type="radio" name="source" id="source_salesforce" value="salesforce" {if $selectedData->source == 'salesforce'}checked="checked"{/if}/>
97 {$MOD.LBL_SALESFORCE}</td>
102 <td colspan="3" scope="row"><input class="radio" type="radio" name="source" id="source_outlook" value="outlook" {if $selectedData->source == 'outlook'}checked="checked"{/if}/>
103 {$MOD.LBL_MICROSOFT_OUTLOOK}</td>
108 <td colspan="3" scope="row"><input class="radio" type="radio" name="source" id="source_act" value="act" {if $selectedData->source == 'act'}checked="checked"{/if}/>
109 {$MOD.LBL_ACT}</td>
112 {foreach from=$custom_mappings item=item name=custommappings}
113 {capture assign=mapping_label}{$MOD.LBL_CUSTOM_MAPPING_}{$item|upper}{/capture}
115 <td colspan="3" scope="row"><input class="radio" type="radio" name="source" value="{$item}" />
116 {$mapping_label}</td>
119 {foreach from=$custom_imports key=key item=item name=saved}
120 {if $smarty.foreach.saved.first}
122 <td scope="row" colspan="3">
123 <h5>{$MOD.LBL_MY_SAVED} {sugar_help text=$MOD.LBL_MY_SAVED_HELP}</h5></td>
127 <td scope="row" colspan="2">
128 <input class="radio" type="radio" name="source" value="custom:{$item.IMPORT_ID}"/>
129 {$item.IMPORT_NAME}
133 <input type="button" name="publish" value="{$MOD.LBL_PUBLISH}" class="button"
134 onclick="document.location.href = 'index.php?publish=yes&import_module={$IMPORT_MODULE}&module=Import&action=step1&import_map_id={$item.IMPORT_ID}'">
136 <input type="button" name="delete" value="{$MOD.LBL_DELETE}" class="button"
137 onclick="if(confirm('{$MOD.LBL_DELETE_MAP_CONFIRMATION}')){literal}{{/literal}document.location.href = 'index.php?import_module={$IMPORT_MODULE}&module=Import&action=step1&delete_map_id={$item.IMPORT_ID}'{literal}}{/literal}">
141 {foreach from=$published_imports key=key item=item name=published}
142 {if $smarty.foreach.published.first}
144 <td scope="row" colspan="3">
145 <h5>{$MOD.LBL_PUBLISHED_SOURCES} {sugar_help text=$MOD.LBL_MY_PUBLISHED_HELP}</h5></td>
149 <td scope="row" colspan="2">
150 <input class="radio" type="radio" name="source" value="custom:{$item.IMPORT_ID}"/>
151 {$item.IMPORT_NAME}
155 <input type="button" name="publish" value="{$MOD.LBL_UNPUBLISH}" class="button"
156 onclick="document.location.href = 'index.php?publish=no&import_module={$IMPORT_MODULE}&module=Import&action=step1&import_map_id={$item.IMPORT_ID}'">
157 <input type="button" name="delete" value="{$MOD.LBL_DELETE}" class="button"
158 onclick="if(confirm('{$MOD.LBL_DELETE_MAP_CONFIRMATION}')){literal}{{/literal}document.location.href = 'index.php?import_module={$IMPORT_MODULE}&module=Import&action=step1&delete_map_id={$item.IMPORT_ID}'{literal}}{/literal}">
164 <td scope="row" colspan="3">
165 <h3>{$MOD.LBL_IMPORT_TYPE} <span class="required">*</span></h3></td>
168 <td scope="row" colspan="3">
169 <input class="radio" type="radio" name="type" value="import" {if $selectedData->type == 'import' or !$selectedData->type}checked="checked"{/if} />
170 {$MOD.LBL_IMPORT_BUTTON}
174 <td scope="row" colspan="3">
175 <input class="radio" type="radio" name="type" value="update" {if $selectedData->type == 'update'}checked="checked"{/if} />
176 {$MOD.LBL_UPDATE_BUTTON}
189 <table width="100%" cellpadding="0" cellspacing="0" border="0">
191 <td align="left"><input title="{$MOD.LBL_NEXT}" accessKey="" class="button" type="submit" name="button" value=" {$MOD.LBL_NEXT} " id="gonext"></td>