3 /*********************************************************************************
4 * SugarCRM 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 ********************************************************************************/
42 <script type='text/javascript' src='{sugar_getjspath file='include/javascript/sugar_grp_overlib.js'}'></script>
43 <form name="ConfigureSettings" enctype='multipart/form-data' method="POST" action="index.php" onSubmit="return (add_checks(document.ConfigureSettings) && check_form('ConfigureSettings'));">
44 <input type='hidden' name='action' value='SaveConfig'/>
45 <input type='hidden' name='module' value='Configurator'/>
46 <span class='error'>{$error.main}</span>
47 <table width="100%" cellpadding="0" cellspacing="1" border="0" class="actionsContainer">
51 <input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button primary" type="submit" name="save" value=" {$APP.LBL_SAVE_BUTTON_LABEL} " >
52 <input title="{$MOD.LBL_SAVE_BUTTON_TITLE}" class="button" type="submit" name="restore" value=" {$MOD.LBL_RESTORE_BUTTON_LABEL} " >
53 <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} " > </td>
58 <table width="100%" border="0" cellspacing="1" cellpadding="0" class="edit view">
60 <th align="left" scope="row" colspan="4"><h4>{$MOD.DEFAULT_SYSTEM_SETTINGS}</h4></th>
64 <td scope="row">{$MOD.LIST_ENTRIES_PER_LISTVIEW}: </td>
66 <input type='text' size='4' name='list_max_entries_per_page' value='{$config.list_max_entries_per_page}'>
68 <td scope="row">{$MOD.LIST_ENTRIES_PER_SUBPANEL}: </td>
70 <input type='text' size='4' name='list_max_entries_per_subpanel' value='{$config.list_max_entries_per_subpanel}'>
74 <td scope="row">{$MOD.LOCK_HOMEPAGE}: </td>
76 {if !empty($config.lock_homepage)}
77 {assign var='lock_homepage_checked' value='CHECKED'}
79 {assign var='lock_homepage_checked' value=''}
81 <input type='hidden' name='lock_homepage' value='false'>
82 <input type='checkbox' name='lock_homepage' value='true' {$lock_homepage_checked}>
84 <td scope="row">{$MOD.LOCK_SUBPANELS}: </td>
86 {if !empty($config.lock_subpanels)}
87 {assign var='lock_subpanels_checked' value='CHECKED'}
89 {assign var='lock_subpanels_checked' value=''}
91 <input type='hidden' name='lock_subpanels' value='false'>
92 <input type='checkbox' name='lock_subpanels' value='true' {$lock_subpanels_checked}>
96 <td scope="row" nowrap>{$MOD.MAX_DASHLETS}: </td>
98 <input type='text' size='4' name='max_dashlets_homepage' value='{$config.max_dashlets_homepage}'>
100 <td scope="row" nowrap>{$MOD.LBL_USE_REAL_NAMES}: {sugar_help text=$MOD.LBL_USE_REAL_NAMES_DESC}</td>
101 {if !empty($config.use_real_names)}
102 {assign var='use_real_names' value='CHECKED'}
104 {assign var='use_real_names' value=''}
107 <input type='hidden' name='use_real_names' value='false'>
108 <input name='use_real_names' type="checkbox" value="true" {$use_real_names}>
112 <td scope="row">{$MOD.DISPLAY_RESPONSE_TIME}: </td>
113 {if !empty($config.calculate_response_time )}
114 {assign var='calculate_response_time_checked' value='CHECKED'}
116 {assign var='calculate_response_time_checked' value=''}
118 <td ><input type='hidden' name='calculate_response_time' value='false'><input name='calculate_response_time' type="checkbox" value="true" {$calculate_response_time_checked}></td>
119 <td scope="row">{$MOD.LBL_MODULE_FAVICON} {sugar_help text=$MOD.LBL_MODULE_FAVICON_HELP} </td>
120 {if !empty($config.default_module_favicon)}
121 {assign var='default_module_favicon' value='CHECKED'}
123 {assign var='default_module_favicon' value=''}
126 <input type='hidden' name='default_module_favicon' value='false'>
127 <input name='default_module_favicon' type="checkbox" value="true" {$default_module_favicon}>
131 <td scope="row" width='15%' nowrap>{$MOD.SYSTEM_NAME} </td>
133 <input type='text' name='system_name' value='{$settings.system_name}'>
135 <td scope="row" width='15%' nowrap>{$MOD.LBL_MIN_AUTO_REFRESH_INTERVAL} {sugar_help text=$MOD.LBL_MIN_AUTO_REFRESH_INTERVAL_HELP} </td>
137 <select name='dashlet_auto_refresh_min' id='dashlet_auto_refresh_min'>{$AUTO_REFRESH_INTERVAL_OPTIONS}</select>
141 <td scope="row" width='12%' nowrap>
142 {$MOD.CURRENT_LOGO} {sugar_help text=$MOD.CURRENT_LOGO_HELP}
145 <img id="company_logo_image" src='{$company_logo}' height="40" width="212">
149 <td scope="row" width='12%' nowrap>
150 {$MOD.NEW_LOGO} {sugar_help text=$MOD.NEW_LOGO_HELP}
153 <div id="container_upload"></div>
154 <input type='text' id='company_logo' name='company_logo' style="display:none">
158 <table width="100%" border="0" cellspacing="1" cellpadding="0" class="edit view">
161 <th align="left" scope="row" colspan="4"><h4>{$MOD.LBL_PROXY_TITLE}</h4></th>
164 <td width="25%" scope="row" valign='middle'>{$MOD.LBL_PROXY_ON} {sugar_help text=$MOD.LBL_PROXY_ON_DESC}</td>
165 {if !empty($settings.proxy_on)}
166 {assign var='proxy_on_checked' value='CHECKED'}
168 {assign var='proxy_on_checked' value=''}
170 <td width="75%" align="left" valign='middle' colspan='3'><input type='hidden' name='proxy_on' value='0'><input name="proxy_on" value="1" class="checkbox" tabindex='1' type="checkbox" {$proxy_on_checked} onclick='toggleDisplay_2("proxy_config_display")'></td>
173 <div id="proxy_config_display" style='display:{$PROXY_CONFIG_DISPLAY}'>
174 <table width="100%" cellpadding="0" cellspacing="1"><tr>
175 <td width="15%" scope="row">{$MOD.LBL_PROXY_HOST}<span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></td>
176 <td width="35%" ><input type="text" name="proxy_host" size="25" value="{$settings.proxy_host}" tabindex='1' ></td>
177 <td width="15%" scope="row">{$MOD.LBL_PROXY_PORT}<span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></td>
178 <td width="35%" ><input type="text" name="proxy_port" size="6" value="{$settings.proxy_port}" tabindex='1' ></td>
180 <td width="15%" scope="row" valign='middle'>{$MOD.LBL_PROXY_AUTH}</td>
181 {if !empty($settings.proxy_auth)}
182 {assign var='proxy_auth_checked' value='CHECKED'}
184 {assign var='proxy_auth_checked' value=''}
186 <td width="35%" align="left" valign='middle' ><input type='hidden' name='proxy_auth' value='0'><input name="proxy_auth" value="1" class="checkbox" tabindex='1' type="checkbox" {$proxy_auth_checked} onclick='toggleDisplay_2("proxy_auth_display")'> </td>
189 <div id="proxy_auth_display" style='display:{$PROXY_AUTH_DISPLAY}'>
191 <table width="100%" cellpadding="0" cellspacing="1"><tr>
192 <td width="15%" scope="row">{$MOD.LBL_PROXY_USERNAME}<span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></td>
194 <td width="35%" ><input type="text" name="proxy_username" size="25" value="{$settings.proxy_username}" tabindex='1' ></td>
195 <td width="15%" scope="row">{$MOD.LBL_PROXY_PASSWORD}<span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></td>
196 <td width="35%" ><input type="password" name="proxy_password" size="25" value="{$settings.proxy_password}" tabindex='1' ></td>
205 <table width="100%" border="0" cellspacing="1" cellpadding="0" class="edit view">
207 <th align="left" scope="row" colspan="4"><h4>{$MOD.LBL_SKYPEOUT_TITLE}</h4></th>
210 <td width="25%" scope="row" valign='middle'>{$MOD.LBL_SKYPEOUT_ON} {sugar_help text=$MOD.LBL_SKYPEOUT_ON_DESC WIDTH=400}</td>
211 {if !empty($settings.system_skypeout_on)}
212 {assign var='system_skypeout_on_checked' value='CHECKED'}
214 {assign var='system_skypeout_on_checked' value=''}
216 <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>
221 <table width="100%" border="0" cellspacing="1" cellpadding="0" class="edit view">
223 <th align="left" scope="row" colspan="4"><h4>{$MOD.LBL_MAILMERGE}</h4></th>
226 <td width="25%" scope="row" valign='middle'>{$MOD.LBL_ENABLE_MAILMERGE} {sugar_help text=$MOD.LBL_MAILMERGE_DESC WIDTH=400}</td>
227 {if !empty($settings.system_mailmerge_on)}
228 {assign var='system_mailmerge_on_checked' value='CHECKED'}
230 {assign var='system_mailmerge_on_checked' value=''}
232 <td width="75%" align="left" valign='middle'><input type='hidden' name='system_mailmerge_on' value='0'><input name="system_mailmerge_on" value="1" class="checkbox" type="checkbox" {$system_mailmerge_on_checked}></td>
237 <table width="100%" border="0" cellspacing="1" cellpadding="0" class="edit view">
239 <th align="left" scope="row" colspan="4"><h4>{$MOD.ADVANCED}</h4></th>
242 <td scope="row">{$MOD.VERIFY_CLIENT_IP}: </td>
243 {if !empty($config.verify_client_ip)}
244 {assign var='verify_client_ip_checked' value='CHECKED'}
246 {assign var='verify_client_ip_checked' value=''}
248 <td ><input type='hidden' name='verify_client_ip' value='false'><input name='verify_client_ip' type="checkbox" value="1" {$verify_client_ip_checked}></td>
250 <td scope="row">{$MOD.LOG_MEMORY_USAGE}: </td>
251 {if !empty($config.log_memory_usage)}
252 {assign var='log_memory_usage_checked' value='CHECKED'}
254 {assign var='log_memory_usage_checked' value=''}
256 <td ><input type='hidden' name='log_memory_usage' value='false'><input name='log_memory_usage' type="checkbox" value='true' {$log_memory_usage_checked}></td>
260 <td scope="row">{$MOD.LOG_SLOW_QUERIES}: </td>
261 {if !empty($config.dump_slow_queries)}
262 {assign var='dump_slow_queries_checked' value='CHECKED'}
264 {assign var='dump_slow_queries_checked' value=''}
266 <td ><input type='hidden' name='dump_slow_queries' value='false'><input name='dump_slow_queries' type="checkbox" value='true' {$dump_slow_queries_checked}></td>
268 <td scope="row">{$MOD.SLOW_QUERY_TIME_MSEC}: </td>
270 <input type='text' size='5' name='slow_query_time_msec' value='{$config.slow_query_time_msec}'>
275 <td scope="row">{$MOD.UPLOAD_MAX_SIZE}: </td>
277 <input type='text' size='8' name='upload_maxsize' value='{$config.upload_maxsize}'>
279 <td scope="row">{$MOD.STACK_TRACE_ERRORS}: </td>
280 {if !empty($config.stack_trace_errors)}
281 {assign var='stack_trace_errors_checked' value='CHECKED'}
283 {assign var='stack_trace_errors_checked' value=''}
285 <td ><input type='hidden' name='stack_trace_errors' value='false'><input name='stack_trace_errors' type="checkbox" value='true' {$stack_trace_errors_checked}></td>
292 <td scope="row">{$MOD.DEVELOPER_MODE}: </td>
293 {if !empty($config.developerMode)}
294 {assign var='developerModeChecked' value='CHECKED'}
296 {assign var='developerModeChecked' value=''}
298 <td ><input type='hidden' name='developerMode' value='false'><input name='developerMode' type="checkbox" value='true' {$developerModeChecked}></td>
301 <td scope="row">{$MOD.LBL_VCAL_PERIOD} {sugar_help text=$MOD.vCAL_HELP}</td>
303 <input type='text' size='4' name='vcal_time' value='{$config.vcal_time}'>
312 <table width="100%" border="0" cellspacing="1" cellpadding="0" class="edit view">
314 <th align="left" scope="row" colspan="6"><h4>{$MOD.LBL_LOGGER}</h4></th>
317 <td scope="row" valign='middle'>{$MOD.LBL_LOGGER_FILENAME}</td>
318 <td valign='middle' ><input type='text' name = 'logger_file_name' value="{$config.logger.file.name}"></td>
319 <td scope="row">{$MOD.LBL_LOGGER_FILE_EXTENSION}</td>
320 <td ><input name ="logger_file_ext" type="text" size="5" value="{$config.logger.file.ext}"></td>
321 <td scope="row">{$MOD.LBL_LOGGER_FILENAME_SUFFIX}</td>
322 <td ><select name = "logger_file_suffix" selected='{$config.logger.file.suffix}'>{$filename_suffix}</select></td>
325 <td scope="row">{$MOD.LBL_LOGGER_MAX_LOG_SIZE} </td>
326 <td > <input name="logger_file_maxSize" size="4" value="{$config.logger.file.maxSize}"></td>
327 <td scope="row">{$MOD.LBL_LOGGER_DEFAULT_DATE_FORMAT}</td>
328 <td ><input name ="logger_file_dateFormat" type="text" value="{$config.logger.file.dateFormat}"></td>
331 <td scope="row">{$MOD.LBL_LOGGER_LOG_LEVEL} </td>
332 <td > <select name="logger_level">{$log_levels}</select></td>
333 <td scope="row">{$MOD.LBL_LOGGER_MAX_LOGS} </td>
334 <td > <input name="logger_file_maxLogs" value="{$config.logger.file.maxLogs}"></td>
337 <td><a href="index.php?module=Configurator&action=LogView" target="_blank">{$MOD.LBL_LOGVIEW}</a></td>
343 <div style="padding-top: 2px;">
344 <input title="{$APP.LBL_SAVE_BUTTON_TITLE}" class="button primary" type="submit" name="save" value=" {$APP.LBL_SAVE_BUTTON_LABEL} " class="button primary"/>
345 <input title="{$MOD.LBL_SAVE_BUTTON_TITLE}" class="button" type="submit" name="restore" value=" {$MOD.LBL_RESTORE_BUTTON_LABEL} " />
346 <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} " />
352 addToValidate('ConfigureSettings', 'system_name', 'varchar', true,'System Name' );
353 addToValidateMoreThan('ConfigureSettings', 'list_max_entries_per_page', 'int', true, '', 1);
354 addToValidateMoreThan('ConfigureSettings', 'list_max_entries_per_subpanel', 'int', true, '', 1);
357 <div id='upload_panel' style="display:none">
358 <form id="upload_form" name="upload_form" method="POST" action='index.php' enctype="multipart/form-data">
359 <input type="file" id="my_file_company" name="file_1" size="20" onchange="uploadCheck(false)"/>
360 <img id="loading_img_company" alt="loading..." src="{sugar_getimagepath file='sqsWait.gif'}" style="display:none">
364 <script type='text/javascript'>
365 function init_logo(){
366 document.getElementById('upload_panel').style.display="inline";
367 document.getElementById('upload_panel').style.position="absolute";
368 YAHOO.util.Dom.setX('upload_panel', YAHOO.util.Dom.getX('container_upload'));
369 YAHOO.util.Dom.setY('upload_panel', YAHOO.util.Dom.getY('container_upload')-5);
371 YAHOO.util.Event.onDOMReady(function(){
374 function toggleDisplay_2(div_string){
375 toggleDisplay(div_string);
378 function uploadCheck(quotes){
379 //AJAX call for checking the file size and comparing with php.ini settings.
382 eval("var file_type = " + r.responseText);
383 var forQuotes = file_type['forQuotes'];
384 document.getElementById('loading_img_'+forQuotes).style.display="none";
385 switch(file_type['data']){
387 alert(SUGAR.language.get('Configurator','LBL_ALERT_JPG_IMAGE'));
388 document.getElementById('my_file_' + forQuotes).value='';
391 alert(SUGAR.language.get('Configurator','LBL_ALERT_SIZE_RATIO'));
392 document.getElementById(forQuotes + "_logo").value=file_type['path'];
393 document.getElementById(forQuotes + "_logo_image").src=file_type['path'];
396 alert(SUGAR.language.get('Configurator','ERR_ALERT_FILE_UPLOAD'));
397 document.getElementById('my_file_' + forQuotes).value='';
401 document.getElementById(forQuotes + "_logo").value=file_type['path'];
402 document.getElementById(forQuotes + "_logo_image").src=file_type['path'];
404 //error in getimagesize because unsupported type
406 alert(SUGAR.language.get('Configurator','LBL_ALERT_TYPE_IMAGE'));
407 document.getElementById('my_file_' + forQuotes).value='';
411 alert(SUGAR.language.get('app_strings','LBL_AJAX_FAILURE'));
414 document.getElementById("company_logo").value='';
415 document.getElementById('loading_img_company').style.display="inline";
416 var file_name = document.getElementById('my_file_company').value;
417 postData = '&entryPoint=UploadFileCheck&forQuotes=false';
418 YAHOO.util.Connect.setForm(document.getElementById('upload_form'), true,true);
420 if(postData.substring(0,1) == '&'){
421 postData=postData.substring(1);
423 YAHOO.util.Connect.asyncRequest('POST', 'index.php', callback, postData);