]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Users/tpls/wizard.tpl
Release 6.3.0beta2
[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>
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='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='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' 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='11' 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='6' 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}<br />{$MOD.LBL_LOCALE_NAME_FORMAT_DESC_2}{/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 valign="top">
255                             <input onkeyup="setPreview();" onkeydown="setPreview();" id="default_locale_name_format" type="text" tabindex='14' name="default_locale_name_format" value="{$default_locale_name_format}">
256                         </td>
257                         <td nowrap="nowrap" scope="row" valign="top"><i>{$MOD.LBL_LOCALE_EXAMPLE_NAME_FORMAT}:</i> </td>
258                         <td valign="top"><input tabindex='14' name="no_value" id="nameTarget" value="" style="border: none;" disabled size="30"></td>
259                     </tr>
260                 </table>
261                 </div>
262             </td>
263         </tr>
264     </table>
265     <div class="nav-buttons">
266         <input title="{$MOD.LBL_WIZARD_BACK_BUTTON}"
267             class="button" type="button" name="next_tab1" value="  {$MOD.LBL_WIZARD_BACK_BUTTON}  "
268             onclick="SugarWizard.changeScreen('personalinfo',true);" id="previous_tab_personalinfo" />&nbsp;
269         <input title="{$MOD.LBL_WIZARD_NEXT_BUTTON}"
270             class="button primary" type="button" name="next_tab1" value="  {$MOD.LBL_WIZARD_NEXT_BUTTON}  "
271             {if !$HIDE_IF_CAN_USE_DEFAULT_OUTBOUND}
272             onclick="SugarWizard.changeScreen('smtp',false);" id="next_tab_smtp" />
273             {else}
274             onclick="SugarWizard.changeScreen('finish',false);" id="next_tab_finish" />
275             {/if}
276     </div>
277 </div>
278 {if !$HIDE_IF_CAN_USE_DEFAULT_OUTBOUND}
279 <div id="smtp" class="screen">
280     <table width="100%" border="0" cellspacing="0" cellpadding="0">
281     <tr>
282     <td>
283         <div class="edit view">
284         <table width="100%" border="0" cellspacing="0" cellpadding="0">
285             <tr>
286                 <th align="left" scope="row" colspan="4">
287                     <h2>{$MOD.LBL_WIZARD_SMTP}</h2>
288                 </th>
289             </tr>
290             <tr>
291                 <td align="left" scope="row" colspan="4"><i>{$MOD.LBL_WIZARD_SMTP_DESC}</i></td>
292             </tr>
293             <tr>
294                 <td width="20%" scope="row"><span id="mail_smtpserver_label">{$MOD.LBL_EMAIL_PROVIDER}</span></td>
295                 <td width="30%" ><slot>{$mail_smtpdisplay}<input id='mail_smtpserver' name='mail_smtpserver' type="hidden" value='{$mail_smtpserver}' /></slot></td>
296                 <td scope="row">&nbsp;</td>
297                 <td >&nbsp;</td>
298             </tr>
299             {if !empty($mail_smtpauth_req)}
300             <tr>
301                 <td width="20%" scope="row" nowrap="nowrap"><span id="mail_smtpuser_label">{$MOD.LBL_MAIL_SMTPUSER}</span></td>
302                 <td width="30%" ><slot><input type="text" id="mail_smtpuser" name="mail_smtpuser" size="25" maxlength="64" value="{$mail_smtpuser}" tabindex='1' ></slot></td>
303                 <td scope="row">&nbsp;</td>
304                 <td >&nbsp;</td>
305             </tr>
306             <tr>
307                 <td width="20%" scope="row" nowrap="nowrap"><span id="mail_smtppass_label">{$MOD.LBL_MAIL_SMTPPASS}</span></td>
308                 <td width="30%" ><slot><input type="password" id="mail_smtppass" name="mail_smtppass" size="25" maxlength="64" value="{$mail_smtppass}" tabindex='1'></slot></td>
309                 <td scope="row">&nbsp;</td>
310                 <td >&nbsp;</td>
311             </tr>
312             {/if}
313             <tr>
314                 <td width="17%" scope="row"><input type="button" class="button" value="{$APP.LBL_EMAIL_TEST_OUTBOUND_SETTINGS}" onclick="startOutBoundEmailSettingsTest();"></td>
315                 <td width="33%" >&nbsp;</td>
316                 <td width="17%" scope="row">&nbsp;</td>
317                 <td width="33%" >&nbsp;</td>
318             </tr>
319         </table>
320         </div>
321     </td>
322     </table>
323     <div class="nav-buttons">
324         <input title="{$MOD.LBL_WIZARD_BACK_BUTTON}"
325             class="button" type="button" name="next_tab1" value="  {$MOD.LBL_WIZARD_BACK_BUTTON}  "
326             onclick="SugarWizard.changeScreen('locale',true);" id="previous_tab_locale" />&nbsp;
327         <input title="{$MOD.LBL_WIZARD_NEXT_BUTTON}"
328             class="button primary" type="button" name="next_tab1" value="  {$MOD.LBL_WIZARD_NEXT_BUTTON}  "
329             onclick="SugarWizard.changeScreen('finish',false);" id="next_tab_finish" />
330     </div>
331 </div>
332 {/if}
333 <div id="finish" class="screen">
334     <table width="100%" border="0" cellspacing="0" cellpadding="0">
335         <tr>
336             <td>
337                 <div class="edit view">
338                 <table width="100%" border="0" cellspacing="0" cellpadding="0">
339                 <tr>
340                     <th align="left" scope="row" colspan="4"><h2>{$MOD.LBL_WIZARD_FINISH_TITLE}</h2></th>
341                 </tr>
342                 <tr>
343                     <td scope="row">
344                         <h3>{$MOD.LBL_WIZARD_FINISH1}</h3>
345                          
346                         <table cellpadding=0 cellspacing=0><input id='whatnext' name='whatnext' type="hidden" value='finish' />
347                         {if $IS_ADMIN}
348                         <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>
349                         <tr><td colspan=2><hr style="margin: 5px 0px;"></td></tr>
350                         <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>
351                         <tr><td colspan=2><hr style="margin: 5px 0px;"></td></tr>
352                         <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>
353                         <tr><td colspan=2><hr style="margin: 5px 0px;"></td></tr>
354                         <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>
355                         <tr><td colspan=2><hr style="margin: 5px 0px;"></td></tr>
356                         <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>
357                         <tr><td colspan=2><hr style="margin: 5px 0px;"></td></tr>
358                         {else}
359                             <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>
360                             <tr><td colspan=2><hr style="margin: 5px 0px;"></td></tr>
361                             <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>
362                             <tr><td colspan=2><hr style="margin: 5px 0px;"></td></tr>
363                             <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>
364                             <tr><td colspan=2><hr style="margin: 5px 0px;"></td></tr>
365                             <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>
366                             <tr><td colspan=2><hr style="margin: 5px 0px;"></td></tr>
367                         {/if}
368                         </table>
369                     </td>
370                 </tr>
371                 </table>
372                 </div>
373             </td>
374         </tr>
375     </table>
376     <div class="nav-buttons">
377         <input title="{$MOD.LBL_WIZARD_BACK_BUTTON}"
378             class="button" type="button" name="next_tab1" value="  {$MOD.LBL_WIZARD_BACK_BUTTON}  "
379             {if !$HIDE_IF_CAN_USE_DEFAULT_OUTBOUND}
380             onclick="SugarWizard.changeScreen('smtp',true);" id="previous_tab_smtp" />&nbsp;
381             {else}
382             onclick="SugarWizard.changeScreen('locale',true);" id="previous_tab_locale" />&nbsp;
383             {/if}
384         <input title="{$MOD.LBL_WIZARD_FINISH_BUTTON}" class="button primary"
385             type="submit" name="save" value="  {$MOD.LBL_WIZARD_FINISH_BUTTON}  " />&nbsp;
386     </div>
387 </div>
388
389                         
390                 
391
392 </div>
393
394 </div>
395
396 {literal}
397 <script type='text/javascript'>
398 <!--
399 var SugarWizard = new function()
400 {
401     this.currentScreen = 'welcome';
402
403     this.handleKeyStroke = function(e)
404     {
405         // get the key pressed
406         var key;
407         if (window.event) {
408             key = window.event.keyCode;
409         }
410         else if(e.which) {
411             key = e.which
412         }
413
414         switch(key) {
415         case 13:
416             primaryButton = YAHOO.util.Selector.query('input.primary',SugarWizard.currentScreen,true);
417             primaryButton.click();
418             break;
419         }
420     }
421
422     this.changeScreen = function(screen,skipCheck)
423     {
424         if ( !skipCheck ) {
425             clear_all_errors();
426             var form = document.getElementById('UserWizard');
427             var isError = false;
428
429             switch(this.currentScreen) {
430             case 'personalinfo':
431                 if ( document.getElementById('last_name').value == '' ) {
432                     add_error_style('UserWizard',form.last_name.name,
433                         '{/literal}{$APP.ERR_MISSING_REQUIRED_FIELDS} {$MOD.LBL_LAST_NAME}{literal}' );
434                     isError = true;
435                 }
436                 {/literal}
437                 {if $REQUIRED_EMAIL_ADDRESS}
438                 {literal}
439                 if ( document.getElementById('email1').value == '' ) {
440                     add_error_style('UserWizard',form.email1.name,
441                         '{/literal}{$APP.ERR_MISSING_REQUIRED_FIELDS} {$MOD.LBL_EMAIL}{literal}' );
442                     isError = true;
443                 }
444                 {/literal}
445                 {/if}
446                 {literal}
447                 break;
448             }
449             if (isError == true)
450                 return false;
451         }
452
453         document.getElementById(this.currentScreen).style.display = 'none';
454         document.getElementById(screen).style.display = 'block';
455
456         this.currentScreen = screen;
457     }
458 }
459 {/literal}
460 {if $SKIP_WELCOME}
461 SugarWizard.changeScreen('personalinfo');
462 {else}
463 SugarWizard.changeScreen('welcome');
464 {/if}
465 {literal}
466 document.onkeypress = SugarWizard.handleKeyStroke;
467
468 var mail_smtpport = '{/literal}{$MAIL_SMTPPORT}{literal}';
469 var mail_smtpssl = '{/literal}{$MAIL_SMTPSSL}{literal}';
470
471 EmailMan = {};
472
473 function startOutBoundEmailSettingsTest()
474 {
475     var loader = new YAHOO.util.YUILoader({
476     require : ["element","sugarwidgets"],
477     loadOptional: true,
478     skin: { base: 'blank', defaultSkin: '' },
479     onSuccess: testOutboundSettings,
480     allowRollup: true,
481     base: "include/javascript/yui/build/"
482     });
483     loader.addModule({
484         name :"sugarwidgets",
485         type : "js",
486         fullpath: "include/javascript/sugarwidgets/SugarYUIWidgets.js",
487         varName: "YAHOO.SUGAR",
488         requires: ["datatable", "dragdrop", "treeview", "tabview"]
489     });
490     loader.insert();
491
492 }
493
494 function testOutboundSettings()
495 {
496         var errorMessage = '';
497         var isError = false;
498         var fromAddress = document.getElementById("outboundtest_from_address").value;
499     var errorMessage = '';
500     var isError = false;
501     var smtpServer = document.getElementById('mail_smtpserver').value;
502
503     var mailsmtpauthreq = document.getElementById('mail_smtpauth_req');
504     if(trim(smtpServer) == '' || trim(mail_smtpport) == '')
505     {
506         isError = true;
507         errorMessage += "{/literal}{$MOD.LBL_MISSING_DEFAULT_OUTBOUND_SMTP_SETTINGS}{literal}" + "<br/>";
508         overlay("{/literal}{$APP.ERR_MISSING_REQUIRED_FIELDS}{literal}", errorMessage, 'alert');
509         return false;
510     }
511     
512     if(document.getElementById('mail_smtpuser') && trim(document.getElementById('mail_smtpuser').value) == '') 
513     {
514         isError = true;
515         errorMessage += "{/literal}{$APP.LBL_EMAIL_ACCOUNTS_SMTPUSER}{literal}" + "<br/>";
516     }
517     
518     if(document.getElementById('mail_smtppass') && trim(document.getElementById('mail_smtppass').value) == '') 
519     {
520         isError = true;
521         errorMessage += "{/literal}{$APP.LBL_EMAIL_ACCOUNTS_SMTPPASS}{literal}" + "<br/>";
522     }
523     
524     if(isError) {
525         overlay("{/literal}{$APP.ERR_MISSING_REQUIRED_FIELDS}{literal}", errorMessage, 'alert');
526         return false;
527     }
528
529     testOutboundSettingsDialog();
530 }
531
532 function sendTestEmail()
533 {
534     var fromAddress = document.getElementById("outboundtest_from_address").value;
535
536     if (trim(fromAddress) == "")
537     {
538         overlay("{/literal}{$APP.ERR_MISSING_REQUIRED_FIELDS}{literal}", "{{/literal}$APP.LBL_EMAIL_SETTINGS_FROM_TO_EMAIL_ADDR}{literal}", 'alert');
539         return;
540     }
541     else if (!isValidEmail(fromAddress)) {
542         overlay("{/literal}{$APP.ERR_INVALID_REQUIRED_FIELDS}{literal}", "{/literal}{$APP.LBL_EMAIL_SETTINGS_FROM_TO_EMAIL_ADDR}{literal}", 'alert');
543         return;
544     }
545
546     //Hide the email address window and show a message notifying the user that the test email is being sent.
547     EmailMan.testOutboundDialog.hide();
548     overlay("{/literal}{$APP.LBL_EMAIL_PERFORMING_TASK}{literal}", "{/literal}{$APP.LBL_EMAIL_ONE_MOMENT}{literal}", 'alert');
549
550     var callbackOutboundTest = {
551         success : function(o) {
552                 hideOverlay();
553                 overlay("{/literal}{$APP.LBL_EMAIL_TEST_OUTBOUND_SETTINGS}{literal}", "{/literal}{$APP.LBL_EMAIL_TEST_NOTIFICATION_SENT}{literal}", 'alert');
554         }
555     };
556     var smtpServer = document.getElementById('mail_smtpserver').value;
557     if(document.getElementById('mail_smtpuser') && document.getElementById('mail_smtppass'))
558        {
559          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;
560         }
561     else
562        {
563          var postDataString = 'mail_sendtype=SMTP&mail_smtpserver=' + smtpServer + "&mail_smtpport=" + mail_smtpport + "&mail_smtpssl=" + mail_smtpssl + "&outboundtest_from_address=" + fromAddress;
564         }
565         YAHOO.util.Connect.asyncRequest("POST", "index.php?action=testOutboundEmail&module=EmailMan&to_pdf=true&sugar_body_only=true", callbackOutboundTest, postDataString);
566 }
567 function testOutboundSettingsDialog() {
568         // lazy load dialogue
569         if(!EmailMan.testOutboundDialog) {
570                 EmailMan.testOutboundDialog = new YAHOO.widget.Dialog("testOutboundDialog", {
571                 modal:true,
572                                 visible:true,
573                 fixedcenter:true,
574                 constraintoviewport: true,
575                 width   : 600,
576                 shadow  : false
577             });
578             EmailMan.testOutboundDialog.setHeader("{/literal}{$APP.LBL_EMAIL_TEST_OUTBOUND_SETTINGS}{literal}");
579             YAHOO.util.Dom.removeClass("testOutboundDialog", "yui-hidden");
580         } // end lazy load
581
582         EmailMan.testOutboundDialog.render();
583         EmailMan.testOutboundDialog.show();
584 } // fn
585
586 function overlay(reqtitle, body, type) {
587     var config = { };
588     config.type = type;
589     config.title = reqtitle;
590     config.msg = body;
591     YAHOO.SUGAR.MessageBox.show(config);
592 }
593
594 function hideOverlay() {
595         YAHOO.SUGAR.MessageBox.hide();
596 }
597 -->
598 </script>
599 {/literal}
600 {$JAVASCRIPT}
601 {literal}
602 <script type="text/javascript" language="Javascript">
603 {/literal}
604 {$getNameJs}
605 {$getNumberJs}
606 {$currencySymbolJs}
607 setSymbolValue(document.getElementById('currency_select').selectedIndex);
608 setSigDigits();
609
610 {$confirmReassignJs}
611 </script>
612 </form>
613
614 <div id="testOutboundDialog" class="yui-hidden">
615     <div id="testOutbound">
616         <form>
617                 <table width="100%" border="0" cellspacing="0" cellpadding="0" class="edit view">
618                         <tr>
619                                 <td scope="row">
620                                         {$APP.LBL_EMAIL_SETTINGS_FROM_TO_EMAIL_ADDR}
621                                         <span class="required">
622                                                 {$APP.LBL_REQUIRED_SYMBOL}
623                                         </span>
624                                 </td>
625                                 <td >
626                                         <input type="text" id="outboundtest_from_address" name="outboundtest_from_address" size="35" maxlength="64" value="">
627                                 </td>
628                         </tr>
629                         <tr>
630                                 <td scope="row" colspan="2">
631                                         <input type="button" class="button" value="   {$APP.LBL_EMAIL_SEND}   " onclick="javascript:sendTestEmail();">&nbsp;
632                                         <input type="button" class="button" value="   {$APP.LBL_CANCEL_BUTTON_LABEL}   " onclick="javascript:EmailMan.testOutboundDialog.hide();">&nbsp;
633                                 </td>
634                         </tr>
635                 </table>
636                 </form>
637         </div>
638 </div>