3 /*********************************************************************************
4 * SugarCRM Community Edition is a customer relationship management program developed by
5 * SugarCRM, Inc. Copyright (C) 2004-2013 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 ********************************************************************************/
42 <form name="ConfigureSettings" enctype='multipart/form-data' method="POST" action="index.php" onSubmit="return (add_checks(document.ConfigureSettings) && check_form('ConfigureSettings'));">
43 <input type='hidden' name='action' value='SaveConfig'/>
44 <input type='hidden' name='module' value='Configurator'/>
45 <span class='error'>{$error.main}</span>
46 <table width="100%" cellpadding="0" cellspacing="1" border="0" class="actionsContainer">
50 <input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button primary" id="ConfigureSettings_save_button" type="submit" name="save" value=" {$APP.LBL_SAVE_BUTTON_LABEL} " >
51 <input title="{$MOD.LBL_SAVE_BUTTON_TITLE}" id="ConfigureSettings_restore_button" class="button" type="submit" name="restore" value=" {$MOD.LBL_RESTORE_BUTTON_LABEL} " >
52 <input title="{$MOD.LBL_CANCEL_BUTTON_TITLE}" id="ConfigureSettings_cancel_button" onclick="document.location.href='index.php?module=Administration&action=index'" class="button" type="button" name="cancel" value=" {$APP.LBL_CANCEL_BUTTON_LABEL} " > </td>
57 <table width="100%" border="0" cellspacing="1" cellpadding="0" class="edit view">
59 <th align="left" scope="row" colspan="4"><h4>{$MOD.DEFAULT_SYSTEM_SETTINGS}</h4></th>
63 <td scope="row">{$MOD.LIST_ENTRIES_PER_LISTVIEW}: </td>
65 <input type='text' size='4' id='ConfigureSettings_list_max_entries_per_page' name='list_max_entries_per_page' value='{$config.list_max_entries_per_page}'>
67 <td scope="row">{$MOD.LIST_ENTRIES_PER_SUBPANEL}: </td>
69 <input type='text' size='4' id='ConfigureSettings_list_max_entries_per_subpanel' name='list_max_entries_per_subpanel' value='{$config.list_max_entries_per_subpanel}'>
73 <td scope="row">{$MOD.LOCK_HOMEPAGE}: </td>
75 {if !empty($config.lock_homepage)}
76 {assign var='lock_homepage_checked' value='CHECKED'}
78 {assign var='lock_homepage_checked' value=''}
80 <input type='hidden' name='lock_homepage' value='false'>
81 <input type='checkbox' name='lock_homepage' value='true' {$lock_homepage_checked}>
83 <td scope="row">{$MOD.LOCK_SUBPANELS}: </td>
85 {if !empty($config.lock_subpanels)}
86 {assign var='lock_subpanels_checked' value='CHECKED'}
88 {assign var='lock_subpanels_checked' value=''}
90 <input type='hidden' name='lock_subpanels' value='false'>
91 <input type='checkbox' name='lock_subpanels' value='true' {$lock_subpanels_checked}>
95 <td scope="row" nowrap>{$MOD.MAX_DASHLETS}: </td>
97 <input type='text' size='4' name='max_dashlets_homepage' value='{$config.max_dashlets_homepage}'>
99 <td scope="row" nowrap>{$MOD.LBL_USE_REAL_NAMES}: {sugar_help text=$MOD.LBL_USE_REAL_NAMES_DESC}</td>
100 {if !empty($config.use_real_names)}
101 {assign var='use_real_names' value='CHECKED'}
103 {assign var='use_real_names' value=''}
106 <input type='hidden' name='use_real_names' value='false'>
107 <input name='use_real_names' type="checkbox" value="true" {$use_real_names}>
111 <td scope="row">{$MOD.DISPLAY_RESPONSE_TIME}: </td>
112 {if !empty($config.calculate_response_time )}
113 {assign var='calculate_response_time_checked' value='CHECKED'}
115 {assign var='calculate_response_time_checked' value=''}
117 <td ><input type='hidden' name='calculate_response_time' value='false'><input name='calculate_response_time' type="checkbox" value="true" {$calculate_response_time_checked}></td>
118 <td scope="row">{$MOD.LBL_MODULE_FAVICON} {sugar_help text=$MOD.LBL_MODULE_FAVICON_HELP} </td>
119 {if !empty($config.default_module_favicon)}
120 {assign var='default_module_favicon' value='CHECKED'}
122 {assign var='default_module_favicon' value=''}
125 <input type='hidden' name='default_module_favicon' value='false'>
126 <input name='default_module_favicon' type="checkbox" value="true" {$default_module_favicon}>
130 <td scope="row" width='15%' nowrap>{$MOD.SYSTEM_NAME} </td>
132 <input type='text' name='system_name' value='{$settings.system_name}'>
134 <td scope="row" width='15%' nowrap>{$MOD.LBL_MIN_AUTO_REFRESH_INTERVAL} {sugar_help text=$MOD.LBL_MIN_AUTO_REFRESH_INTERVAL_HELP} </td>
136 <select name='dashlet_auto_refresh_min' id='dashlet_auto_refresh_min'>{$AUTO_REFRESH_INTERVAL_OPTIONS}</select>
140 <td scope="row" width='12%' nowrap>
141 {$MOD.CURRENT_LOGO} {sugar_help text=$MOD.CURRENT_LOGO_HELP}
144 <img id="company_logo_image" src='{$company_logo}' alt=$mod_strings.LBL_LOGO>
148 <td scope="row" width='12%' nowrap>
149 {$MOD.NEW_LOGO} {sugar_help text=$MOD.NEW_LOGO_HELP_NO_SPACE}
152 <div id="container_upload"></div>
153 <input type='text' id='company_logo' name='company_logo' style="display:none">
157 <td scope="row">{$MOD.LBL_LEAD_CONV_OPTION}: {sugar_help text=$MOD.LEAD_CONV_OPT_HELP}</td>
158 <td> <select name="lead_conv_activity_opt">{$lead_conv_activities}</select></td>
159 <td><a href="./index.php?module=Administration&action=ConfigureAjaxUI" id="configure_ajax">{$MOD.LBL_CONFIG_AJAX}</a> {sugar_help text=$MOD.LBL_CONFIG_AJAX_DESC}</td>
163 <td scope="row" nowrap>{$MOD.LBL_DISALBE_CONVERT_LEAD}: {sugar_help text=$MOD.LBL_DISALBE_CONVERT_LEAD_DESC}</td>
164 {if !empty($config.disable_convert_lead)}
165 {assign var='disable_convert_lead' value='CHECKED'}
167 {assign var='disable_convert_lead' value=''}
170 <input type='hidden' name='disable_convert_lead' value='false'>
171 <input name='disable_convert_lead' type="checkbox" value="true" {$disable_convert_lead}>
173 <td colspan="2"> </td>
177 <td scope="row" nowrap>{$MOD.LBL_ENABLE_ACTION_MENU}: {sugar_help text=$MOD.LBL_ENABLE_ACTION_MENU_DESC}</td>
178 {if isset($config.enable_action_menu) && $config.enable_action_menu != "true" }
179 {assign var='enable_action_menu' value=''}
181 {assign var='enable_action_menu' value='CHECKED'}
184 <input type='hidden' name='enable_action_menu' value='false'>
185 <input name='enable_action_menu' type="checkbox" value="true" {$enable_action_menu}>
187 <td colspan="2"> </td>
195 <table width="100%" border="0" cellspacing="1" cellpadding="0" class="edit view">
198 <th align="left" scope="row" colspan="4"><h4>{$MOD.LBL_PROXY_TITLE}</h4></th>
201 <td width="25%" scope="row" valign='middle'>{$MOD.LBL_PROXY_ON} {sugar_help text=$MOD.LBL_PROXY_ON_DESC}</td>
202 {if !empty($settings.proxy_on)}
203 {assign var='proxy_on_checked' value='CHECKED'}
205 {assign var='proxy_on_checked' value=''}
207 <td width="75%" align="left" valign='middle' colspan='3'><input type='hidden' name='proxy_on' value='0'><input name="proxy_on" id="proxy_on" value="1" class="checkbox" tabindex='1' type="checkbox" {$proxy_on_checked} onclick='toggleDisplay_2("proxy_config_display")'></td>
210 <div id="proxy_config_display" style='display:{$PROXY_CONFIG_DISPLAY}'>
211 <table width="100%" cellpadding="0" cellspacing="1"><tr>
212 <td width="15%" scope="row">{$MOD.LBL_PROXY_HOST}<span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></td>
213 <td width="35%" ><input type="text" id="proxy_host" name="proxy_host" size="25" value="{$settings.proxy_host}" tabindex='1' ></td>
214 <td width="15%" scope="row">{$MOD.LBL_PROXY_PORT}<span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></td>
215 <td width="35%" ><input type="text" id="proxy_port" name="proxy_port" size="6" value="{$settings.proxy_port}" tabindex='1' ></td>
217 <td width="15%" scope="row" valign='middle'>{$MOD.LBL_PROXY_AUTH}</td>
218 {if !empty($settings.proxy_auth)}
219 {assign var='proxy_auth_checked' value='CHECKED'}
221 {assign var='proxy_auth_checked' value=''}
223 <td width="35%" align="left" valign='middle' ><input type='hidden' name='proxy_auth' value='0'><input id="proxy_auth" name="proxy_auth" value="1" class="checkbox" tabindex='1' type="checkbox" {$proxy_auth_checked} onclick='toggleDisplay_2("proxy_auth_display")'> </td>
226 <div id="proxy_auth_display" style='display:{$PROXY_AUTH_DISPLAY}'>
228 <table width="100%" cellpadding="0" cellspacing="1"><tr>
229 <td width="15%" scope="row">{$MOD.LBL_PROXY_USERNAME}<span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></td>
231 <td width="35%" ><input type="text" id="proxy_username" name="proxy_username" size="25" value="{$settings.proxy_username}" tabindex='1' ></td>
232 <td width="15%" scope="row">{$MOD.LBL_PROXY_PASSWORD}<span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></td>
233 <td width="35%" ><input type="password" id="proxy_password" name="proxy_password" size="25" value="{$settings.proxy_password}" tabindex='1' ></td>
242 <table width="100%" border="0" cellspacing="1" cellpadding="0" class="edit view">
244 <th align="left" scope="row" colspan="4"><h4>{$MOD.LBL_SKYPEOUT_TITLE}</h4></th>
247 <td width="25%" scope="row" valign='middle'>{$MOD.LBL_SKYPEOUT_ON} {sugar_help text=$MOD.LBL_SKYPEOUT_ON_DESC WIDTH=400}</td>
248 {if !empty($settings.system_skypeout_on)}
249 {assign var='system_skypeout_on_checked' value='CHECKED'}
251 {assign var='system_skypeout_on_checked' value=''}
253 <td width="75%" align="left" valign='middle'><input type='hidden' name='system_skypeout_on' value='0'><input name="system_skypeout_on" value="1" class="checkbox" tabindex='1' type="checkbox" {$system_skypeout_on_checked}></td>
259 <table width="100%" border="0" cellspacing="1" cellpadding="0" class="edit view">
261 <th align="left" scope="row" colspan="4"><h4>{$MOD.ADVANCED}</h4></th>
264 <td scope="row">{$MOD.VERIFY_CLIENT_IP}: </td>
265 {if !empty($config.verify_client_ip)}
266 {assign var='verify_client_ip_checked' value='CHECKED'}
268 {assign var='verify_client_ip_checked' value=''}
270 <td ><input type='hidden' name='verify_client_ip' value='false'><input name='verify_client_ip' type="checkbox" value="1" {$verify_client_ip_checked}></td>
272 <td scope="row">{$MOD.LOG_MEMORY_USAGE}: </td>
273 {if !empty($config.log_memory_usage)}
274 {assign var='log_memory_usage_checked' value='CHECKED'}
276 {assign var='log_memory_usage_checked' value=''}
278 <td ><input type='hidden' name='log_memory_usage' value='false'><input name='log_memory_usage' type="checkbox" value='true' {$log_memory_usage_checked}></td>
282 <td scope="row">{$MOD.LOG_SLOW_QUERIES}: </td>
283 {if !empty($config.dump_slow_queries)}
284 {assign var='dump_slow_queries_checked' value='CHECKED'}
286 {assign var='dump_slow_queries_checked' value=''}
288 <td ><input type='hidden' name='dump_slow_queries' value='false'><input name='dump_slow_queries' type="checkbox" value='true' {$dump_slow_queries_checked}></td>
290 <td scope="row">{$MOD.SLOW_QUERY_TIME_MSEC}: </td>
292 <input type='text' size='5' name='slow_query_time_msec' value='{$config.slow_query_time_msec}'>
297 <td scope="row">{$MOD.UPLOAD_MAX_SIZE}: </td>
299 <input type='text' size='8' name='upload_maxsize' value='{$config.upload_maxsize}'>
301 <td scope="row">{$MOD.STACK_TRACE_ERRORS}: </td>
302 {if !empty($config.stack_trace_errors)}
303 {assign var='stack_trace_errors_checked' value='CHECKED'}
305 {assign var='stack_trace_errors_checked' value=''}
307 <td ><input type='hidden' name='stack_trace_errors' value='false'><input name='stack_trace_errors' type="checkbox" value='true' {$stack_trace_errors_checked}></td>
314 <td scope="row">{$MOD.DEVELOPER_MODE}: </td>
315 {if !empty($config.developerMode)}
316 {assign var='developerModeChecked' value='CHECKED'}
318 {assign var='developerModeChecked' value=''}
320 <td ><input type='hidden' name='developerMode' value='false'><input name='developerMode' type="checkbox" value='true' {$developerModeChecked}></td>
323 <td scope="row">{$MOD.LBL_VCAL_PERIOD} {sugar_help text=$MOD.vCAL_HELP}</td>
325 <input type='text' size='4' name='vcal_time' value='{$config.vcal_time}'>
327 <td scope="row">{$MOD.LBL_IMPORT_MAX_RECORDS} {sugar_help text=$MOD.LBL_IMPORT_MAX_RECORDS_HELP}</td>
329 <input type='text' size='4' name='import_max_records_total_limit' value='{$config.import_max_records_total_limit}'>
338 <table width="100%" border="0" cellspacing="1" cellpadding="0" class="edit view">
341 <th align="left" scope="row" colspan="6"><h4>{$MOD.LBL_LOGGER}</h4></th>
344 <td scope="row" valign='middle'>{$MOD.LBL_LOGGER_FILENAME}</td>
345 <td valign='middle' ><input type='text' name = 'logger_file_name' value="{$config.logger.file.name}"></td>
346 <td scope="row">{$MOD.LBL_LOGGER_FILE_EXTENSION}</td>
347 <td ><input name ="logger_file_ext" type="text" size="5" value="{$config.logger.file.ext}"></td>
348 <td scope="row">{$MOD.LBL_LOGGER_FILENAME_SUFFIX}</td>
349 <td ><select name = "logger_file_suffix" selected='{$config.logger.file.suffix}'>{$filename_suffix}</select></td>
352 <td scope="row">{$MOD.LBL_LOGGER_MAX_LOG_SIZE} </td>
353 <td > <input name="logger_file_maxSize" size="4" value="{$config.logger.file.maxSize}"></td>
354 <td scope="row">{$MOD.LBL_LOGGER_DEFAULT_DATE_FORMAT}</td>
355 <td ><input name ="logger_file_dateFormat" type="text" value="{$config.logger.file.dateFormat}"></td>
358 <td scope="row">{$MOD.LBL_LOGGER_LOG_LEVEL} </td>
359 <td > <select name="logger_level">{$log_levels}</select></td>
360 <td scope="row">{$MOD.LBL_LOGGER_MAX_LOGS} </td>
361 <td > <input name="logger_file_maxLogs" value="{$config.logger.file.maxLogs}"></td>
365 <td><a href="index.php?module=Configurator&action=LogView" target="_blank">{$MOD.LBL_LOGVIEW}</a></td>
370 <div style="padding-top: 2px;">
371 <input title="{$APP.LBL_SAVE_BUTTON_TITLE}" class="button primary" type="submit" name="save" value=" {$APP.LBL_SAVE_BUTTON_LABEL} " class="button primary"/>
372 <input title="{$MOD.LBL_SAVE_BUTTON_TITLE}" class="button" type="submit" name="restore" value=" {$MOD.LBL_RESTORE_BUTTON_LABEL} " />
373 <input title="{$MOD.LBL_CANCEL_BUTTON_TITLE}" onclick="document.location.href='index.php?module=Administration&action=index'" class="button" type="button" name="cancel" value=" {$APP.LBL_CANCEL_BUTTON_LABEL} " />
378 <div id='upload_panel' style="display:none">
379 <form id="upload_form" name="upload_form" method="POST" action='index.php' enctype="multipart/form-data">
380 <input type="file" id="my_file_company" name="file_1" size="20" onchange="uploadCheck(false)"/>
381 {sugar_getimage name="sqsWait" ext=".gif" alt=$mod_strings.LBL_LOADING other_attributes='id="loading_img_company" style="display:none" '}
385 <script type='text/javascript'>
386 function init_logo(){
387 document.getElementById('upload_panel').style.display="inline";
388 document.getElementById('upload_panel').style.position="absolute";
389 YAHOO.util.Dom.setX('upload_panel', YAHOO.util.Dom.getX('container_upload'));
390 YAHOO.util.Dom.setY('upload_panel', YAHOO.util.Dom.getY('container_upload')-5);
392 YAHOO.util.Event.onDOMReady(function(){
395 function toggleDisplay_2(div_string){
396 toggleDisplay(div_string);
399 function uploadCheck(quotes){
400 //AJAX call for checking the file size and comparing with php.ini settings.
403 eval("var file_type = " + r.responseText);
404 var forQuotes = file_type['forQuotes'];
405 document.getElementById('loading_img_'+forQuotes).style.display="none";
406 bad_image = SUGAR.language.get('Configurator',(forQuotes == 'quotes')?'LBL_ALERT_TYPE_JPEG':'LBL_ALERT_TYPE_IMAGE');
407 switch(file_type['data']){
410 document.getElementById('my_file_' + forQuotes).value='';
413 alert(SUGAR.language.get('Configurator','LBL_ALERT_SIZE_RATIO'));
414 document.getElementById(forQuotes + "_logo").value=file_type['path'];
415 document.getElementById(forQuotes + "_logo_image").src=file_type['url'];
418 alert(SUGAR.language.get('Configurator','ERR_ALERT_FILE_UPLOAD'));
419 document.getElementById('my_file_' + forQuotes).value='';
423 document.getElementById(forQuotes + "_logo").value=file_type['path'];
424 document.getElementById(forQuotes + "_logo_image").src=file_type['url'];
426 //error in getimagesize because unsupported type
429 document.getElementById('my_file_' + forQuotes).value='';
433 alert(SUGAR.language.get('app_strings','LBL_AJAX_FAILURE'));
436 document.getElementById("company_logo").value='';
437 document.getElementById('loading_img_company').style.display="inline";
438 var file_name = document.getElementById('my_file_company').value;
439 postData = '&entryPoint=UploadFileCheck&forQuotes=false';
440 YAHOO.util.Connect.setForm(document.getElementById('upload_form'), true,true);
442 if(postData.substring(0,1) == '&'){
443 postData=postData.substring(1);
445 YAHOO.util.Connect.asyncRequest('POST', 'index.php', callback, postData);