]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Users/tpls/wizard.tpl
Release 6.4.0
[Github/sugarcrm.git] / modules / Users / tpls / wizard.tpl
1 {*
2 /*********************************************************************************
3  * SugarCRM Community Edition is a customer relationship management program developed by
4  * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
5  * 
6  * This program is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Affero General Public License version 3 as published by the
8  * Free Software Foundation with the addition of the following permission added
9  * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
10  * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
11  * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
12  * 
13  * This program is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15  * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
16  * details.
17  * 
18  * You should have received a copy of the GNU Affero General Public License along with
19  * this program; if not, see http://www.gnu.org/licenses or write to the Free
20  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21  * 02110-1301 USA.
22  * 
23  * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
24  * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
25  * 
26  * The interactive user interfaces in modified source and object code versions
27  * of this program must display Appropriate Legal Notices, as required under
28  * Section 5 of the GNU Affero General Public License version 3.
29  * 
30  * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
31  * these Appropriate Legal Notices must retain the display of the "Powered by
32  * SugarCRM" logo. If the display of the logo is not reasonably feasible for
33  * technical reasons, the Appropriate Legal Notices must display the words
34  * "Powered by SugarCRM".
35  ********************************************************************************/
36
37 *}
38 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
39 <html {$langHeader}>
40 <head>
41 <link rel="SHORTCUT ICON" href="{$FAVICON_URL}">
42 <meta http-equiv="Content-Type" content="text/html; charset={$APP.LBL_CHARSET}">
43 <title>{$MOD.LBL_WIZARD_TITLE}</title>
44 {literal}
45 <script type='text/javascript'>
46 function disableReturnSubmission(e) {
47    var key = window.event ? window.event.keyCode : e.which;
48    return (key != 13);
49 }
50 </script>
51 {/literal}
52 {$SUGAR_JS}
53 {$SUGAR_CSS}
54 {$CSS}
55 </head>
56 <body class="yui-skin-sam">
57 <div id="main">
58     <div id="content">
59         <table style="width:auto;height:600px;" align="center"><tr><td align="center">
60
61 <form id="UserWizard" name="UserWizard" enctype='multipart/form-data' method="POST" action="index.php" onkeypress="return disableReturnSubmission(event);">
62 <input type='hidden' name='action' value='SaveUserWizard'/>
63 <input type='hidden' name='module' value='Users'/>
64 <span class='error'>{$error.main}</span>
65 {overlib_includes}
66 <script type="text/javascript" src="{sugar_getjspath file='cache/include/javascript/sugar_grp_yui_widgets.js'}"></script>
67 <script type="text/javascript" src="{sugar_getjspath file='modules/Emails/javascript/vars.js'}"></script>
68 <script type="text/javascript" src="{sugar_getjspath file='cache/include/javascript/sugar_grp_emails.js'}"></script>
69 <script type="text/javascript" src="{sugar_getjspath file='modules/Users/User.js'}"></script>
70
71 <div class="dashletPanelMenu wizard">
72
73 <div class="bd">
74                 
75                 
76 <div id="welcome" class="screen">
77     <table width="100%" border="0" cellspacing="0" cellpadding="0">
78     <tr>
79         <td>
80             <div class="edit view">
81             <table width="100%" border="0" cellspacing="0" cellpadding="0">
82             <tr>
83                 <th align="left" scope="row" colspan="4"><h2>{$MOD.LBL_WIZARD_WELCOME_TITLE}</h2></th>
84             </tr>
85             <tr>
86                 <td scope="row">
87
88                 {if !$HIDE_IF_CAN_USE_DEFAULT_OUTBOUND}
89                <p> {$MOD.LBL_WIZARD_WELCOME}</p>
90                 {else}
91                <p> {$MOD.LBL_WIZARD_WELCOME_NOSMTP}</p>
92                 {/if}
93
94                                 <div class="userWizWelcome"><img src='include/images/sugar_wizard_welcome.jpg' border='0' alt='{$MOD.LBL_WIZARD_WELCOME_TAB}' width='765px' height='325px'></div>
95                 </td>
96             </tr>
97             </table>
98             </div>
99         </td>
100     </tr>
101     </table>
102     <div class="nav-buttons">
103         <input title="{$MOD.LBL_WIZARD_NEXT_BUTTON}"
104             class="button primary" type="button" name="next_tab1" value="  {$MOD.LBL_WIZARD_NEXT_BUTTON}  "
105             onclick="SugarWizard.changeScreen('personalinfo',false);" id="next_tab_personalinfo" />
106     </div>
107 </div>
108
109 <div id="personalinfo" class="screen">
110     <table width="100%" border="0" cellspacing="0" cellpadding="0">
111         <tr>
112             <td>
113                 <div class="edit view">
114                 <table width="100%" border="0" cellspacing="0" cellpadding="0">
115                     <tr>
116                         <th align="left" scope="row" colspan="4"><h2><slot>{$MOD.LBL_WIZARD_PERSONALINFO}</slot></h2></th>
117                     </tr>
118                     <tr>
119                         <td align="left" scope="row" colspan="4"><i>{$MOD.LBL_WIZARD_PERSONALINFO_DESC}</i></td>
120                     </tr>
121                     <tr>
122                         <td width="17%" scope="row" nowrap="nowrap"><slot>{$MOD.LBL_FIRST_NAME}:</slot></td>
123                         <td width="33%"><slot><input id='first_name' name='first_name' tabindex='1' size='25' maxlength='25' type="text" value="{$FIRST_NAME}"></slot></td>
124                         <td width="17%" scope="row" nowrap="nowrap"><slot>{$MOD.LBL_LAST_NAME}: <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
125                         <td width="33%"><slot><input id='last_name' name='last_name' tabindex='2' size='25' maxlength='25' type="text" value="{$LAST_NAME}"></slot></td>
126                     </tr>
127                     <tr>
128                         <td scope="row" width="17%">
129                         {$MOD.LBL_EMAIL}: {if $REQUIRED_EMAIL_ADDRESS}<span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span>{/if}
130                         </td>
131                         <td width="33%"><slot><input name='email1' tabindex='3' size='30' maxlength='100' value='{$EMAIL1}' id='email1' /></slot></td>
132                         <td scope="row" nowrap="nowrap"><slot>&nbsp;</slot></td>
133                         <td><slot>&nbsp;</slot></td>
134                     </tr>
135                     <tr>
136                         <td width="17%" scope="row" nowrap="nowrap"><slot>{$MOD.LBL_OFFICE_PHONE}:</slot></td>
137                         <td width="33%" ><slot><input name='phone_work' type="text" tabindex='4' size='20' maxlength='25' value='{$PHONE_WORK}'></slot></td>
138                         <td scope="row" nowrap="nowrap"><slot>{$MOD.LBL_MESSENGER_TYPE}:</slot></td>
139                         <td  ><slot>{$MESSENGER_TYPE_OPTIONS}</slot></td>
140                     </tr>
141                     <tr>
142                         <td scope="row"><slot>{$MOD.LBL_MOBILE_PHONE}:</slot></td>
143                         <td  ><slot><input name='phone_mobile' type="text" tabindex='6' size='20' maxlength='25' value='{$PHONE_MOBILE}'></slot></td>
144                         <td scope="row" nowrap="nowrap"><slot>{$MOD.LBL_MESSENGER_ID}:</slot></td>
145                         <td  ><slot><input name='messenger_id' type="text" tabindex='6' size='30' maxlength='100' value='{$MESSENGER_ID}'></slot></td>
146                     </tr>
147                     <tr>
148                         <td width="17%" scope="row" nowrap="nowrap"><slot>{$MOD.LBL_PRIMARY_ADDRESS}:</slot></td>
149                         <td width="33%" ><slot><textarea name='address_street' rows="2" tabindex='8' cols="30">{$ADDRESS_STREET}</textarea></slot></td>
150                         <td scope="row" nowrap="nowrap"><slot>&nbsp;</slot></td>
151                         <td><slot>&nbsp;</slot></td>
152                     </tr>
153                     <tr>
154                         <td width="17%" scope="row" nowrap="nowrap"><slot>{$MOD.LBL_CITY}:</slot></td>
155                         <td width="33%" ><slot><input name='address_city' tabindex='8' size='15' maxlength='100' value='{$ADDRESS_CITY}'></slot></td>
156                         <td scope="row" nowrap="nowrap"><slot>{$MOD.LBL_STATE}:</slot></td>
157                         <td><slot><input name='address_state' tabindex='9' size='15' maxlength='100' value='{$ADDRESS_STATE}'></slot></td>
158                     </tr>
159                     <tr>
160                         <td scope="row" nowrap="nowrap"><slot>{$MOD.LBL_POSTAL_CODE}:</slot></td>
161                         <td><slot><input name='address_postalcode' tabindex='9' size='10' maxlength='20' value='{$ADDRESS_POSTALCODE}'></slot></td>
162                         <td scope="row" nowrap="nowrap"><slot>{$MOD.LBL_COUNTRY}:</slot></td>
163                         <td><slot><input name='address_country' tabindex='10' size='10' maxlength='20' value='{$ADDRESS_COUNTRY}'></slot></td>
164                     </tr>
165                 </table>
166                 </div>
167             </td>
168         </tr>
169     </table>
170     <div class="nav-buttons">
171         {if $SKIP_WELCOME}
172         <input title="{$MOD.LBL_BACK}"
173             onclick="document.location.href='index.php?module=Configurator&action=AdminWizard&page=smtp';" class="button"
174             type="button" name="cancel" value="  {$MOD.LBL_WIZARD_BACK_BUTTON}  " id="wizard_cancel"/>&nbsp;
175         {else}
176         <input title="{$MOD.LBL_WIZARD_BACK_BUTTON}"
177             class="button" type="button" name="next_tab1" value="  {$MOD.LBL_WIZARD_BACK_BUTTON}  "
178             onclick="SugarWizard.changeScreen('welcome',true);" id="previous_tab_welcome" />&nbsp;
179         {/if}
180         <input title="{$MOD.LBL_WIZARD_NEXT_BUTTON}"
181             class="button primary" type="button" name="next_tab1" value="  {$MOD.LBL_WIZARD_NEXT_BUTTON}  "
182             onclick="SugarWizard.changeScreen('locale',false);" id="next_tab_locale" />
183     </div>
184 </div>
185
186 <div id="locale" class="screen">
187     <table width="100%" border="0" cellspacing="0" cellpadding="0">
188         <tr>
189             <td>
190                 <div class="edit view">
191                 <table width="100%" border="0" cellspacing="0" cellpadding="0">
192                     <tr>
193                         <th width="100%" align="left" scope="row" colspan="4">
194                             <h2><slot>{$MOD.LBL_WIZARD_LOCALE}</slot></h2></th>
195                     </tr>
196                     <tr>
197                         <td align="left" scope="row" colspan="4"><i>{$MOD.LBL_WIZARD_LOCALE_DESC}</i></td>
198                     </tr>
199                     <tr>
200                         <td scope="row" nowrap="nowrap"><slot>{$MOD.LBL_TIMEZONE}:</slot>&nbsp;{sugar_help text=$MOD.LBL_TIMEZONE_TEXT }</td>
201                         <td colspan="3"><slot><select tabindex='14' name='timezone'>{html_options options=$TIMEZONEOPTIONS selected=$TIMEZONE_CURRENT}</select></slot></td>
202                     </tr>
203                     <tr>
204                         <td width="17%" scope="row" nowrap="nowrap"><slot>{$MOD.LBL_DATE_FORMAT}:</slot>&nbsp;{sugar_help text=$MOD.LBL_DATE_FORMAT_TEXT }</td>
205                         <td width="33%"><slot><select tabindex='14' name='dateformat'>{$DATEOPTIONS}</select></slot></td>
206                         <td scope="row" nowrap="nowrap"><slot>{$MOD.LBL_TIME_FORMAT}:</slot>&nbsp;{sugar_help text=$MOD.LBL_TIME_FORMAT_TEXT }</td>
207                         <td ><slot><select tabindex='14' name='timeformat'>{$TIMEOPTIONS}</select></slot></td>
208
209                     </tr>
210                     <tr>
211                         <td colspan="4"><hr /></td>
212                     </tr>
213                     <tr>
214                         <td width="17%" scope="row" nowrap="nowrap"><slot>{$MOD.LBL_CURRENCY}:</slot>&nbsp;{sugar_help text=$MOD.LBL_CURRENCY_TEXT }</td>
215                             <td ><slot>
216                                 <select tabindex='14' id='currency_select' name='currency' onchange='setSymbolValue(this.selectedIndex);setSigDigits();'>{$CURRENCY}</select>
217                                 <input type="hidden" id="symbol" value="">
218                             </slot></td>
219                         <td width="17%" scope="row" nowrap="nowrap"></td>
220                         <td></td>
221                     </tr>
222                     <tr>
223                         <td width="17%" scope="row" nowrap="nowrap"><slot>
224                             {$MOD.LBL_CURRENCY_SIG_DIGITS}:
225                         </slot></td>
226                         <td ><slot>
227                             <select id='sigDigits' onchange='setSigDigits(this.value);' name='default_currency_significant_digits'>{$sigDigits}</select>
228                         </slot></td>
229                         <td width="17%" scope="row" nowrap="nowrap"><slot>
230                             <i>{$MOD.LBL_LOCALE_EXAMPLE_NAME_FORMAT}:</i>
231                         </slot></td>
232                         <td ><slot>
233                             <input type="text" disabled id="sigDigitsExample" name="sigDigitsExample">
234                         </slot></td>
235                     </tr>
236                     <tr>
237                         <td width="17%" scope="row" nowrap="nowrap"><slot>{$MOD.LBL_DECIMAL_SEP}:</slot>&nbsp;{sugar_help text=$MOD.LBL_DECIMAL_SEP_TEXT }</td>
238                         <td ><slot>
239                             <input tabindex='14' name='dec_sep' id='default_decimal_seperator'
240                                 type='text' maxlength='1' size='1' value='{$DEC_SEP}'
241                                 onkeydown='setSigDigits();' onkeyup='setSigDigits();'>
242                         </slot></td>
243                         <td width="17%" scope="row" nowrap="nowrap"><slot>{$MOD.LBL_NUMBER_GROUPING_SEP}:</slot>&nbsp;{sugar_help text=$MOD.LBL_NUMBER_GROUPING_SEP_TEXT }</td>
244                         <td><input tabindex='14' name='num_grp_sep' id='default_number_grouping_seperator'
245                                     type='text' maxlength='1' size='1' value='{$NUM_GRP_SEP}'
246                                     onkeydown='setSigDigits();' onkeyup='setSigDigits();'></td>
247                     </tr>
248                     <tr>
249                         <td colspan="4"><hr /></td>
250                     </tr>
251                     <tr>
252                         {capture name=SMARTY_LOCALE_NAME_FORMAT_DESC}&nbsp;{$MOD.LBL_LOCALE_NAME_FORMAT_DESC}{/capture}
253                         <td nowrap="nowrap" scope="row" valign="top">{$MOD.LBL_LOCALE_DEFAULT_NAME_FORMAT}:&nbsp;{sugar_help text=$smarty.capture.SMARTY_LOCALE_NAME_FORMAT_DESC }</td>
254                         <td><slot><select id="default_locale_name_format" tabindex='14' name="default_locale_name_format" selected="{$default_locale_name_format}">{$NAMEOPTIONS}</select></slot></td>
255                     </tr>
256                 </table>
257                 </div>
258             </td>
259         </tr>
260     </table>
261     <div class="nav-buttons">
262         <input title="{$MOD.LBL_WIZARD_BACK_BUTTON}"
263             class="button" type="button" name="next_tab1" value="  {$MOD.LBL_WIZARD_BACK_BUTTON}  "
264             onclick="SugarWizard.changeScreen('personalinfo',true);" id="previous_tab_personalinfo" />&nbsp;
265         <input title="{$MOD.LBL_WIZARD_NEXT_BUTTON}"
266             class="button primary" type="button" name="next_tab1" value="  {$MOD.LBL_WIZARD_NEXT_BUTTON}  "
267             {if !$HIDE_IF_CAN_USE_DEFAULT_OUTBOUND}
268             onclick="SugarWizard.changeScreen('smtp',false);" id="next_tab_smtp" />
269             {else}
270             onclick="SugarWizard.changeScreen('finish',false);" id="next_tab_finish" />
271             {/if}
272     </div>
273 </div>
274 {if !$HIDE_IF_CAN_USE_DEFAULT_OUTBOUND}
275 <div id="smtp" class="screen">
276     <table width="100%" border="0" cellspacing="0" cellpadding="0">
277     <tr>
278     <td>
279         <div class="edit view">
280         <table width="100%" border="0" cellspacing="0" cellpadding="0">
281             <tr>
282                 <th align="left" scope="row" colspan="4">
283                     <h2>{$MOD.LBL_WIZARD_SMTP}</h2>
284                 </th>
285             </tr>
286             <tr>
287                 <td align="left" scope="row" colspan="4"><i>{$MOD.LBL_WIZARD_SMTP_DESC}</i></td>
288             </tr>
289             <tr>
290                 <td width="20%" scope="row"><span id="mail_smtpserver_label">{$MOD.LBL_EMAIL_PROVIDER}</span></td>
291                 <td width="30%" ><slot>{$mail_smtpdisplay}<input id='mail_smtpserver' name='mail_smtpserver' type="hidden" value='{$mail_smtpserver}' /></slot></td>
292                 <td scope="row">&nbsp;</td>
293                 <td >&nbsp;</td>
294             </tr>
295             {if !empty($mail_smtpauth_req)}
296             <tr>
297                 <td width="20%" scope="row" nowrap="nowrap"><span id="mail_smtpuser_label">{$MOD.LBL_MAIL_SMTPUSER}</span></td>
298                 <td width="30%" ><slot><input type="text" id="mail_smtpuser" name="mail_smtpuser" size="25" maxlength="64" value="{$mail_smtpuser}" tabindex='1' ></slot></td>
299                 <td scope="row">&nbsp;</td>
300                 <td >&nbsp;</td>
301             </tr>
302             <tr>
303                 <td width="20%" scope="row" nowrap="nowrap"><span id="mail_smtppass_label">{$MOD.LBL_MAIL_SMTPPASS}</span></td>
304                 <td width="30%" ><slot><input type="password" id="mail_smtppass" name="mail_smtppass" size="25" maxlength="64" value="{$mail_smtppass}" tabindex='1'></slot></td>
305                 <td scope="row">&nbsp;</td>
306                 <td >&nbsp;</td>
307             </tr>
308             {/if}
309             <tr>
310                 <td width="17%" scope="row"><input type="button" class="button" value="{$APP.LBL_EMAIL_TEST_OUTBOUND_SETTINGS}" onclick="startOutBoundEmailSettingsTest();"></td>
311                 <td width="33%" >&nbsp;</td>
312                 <td width="17%" scope="row">&nbsp;</td>
313                 <td width="33%" >&nbsp;</td>
314             </tr>
315         </table>
316         </div>
317     </td>
318     </table>
319     <div class="nav-buttons">
320         <input title="{$MOD.LBL_WIZARD_BACK_BUTTON}"
321             class="button" type="button" name="next_tab1" value="  {$MOD.LBL_WIZARD_BACK_BUTTON}  "
322             onclick="SugarWizard.changeScreen('locale',true);" id="previous_tab_locale" />&nbsp;
323         <input title="{$MOD.LBL_WIZARD_NEXT_BUTTON}"
324             class="button primary" type="button" name="next_tab1" value="  {$MOD.LBL_WIZARD_NEXT_BUTTON}  "
325             onclick="SugarWizard.changeScreen('finish',false);" id="next_tab_finish" />
326     </div>
327 </div>
328 {/if}
329 <div id="finish" class="screen">
330     <table width="100%" border="0" cellspacing="0" cellpadding="0">
331         <tr>
332             <td>
333                 <div class="edit view">
334                 <table width="100%" border="0" cellspacing="0" cellpadding="0">
335                 <tr>
336                     <th align="left" scope="row" colspan="4"><h2>{$MOD.LBL_WIZARD_FINISH_TITLE}</h2></th>
337                 </tr>
338                 <tr>
339                     <td scope="row">
340                         <h3>{$MOD.LBL_WIZARD_FINISH1}</h3>
341                          
342                         <table cellpadding=0 cellspacing=0><input id='whatnext' name='whatnext' type="hidden" value='finish' />
343                         {if $IS_ADMIN}
344                         <tr><td><img src=include/images/start.png style="margin-right: 5px;"></td><td><a onclick='document.UserWizard.whatnext.value="finish";document.UserWizard.submit()' href="#" ><b> {$MOD.LBL_WIZARD_FINISH2}  </b></a><br> {$MOD.LBL_WIZARD_FINISH2DESC}</td></tr>
345                         <tr><td colspan=2><hr style="margin: 5px 0px;"></td></tr>
346                         <tr><td><img src=include/images/import.png style="margin-right: 5px;"></td><td><a onclick='document.UserWizard.whatnext.value="import";document.UserWizard.submit()' href="#" ><b> {$MOD.LBL_WIZARD_FINISH3} </b></a><br> {$MOD.LBL_WIZARD_FINISH4}</td></tr>
347                         <tr><td colspan=2><hr style="margin: 5px 0px;"></td></tr>
348                         <tr><td><img src=include/images/create_users.png style="margin-right: 5px;"></td><td><a onclick='document.UserWizard.whatnext.value="users";document.UserWizard.submit()' href="#"  ><b> {$MOD.LBL_WIZARD_FINISH5} </b></a><br>{$MOD.LBL_WIZARD_FINISH6}</td></tr>
349                         <tr><td colspan=2><hr style="margin: 5px 0px;"></td></tr>
350                         <tr><td><img src=include/images/settings.png style="margin-right: 5px;"></td><td><a  onclick='document.UserWizard.whatnext.value="settings";document.UserWizard.submit()' href="#" ><b> {$MOD.LBL_WIZARD_FINISH7} </b></a><br>{$MOD.LBL_WIZARD_FINISH8}</td></tr>
351                         <tr><td colspan=2><hr style="margin: 5px 0px;"></td></tr>
352                         <tr><td><img src=include/images/configure.png style="margin-right: 5px;"></td><td><a onclick='document.UserWizard.whatnext.value="studio";document.UserWizard.submit()' href="#"  ><b> {$MOD.LBL_WIZARD_FINISH9} </b></a><br>{$MOD.LBL_WIZARD_FINISH10}</td></tr>
353                         <tr><td colspan=2><hr style="margin: 5px 0px;"></td></tr>
354                         <tr><td><img src=include/images/university.png style="margin-right: 5px;"></td><td><a href="http://www.sugarcrm.com/university" target="_blank"><b> {$MOD.LBL_WIZARD_FINISH11} </b></a></b><br>{$MOD.LBL_WIZARD_FINISH12}</td></tr>
355                         <tr><td colspan=2><hr style="margin: 5px 0px;"></td></tr>
356                         {else}
357                             <tr><td><img src=include/images/university2.png style="margin-right: 5px;"></td><td><a href="http://www.sugarcrm.com/university" target="_blank"><b> {$MOD.LBL_WIZARD_FINISH11} </b></a></b><br>{$MOD.LBL_WIZARD_FINISH12}</td></tr>
358                             <tr><td colspan=2><hr style="margin: 5px 0px;"></td></tr>
359                             <tr><td><img src=include/images/docs.png style="margin-right: 5px;"></td><td><a href="http://docs.sugarcrm.com/" target="_blank"><b> {$MOD.LBL_WIZARD_FINISH14} </b></a></b><br>{$MOD.LBL_WIZARD_FINISH15}</td></tr>
360                             <tr><td colspan=2><hr style="margin: 5px 0px;"></td></tr>
361                             <tr><td><img src=include/images/kb.png style="margin-right: 5px;"></td><td><a href="http://kb.sugarcrm.com/" target="_blank"><b> {$MOD.LBL_WIZARD_FINISH16} </b></a></b><br>{$MOD.LBL_WIZARD_FINISH17}</td></tr>
362                             <tr><td colspan=2><hr style="margin: 5px 0px;"></td></tr>
363                             <tr><td><img src=include/images/forums.png style="margin-right: 5px;"></td><td><a href="http://www.sugarcrm.com/forums" target="_blank"><b> {$MOD.LBL_WIZARD_FINISH18} </b></a></b><br>{$MOD.LBL_WIZARD_FINISH19}</td></tr>
364                             <tr><td colspan=2><hr style="margin: 5px 0px;"></td></tr>
365                         {/if}
366                         </table>
367                     </td>
368                 </tr>
369                 </table>
370                 </div>
371             </td>
372         </tr>
373     </table>
374     <div class="nav-buttons">
375         <input title="{$MOD.LBL_WIZARD_BACK_BUTTON}"
376             class="button" type="button" name="next_tab1" value="  {$MOD.LBL_WIZARD_BACK_BUTTON}  "
377             {if !$HIDE_IF_CAN_USE_DEFAULT_OUTBOUND}
378             onclick="SugarWizard.changeScreen('smtp',true);" id="previous_tab_smtp" />&nbsp;
379             {else}
380             onclick="SugarWizard.changeScreen('locale',true);" id="previous_tab_locale" />&nbsp;
381             {/if}
382         <input title="{$MOD.LBL_WIZARD_FINISH_BUTTON}" class="button primary"
383             type="submit" name="save" value="  {$MOD.LBL_WIZARD_FINISH_BUTTON}  " />&nbsp;
384     </div>
385 </div>
386
387                         
388                 
389
390 </div>
391
392 </div>
393
394 {literal}
395 <script type='text/javascript'>
396 <!--
397 var SugarWizard = new function()
398 {
399     this.currentScreen = 'welcome';
400
401     this.handleKeyStroke = function(e)
402     {
403         // get the key pressed
404         var key;
405         if (window.event) {
406             key = window.event.keyCode;
407         }
408         else if(e.which) {
409             key = e.which
410         }
411
412         switch(key) {
413         case 13:
414             primaryButton = YAHOO.util.Selector.query('input.primary',SugarWizard.currentScreen,true);
415             primaryButton.click();
416             break;
417         }
418     }
419
420     this.changeScreen = function(screen,skipCheck)
421     {
422         if ( !skipCheck ) {
423             clear_all_errors();
424             var form = document.getElementById('UserWizard');
425             var isError = false;
426
427             switch(this.currentScreen) {
428             case 'personalinfo':
429                 if ( document.getElementById('last_name').value == '' ) {
430                     add_error_style('UserWizard',form.last_name.name,
431                         '{/literal}{$APP.ERR_MISSING_REQUIRED_FIELDS} {$MOD.LBL_LAST_NAME}{literal}' );
432                     isError = true;
433                 }
434                 {/literal}
435                 {if $REQUIRED_EMAIL_ADDRESS}
436                 {literal}
437                 if ( document.getElementById('email1').value == '' ) {
438                     add_error_style('UserWizard',form.email1.name,
439                         '{/literal}{$APP.ERR_MISSING_REQUIRED_FIELDS} {$MOD.LBL_EMAIL}{literal}' );
440                     isError = true;
441                 }
442                 {/literal}
443                 {/if}
444                 {literal}
445                 break;
446             }
447             if (isError == true)
448                 return false;
449         }
450
451         document.getElementById(this.currentScreen).style.display = 'none';
452         document.getElementById(screen).style.display = 'block';
453
454         this.currentScreen = screen;
455     }
456 }
457 {/literal}
458 {if $SKIP_WELCOME}
459 SugarWizard.changeScreen('personalinfo');
460 {else}
461 SugarWizard.changeScreen('welcome');
462 {/if}
463 {literal}
464 document.onkeypress = SugarWizard.handleKeyStroke;
465
466 var mail_smtpport = '{/literal}{$MAIL_SMTPPORT}{literal}';
467 var mail_smtpssl = '{/literal}{$MAIL_SMTPSSL}{literal}';
468
469 EmailMan = {};
470
471 function startOutBoundEmailSettingsTest()
472 {
473     var loader = new YAHOO.util.YUILoader({
474     require : ["element","sugarwidgets"],
475     loadOptional: true,
476     skin: { base: 'blank', defaultSkin: '' },
477     onSuccess: testOutboundSettings,
478     allowRollup: true,
479     base: "include/javascript/yui/build/"
480     });
481     loader.addModule({
482         name :"sugarwidgets",
483         type : "js",
484         fullpath: "include/javascript/sugarwidgets/SugarYUIWidgets.js",
485         varName: "YAHOO.SUGAR",
486         requires: ["datatable", "dragdrop", "treeview", "tabview"]
487     });
488     loader.insert();
489
490 }
491
492 function testOutboundSettings()
493 {
494         var errorMessage = '';
495         var isError = false;
496         var fromAddress = document.getElementById("outboundtest_from_address").value;
497     var errorMessage = '';
498     var isError = false;
499     var smtpServer = document.getElementById('mail_smtpserver').value;
500
501     var mailsmtpauthreq = document.getElementById('mail_smtpauth_req');
502     if(trim(smtpServer) == '' || trim(mail_smtpport) == '')
503     {
504         isError = true;
505         errorMessage += "{/literal}{$MOD.LBL_MISSING_DEFAULT_OUTBOUND_SMTP_SETTINGS}{literal}" + "<br/>";
506         overlay("{/literal}{$APP.ERR_MISSING_REQUIRED_FIELDS}{literal}", errorMessage, 'alert');
507         return false;
508     }
509     
510     if(document.getElementById('mail_smtpuser') && trim(document.getElementById('mail_smtpuser').value) == '') 
511     {
512         isError = true;
513         errorMessage += "{/literal}{$APP.LBL_EMAIL_ACCOUNTS_SMTPUSER}{literal}" + "<br/>";
514     }
515     
516     if(document.getElementById('mail_smtppass') && trim(document.getElementById('mail_smtppass').value) == '') 
517     {
518         isError = true;
519         errorMessage += "{/literal}{$APP.LBL_EMAIL_ACCOUNTS_SMTPPASS}{literal}" + "<br/>";
520     }
521     
522     if(isError) {
523         overlay("{/literal}{$APP.ERR_MISSING_REQUIRED_FIELDS}{literal}", errorMessage, 'alert');
524         return false;
525     }
526
527     testOutboundSettingsDialog();
528 }
529
530 function sendTestEmail()
531 {
532     var fromAddress = document.getElementById("outboundtest_from_address").value;
533
534     if (trim(fromAddress) == "")
535     {
536         overlay("{/literal}{$APP.ERR_MISSING_REQUIRED_FIELDS}{literal}", "{{/literal}$APP.LBL_EMAIL_SETTINGS_FROM_TO_EMAIL_ADDR}{literal}", 'alert');
537         return;
538     }
539     else if (!isValidEmail(fromAddress)) {
540         overlay("{/literal}{$APP.ERR_INVALID_REQUIRED_FIELDS}{literal}", "{/literal}{$APP.LBL_EMAIL_SETTINGS_FROM_TO_EMAIL_ADDR}{literal}", 'alert');
541         return;
542     }
543
544     //Hide the email address window and show a message notifying the user that the test email is being sent.
545     EmailMan.testOutboundDialog.hide();
546     overlay("{/literal}{$APP.LBL_EMAIL_PERFORMING_TASK}{literal}", "{/literal}{$APP.LBL_EMAIL_ONE_MOMENT}{literal}", 'alert');
547
548     var callbackOutboundTest = {
549         success : function(o) {
550                 hideOverlay();
551                 overlay("{/literal}{$APP.LBL_EMAIL_TEST_OUTBOUND_SETTINGS}{literal}", "{/literal}{$APP.LBL_EMAIL_TEST_NOTIFICATION_SENT}{literal}", 'alert');
552         }
553     };
554     var smtpServer = document.getElementById('mail_smtpserver').value;
555     if(document.getElementById('mail_smtpuser') && document.getElementById('mail_smtppass'))
556        {
557          var postDataString = 'mail_sendtype=SMTP&mail_smtpserver=' + smtpServer + "&mail_smtpport=" + mail_smtpport + "&mail_smtpssl=" + mail_smtpssl + "&mail_smtpauth_req=true&mail_smtpuser=" + trim(document.getElementById('mail_smtpuser').value) + "&mail_smtppass=" + trim(document.getElementById('mail_smtppass').value) + "&outboundtest_from_address=" + fromAddress;
558         }
559     else
560        {
561          var postDataString = 'mail_sendtype=SMTP&mail_smtpserver=' + smtpServer + "&mail_smtpport=" + mail_smtpport + "&mail_smtpssl=" + mail_smtpssl + "&outboundtest_from_address=" + fromAddress;
562         }
563         YAHOO.util.Connect.asyncRequest("POST", "index.php?action=testOutboundEmail&module=EmailMan&to_pdf=true&sugar_body_only=true", callbackOutboundTest, postDataString);
564 }
565 function testOutboundSettingsDialog() {
566         // lazy load dialogue
567         if(!EmailMan.testOutboundDialog) {
568                 EmailMan.testOutboundDialog = new YAHOO.widget.Dialog("testOutboundDialog", {
569                 modal:true,
570                                 visible:true,
571                 fixedcenter:true,
572                 constraintoviewport: true,
573                 width   : 600,
574                 shadow  : false
575             });
576             EmailMan.testOutboundDialog.setHeader("{/literal}{$APP.LBL_EMAIL_TEST_OUTBOUND_SETTINGS}{literal}");
577             YAHOO.util.Dom.removeClass("testOutboundDialog", "yui-hidden");
578         } // end lazy load
579
580         EmailMan.testOutboundDialog.render();
581         EmailMan.testOutboundDialog.show();
582 } // fn
583
584 function overlay(reqtitle, body, type) {
585     var config = { };
586     config.type = type;
587     config.title = reqtitle;
588     config.msg = body;
589     YAHOO.SUGAR.MessageBox.show(config);
590 }
591
592 function hideOverlay() {
593         YAHOO.SUGAR.MessageBox.hide();
594 }
595 -->
596 </script>
597 {/literal}
598 {$JAVASCRIPT}
599 {literal}
600 <script type="text/javascript" language="Javascript">
601 {/literal}
602 {$getNameJs}
603 {$getNumberJs}
604 {$currencySymbolJs}
605 setSymbolValue(document.getElementById('currency_select').selectedIndex);
606 setSigDigits();
607
608 {$confirmReassignJs}
609 </script>
610 </form>
611
612 <div id="testOutboundDialog" class="yui-hidden">
613     <div id="testOutbound">
614         <form>
615                 <table width="100%" border="0" cellspacing="0" cellpadding="0" class="edit view">
616                         <tr>
617                                 <td scope="row">
618                                         {$APP.LBL_EMAIL_SETTINGS_FROM_TO_EMAIL_ADDR}
619                                         <span class="required">
620                                                 {$APP.LBL_REQUIRED_SYMBOL}
621                                         </span>
622                                 </td>
623                                 <td >
624                                         <input type="text" id="outboundtest_from_address" name="outboundtest_from_address" size="35" maxlength="64" value="">
625                                 </td>
626                         </tr>
627                         <tr>
628                                 <td scope="row" colspan="2">
629                                         <input type="button" class="button" value="   {$APP.LBL_EMAIL_SEND}   " onclick="javascript:sendTestEmail();">&nbsp;
630                                         <input type="button" class="button" value="   {$APP.LBL_CANCEL_BUTTON_LABEL}   " onclick="javascript:EmailMan.testOutboundDialog.hide();">&nbsp;
631                                 </td>
632                         </tr>
633                 </table>
634                 </form>
635         </div>
636 </div>