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}'>
137 <td scope="row" width='12%' nowrap>
138 {$MOD.CURRENT_LOGO} {sugar_help text=$MOD.CURRENT_LOGO_HELP}
141 <img id="company_logo_image" src='{$company_logo}' height="40" width="212">
145 <td scope="row" width='12%' nowrap>
146 {$MOD.NEW_LOGO}: {sugar_help text=$MOD.NEW_LOGO_HELP}
149 <div id="container_upload"></div>
150 <input type='text' id='company_logo' name='company_logo' style="display:none">
154 <table width="100%" border="0" cellspacing="1" cellpadding="0" class="edit view">
157 <th align="left" scope="row" colspan="4"><h4>{$MOD.LBL_PROXY_TITLE}</h4></th>
160 <td width="25%" scope="row" valign='middle'>{$MOD.LBL_PROXY_ON} {sugar_help text=$MOD.LBL_PROXY_ON_DESC}</td>
161 {if !empty($settings.proxy_on)}
162 {assign var='proxy_on_checked' value='CHECKED'}
164 {assign var='proxy_on_checked' value=''}
166 <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>
169 <div id="proxy_config_display" style='display:{$PROXY_CONFIG_DISPLAY}'>
170 <table width="100%" cellpadding="0" cellspacing="1"><tr>
171 <td width="15%" scope="row">{$MOD.LBL_PROXY_HOST}<span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></td>
172 <td width="35%" ><input type="text" name="proxy_host" size="25" value="{$settings.proxy_host}" tabindex='1' ></td>
173 <td width="15%" scope="row">{$MOD.LBL_PROXY_PORT}<span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></td>
174 <td width="35%" ><input type="text" name="proxy_port" size="6" value="{$settings.proxy_port}" tabindex='1' ></td>
176 <td width="15%" scope="row" valign='middle'>{$MOD.LBL_PROXY_AUTH}</td>
177 {if !empty($settings.proxy_auth)}
178 {assign var='proxy_auth_checked' value='CHECKED'}
180 {assign var='proxy_auth_checked' value=''}
182 <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>
185 <div id="proxy_auth_display" style='display:{$PROXY_AUTH_DISPLAY}'>
187 <table width="100%" cellpadding="0" cellspacing="1"><tr>
188 <td width="15%" scope="row">{$MOD.LBL_PROXY_USERNAME}<span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></td>
190 <td width="35%" ><input type="text" name="proxy_username" size="25" value="{$settings.proxy_username}" tabindex='1' ></td>
191 <td width="15%" scope="row">{$MOD.LBL_PROXY_PASSWORD}<span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></td>
192 <td width="35%" ><input type="password" name="proxy_password" size="25" value="{$settings.proxy_password}" tabindex='1' ></td>
201 <table width="100%" border="0" cellspacing="1" cellpadding="0" class="edit view">
203 <th align="left" scope="row" colspan="4"><h4>{$MOD.LBL_SKYPEOUT_TITLE}</h4></th>
206 <td width="25%" scope="row" valign='middle'>{$MOD.LBL_SKYPEOUT_ON} {sugar_help text=$MOD.LBL_SKYPEOUT_ON_DESC WIDTH=400}</td>
207 {if !empty($settings.system_skypeout_on)}
208 {assign var='system_skypeout_on_checked' value='CHECKED'}
210 {assign var='system_skypeout_on_checked' value=''}
212 <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>
217 <table width="100%" border="0" cellspacing="1" cellpadding="0" class="edit view">
219 <th align="left" scope="row" colspan="4"><h4>{$MOD.LBL_MAILMERGE}</h4></th>
222 <td width="25%" scope="row" valign='middle'>{$MOD.LBL_ENABLE_MAILMERGE} {sugar_help text=$MOD.LBL_MAILMERGE_DESC WIDTH=400}</td>
223 {if !empty($settings.system_mailmerge_on)}
224 {assign var='system_mailmerge_on_checked' value='CHECKED'}
226 {assign var='system_mailmerge_on_checked' value=''}
228 <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>
233 <table width="100%" border="0" cellspacing="1" cellpadding="0" class="edit view">
235 <th align="left" scope="row" colspan="4"><h4>{$MOD.ADVANCED}</h4></th>
238 <td scope="row">{$MOD.VERIFY_CLIENT_IP}: </td>
239 {if !empty($config.verify_client_ip)}
240 {assign var='verify_client_ip_checked' value='CHECKED'}
242 {assign var='verify_client_ip_checked' value=''}
244 <td ><input type='hidden' name='verify_client_ip' value='false'><input name='verify_client_ip' type="checkbox" value="1" {$verify_client_ip_checked}></td>
246 <td scope="row">{$MOD.LOG_MEMORY_USAGE}: </td>
247 {if !empty($config.log_memory_usage)}
248 {assign var='log_memory_usage_checked' value='CHECKED'}
250 {assign var='log_memory_usage_checked' value=''}
252 <td ><input type='hidden' name='log_memory_usage' value='false'><input name='log_memory_usage' type="checkbox" value='true' {$log_memory_usage_checked}></td>
256 <td scope="row">{$MOD.LOG_SLOW_QUERIES}: </td>
257 {if !empty($config.dump_slow_queries)}
258 {assign var='dump_slow_queries_checked' value='CHECKED'}
260 {assign var='dump_slow_queries_checked' value=''}
262 <td ><input type='hidden' name='dump_slow_queries' value='false'><input name='dump_slow_queries' type="checkbox" value='true' {$dump_slow_queries_checked}></td>
264 <td scope="row">{$MOD.SLOW_QUERY_TIME_MSEC}: </td>
266 <input type='text' size='5' name='slow_query_time_msec' value='{$config.slow_query_time_msec}'>
271 <td scope="row">{$MOD.UPLOAD_MAX_SIZE}: </td>
273 <input type='text' size='8' name='upload_maxsize' value='{$config.upload_maxsize}'>
275 <td scope="row">{$MOD.STACK_TRACE_ERRORS}: </td>
276 {if !empty($config.stack_trace_errors)}
277 {assign var='stack_trace_errors_checked' value='CHECKED'}
279 {assign var='stack_trace_errors_checked' value=''}
281 <td ><input type='hidden' name='stack_trace_errors' value='false'><input name='stack_trace_errors' type="checkbox" value='true' {$stack_trace_errors_checked}></td>
288 <td scope="row">{$MOD.DEVELOPER_MODE}: </td>
289 {if !empty($config.developerMode)}
290 {assign var='developerModeChecked' value='CHECKED'}
292 {assign var='developerModeChecked' value=''}
294 <td ><input type='hidden' name='developerMode' value='false'><input name='developerMode' type="checkbox" value='true' {$developerModeChecked}></td>
297 <td scope="row">{$MOD.LBL_VCAL_PERIOD} {sugar_help text=$MOD.vCAL_HELP}</td>
299 <input type='text' size='4' name='vcal_time' value='{$config.vcal_time}'>
305 <table width="100%" border="0" cellspacing="1" cellpadding="0" class="edit view">
307 <th align="left" scope="row" colspan="6"><h4>{$MOD.LBL_LOGGER}</h4></th>
310 <td scope="row" valign='middle'>{$MOD.LBL_LOGGER_FILENAME}</td>
311 <td valign='middle' ><input type='text' name = 'logger_file_name' value="{$config.logger.file.name}"></td>
312 <td scope="row">{$MOD.LBL_LOGGER_FILE_EXTENSION}</td>
313 <td ><input name ="logger_file_ext" type="text" size="5" value="{$config.logger.file.ext}"></td>
314 <td scope="row">{$MOD.LBL_LOGGER_FILENAME_SUFFIX}</td>
315 <td ><select name = "logger_file_suffix" selected='{$config.logger.file.suffix}'>{$filename_suffix}</select></td>
318 <td scope="row">{$MOD.LBL_LOGGER_MAX_LOG_SIZE} </td>
319 <td > <input name="logger_file_maxSize" size="4" value="{$config.logger.file.maxSize}"></td>
320 <td scope="row">{$MOD.LBL_LOGGER_DEFAULT_DATE_FORMAT}</td>
321 <td ><input name ="logger_file_dateFormat" type="text" value="{$config.logger.file.dateFormat}"></td>
324 <td scope="row">{$MOD.LBL_LOGGER_LOG_LEVEL} </td>
325 <td > <select name="logger_level">{$log_levels}</select></td>
326 <td scope="row">{$MOD.LBL_LOGGER_MAX_LOGS} </td>
327 <td > <input name="logger_file_maxLogs" value="{$config.logger.file.maxLogs}"></td>
330 <td><a href="index.php?module=Configurator&action=LogView" target="_blank">{$MOD.LBL_LOGVIEW}</a></td>
336 <div style="padding-top: 2px;">
337 <input title="{$APP.LBL_SAVE_BUTTON_TITLE}" class="button primary" type="submit" name="save" value=" {$APP.LBL_SAVE_BUTTON_LABEL} " class="button primary"/>
338 <input title="{$MOD.LBL_SAVE_BUTTON_TITLE}" class="button" type="submit" name="restore" value=" {$MOD.LBL_RESTORE_BUTTON_LABEL} " />
339 <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} " />
345 addToValidate('ConfigureSettings', 'system_name', 'varchar', true,'System Name' );
346 addToValidateMoreThan('ConfigureSettings', 'list_max_entries_per_page', 'int', true, '', 1);
347 addToValidateMoreThan('ConfigureSettings', 'list_max_entries_per_subpanel', 'int', true, '', 1);
350 <div id='upload_panel' style="display:none">
351 <form id="upload_form" name="upload_form" method="POST" action='index.php' enctype="multipart/form-data">
352 <input type="file" id="my_file_company" name="file_1" size="20" onchange="uploadCheck(false)"/>
353 <img id="loading_img_company" alt="loading..." src="{sugar_getimagepath file='sqsWait.gif'}" style="display:none">
357 <script type='text/javascript'>
358 function init_logo(){
359 document.getElementById('upload_panel').style.display="inline";
360 document.getElementById('upload_panel').style.position="absolute";
361 YAHOO.util.Dom.setX('upload_panel', YAHOO.util.Dom.getX('container_upload'));
362 YAHOO.util.Dom.setY('upload_panel', YAHOO.util.Dom.getY('container_upload')-5);
364 YAHOO.util.Event.onDOMReady(function(){
367 function toggleDisplay_2(div_string){
368 toggleDisplay(div_string);
371 function uploadCheck(quotes){
372 //AJAX call for checking the file size and comparing with php.ini settings.
375 eval("var file_type = " + r.responseText);
376 var forQuotes = file_type['forQuotes'];
377 document.getElementById('loading_img_'+forQuotes).style.display="none";
378 bad_image = SUGAR.language.get('Configurator',(forQuotes == 'quotes')?'LBL_ALERT_TYPE_JPEG':'LBL_ALERT_TYPE_IMAGE');
379 switch(file_type['data']){
382 document.getElementById('my_file_' + forQuotes).value='';
385 alert(SUGAR.language.get('Configurator','LBL_ALERT_SIZE_RATIO'));
386 document.getElementById(forQuotes + "_logo").value=file_type['path'];
387 document.getElementById(forQuotes + "_logo_image").src=file_type['path'];
390 alert(SUGAR.language.get('Configurator','ERR_ALERT_FILE_UPLOAD'));
391 document.getElementById('my_file_' + forQuotes).value='';
395 document.getElementById(forQuotes + "_logo").value=file_type['path'];
396 document.getElementById(forQuotes + "_logo_image").src=file_type['path'];
398 //error in getimagesize because unsupported type
401 document.getElementById('my_file_' + forQuotes).value='';
405 alert(SUGAR.language.get('app_strings','LBL_AJAX_FAILURE'));
408 document.getElementById("company_logo").value='';
409 document.getElementById('loading_img_company').style.display="inline";
410 var file_name = document.getElementById('my_file_company').value;
411 postData = '&entryPoint=UploadFileCheck&forQuotes=false';
412 YAHOO.util.Connect.setForm(document.getElementById('upload_form'), true,true);
414 if(postData.substring(0,1) == '&'){
415 postData=postData.substring(1);
417 YAHOO.util.Connect.asyncRequest('POST', 'index.php', callback, postData);