]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - modules/Configurator/tpls/EditView.tpl
Release 6.4.0
[Github/sugarcrm.git] / modules / Configurator / tpls / EditView.tpl
1 {*
2
3 /*********************************************************************************
4  * SugarCRM Community Edition is a customer relationship management program developed by
5  * SugarCRM, Inc. Copyright (C) 2004-2011 SugarCRM Inc.
6  * 
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.
13  * 
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
17  * details.
18  * 
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
22  * 02110-1301 USA.
23  * 
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.
26  * 
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.
30  * 
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  ********************************************************************************/
37
38
39
40
41 *}
42 <script type='text/javascript' src='{sugar_getjspath file='cache/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">
48 <tr>
49
50         <td>
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                 &nbsp;<input title="{$MOD.LBL_SAVE_BUTTON_TITLE}"  class="button"  type="submit" name="restore" value="  {$MOD.LBL_RESTORE_BUTTON_LABEL}  " >
53                 &nbsp;<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>
54         </tr>
55 </table>
56
57
58 <table width="100%" border="0" cellspacing="1" cellpadding="0" class="edit view">
59 <tr>
60         <th align="left" scope="row" colspan="4"><h4>{$MOD.DEFAULT_SYSTEM_SETTINGS}</h4></th>
61 </tr>
62
63         <tr>
64                 <td  scope="row">{$MOD.LIST_ENTRIES_PER_LISTVIEW}: </td>
65                 <td  >
66                         <input type='text' size='4' name='list_max_entries_per_page' value='{$config.list_max_entries_per_page}'>
67                 </td>
68                 <td  scope="row">{$MOD.LIST_ENTRIES_PER_SUBPANEL}: </td>
69                 <td  >
70                         <input type='text' size='4' name='list_max_entries_per_subpanel' value='{$config.list_max_entries_per_subpanel}'>
71                 </td>
72         </tr>
73         <tr>
74                 <td  scope="row">{$MOD.LOCK_HOMEPAGE}: </td>
75                 <td  >
76                         {if !empty($config.lock_homepage)}
77                                 {assign var='lock_homepage_checked' value='CHECKED'}
78                         {else}
79                                 {assign var='lock_homepage_checked' value=''}
80                         {/if}
81                         <input type='hidden' name='lock_homepage' value='false'>
82                         <input type='checkbox' name='lock_homepage' value='true' {$lock_homepage_checked}>
83                 </td>
84                 <td  scope="row">{$MOD.LOCK_SUBPANELS}: </td>
85                 <td  >
86                         {if !empty($config.lock_subpanels)}
87                                 {assign var='lock_subpanels_checked' value='CHECKED'}
88                         {else}
89                                 {assign var='lock_subpanels_checked' value=''}
90                         {/if}
91                         <input type='hidden' name='lock_subpanels' value='false'>
92                         <input type='checkbox' name='lock_subpanels' value='true' {$lock_subpanels_checked}>
93                 </td>
94         </tr>
95         <tr>
96                 <td  scope="row" nowrap>{$MOD.MAX_DASHLETS}: </td>
97                 <td>
98                         <input type='text' size='4' name='max_dashlets_homepage' value='{$config.max_dashlets_homepage}'>
99                 </td>
100                 <td  scope="row" nowrap>{$MOD.LBL_USE_REAL_NAMES}: &nbsp;{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'}
103                 {else}
104                         {assign var='use_real_names' value=''}
105                 {/if}
106                 <td >
107                         <input type='hidden' name='use_real_names' value='false'>
108                         <input name='use_real_names'  type="checkbox" value="true" {$use_real_names}>
109                 </td>
110         </tr>
111         <tr>
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'}
115                 {else}
116                         {assign var='calculate_response_time_checked' value=''}
117                 {/if}
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} &nbsp;{sugar_help text=$MOD.LBL_MODULE_FAVICON_HELP} </td>
120                 {if !empty($config.default_module_favicon)}
121                         {assign var='default_module_favicon' value='CHECKED'}
122                 {else}
123                         {assign var='default_module_favicon' value=''}
124                 {/if}
125                 <td >
126                         <input type='hidden' name='default_module_favicon' value='false'>
127                         <input name='default_module_favicon'  type="checkbox" value="true" {$default_module_favicon}>
128                 </td>
129         </tr>
130         <tr>
131                 <td scope="row" width='15%' nowrap>{$MOD.SYSTEM_NAME} </td>
132                 <td width='35%'>
133                         <input type='text' name='system_name' value='{$settings.system_name}'>
134                 </td>
135                 <td scope="row" width='15%' nowrap>{$MOD.LBL_MIN_AUTO_REFRESH_INTERVAL} &nbsp;{sugar_help text=$MOD.LBL_MIN_AUTO_REFRESH_INTERVAL_HELP} </td>
136                 <td width='35%'>
137                     <select name='dashlet_auto_refresh_min' id='dashlet_auto_refresh_min'>{$AUTO_REFRESH_INTERVAL_OPTIONS}</select>
138                 </td>
139     </tr>
140     <tr>
141         <td  scope="row" width='12%' nowrap>
142         {$MOD.CURRENT_LOGO}&nbsp;{sugar_help text=$MOD.CURRENT_LOGO_HELP}
143         </td>
144         <td width='35%' >
145             <img id="company_logo_image" src='{$company_logo}' alt=$mod_strings.LBL_LOGO height="40" width="212">
146         </td>
147     </tr>
148     <tr>
149         <td  scope="row" width='12%' nowrap>
150             {$MOD.NEW_LOGO}&nbsp;{sugar_help text=$MOD.NEW_LOGO_HELP}
151         </td>
152         <td  width='35%'>
153             <div id="container_upload"></div>
154             <input type='text' id='company_logo' name='company_logo' style="display:none">
155         </td>
156     </tr>
157     <tr>
158             <td scope="row">{$MOD.LBL_LEAD_CONV_OPTION}:&nbsp;{sugar_help text=$MOD.LEAD_CONV_OPT_HELP}</td>
159             <td> <select name="lead_conv_activity_opt">{$lead_conv_activities}</select></td>
160             <td><a href="./index.php?module=Administration&action=ConfigureAjaxUI" id="configure_ajax">{$MOD.LBL_CONFIG_AJAX}</a>&nbsp;{sugar_help text=$MOD.LBL_CONFIG_AJAX_DESC}</td>
161     </tr>
162 </table>
163
164 <table width="100%" border="0" cellspacing="1" cellpadding="0" class="edit view">
165
166         <tr>
167         <th align="left" scope="row" colspan="4"><h4>{$MOD.LBL_PROXY_TITLE}</h4></th>
168         </tr>
169         <tr>
170         <td width="25%" scope="row" valign='middle'>{$MOD.LBL_PROXY_ON}&nbsp{sugar_help text=$MOD.LBL_PROXY_ON_DESC}</td>
171                 {if !empty($settings.proxy_on)}
172                 {assign var='proxy_on_checked' value='CHECKED'}
173         {else}
174                 {assign var='proxy_on_checked' value=''}
175         {/if}
176         <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>
177         </tr><tr>
178         <td colspan="4">
179         <div id="proxy_config_display" style='display:{$PROXY_CONFIG_DISPLAY}'>
180                 <table width="100%" cellpadding="0" cellspacing="1"><tr>
181                 <td width="15%" scope="row">{$MOD.LBL_PROXY_HOST}<span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></td>
182                 <td width="35%" ><input type="text" name="proxy_host" size="25"  value="{$settings.proxy_host}" tabindex='1' ></td>
183                 <td width="15%" scope="row">{$MOD.LBL_PROXY_PORT}<span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></td>
184                 <td width="35%" ><input type="text" name="proxy_port" size="6"  value="{$settings.proxy_port}" tabindex='1' ></td>
185                 </tr><tr>
186                 <td width="15%" scope="row" valign='middle'>{$MOD.LBL_PROXY_AUTH}</td>
187         {if !empty($settings.proxy_auth)}
188                 {assign var='proxy_auth_checked' value='CHECKED'}
189         {else}
190                 {assign var='proxy_auth_checked' value=''}
191         {/if}
192                 <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>
193                 </tr></table>
194
195                 <div id="proxy_auth_display" style='display:{$PROXY_AUTH_DISPLAY}'>
196
197                 <table width="100%" cellpadding="0" cellspacing="1"><tr>
198                 <td width="15%" scope="row">{$MOD.LBL_PROXY_USERNAME}<span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></td>
199
200                 <td width="35%" ><input type="text" name="proxy_username" size="25"  value="{$settings.proxy_username}" tabindex='1' ></td>
201                 <td width="15%" scope="row">{$MOD.LBL_PROXY_PASSWORD}<span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></td>
202                 <td width="35%" ><input type="password" name="proxy_password" size="25"  value="{$settings.proxy_password}" tabindex='1' ></td>
203                 </tr></table>
204                 </div>
205         </div>
206   </td>
207   </tr>
208  </table>
209
210
211 <table width="100%" border="0" cellspacing="1" cellpadding="0" class="edit view">
212         <tr>
213         <th align="left" scope="row" colspan="4"><h4>{$MOD.LBL_SKYPEOUT_TITLE}</h4></th>
214         </tr>
215         <tr>
216         <td width="25%" scope="row" valign='middle'>{$MOD.LBL_SKYPEOUT_ON}&nbsp{sugar_help text=$MOD.LBL_SKYPEOUT_ON_DESC WIDTH=400}</td>
217         {if !empty($settings.system_skypeout_on)}
218                 {assign var='system_skypeout_on_checked' value='CHECKED'}
219         {else}
220                 {assign var='system_skypeout_on_checked' value=''}
221         {/if}
222         <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>
223         </tr>
224  </table>
225
226
227
228 <table width="100%" border="0" cellspacing="1" cellpadding="0" class="edit view">
229         <tr>
230         <th align="left" scope="row" colspan="4"><h4>{$MOD.ADVANCED}</h4></th>
231         </tr>
232         <tr>
233                 <td  scope="row">{$MOD.VERIFY_CLIENT_IP}: </td>
234                 {if !empty($config.verify_client_ip)}
235                         {assign var='verify_client_ip_checked' value='CHECKED'}
236                 {else}
237                         {assign var='verify_client_ip_checked' value=''}
238                 {/if}
239                 <td  ><input type='hidden' name='verify_client_ip' value='false'><input name='verify_client_ip'  type="checkbox" value="1" {$verify_client_ip_checked}></td>
240
241                 <td  scope="row">{$MOD.LOG_MEMORY_USAGE}: </td>
242                 {if !empty($config.log_memory_usage)}
243                         {assign var='log_memory_usage_checked' value='CHECKED'}
244                 {else}
245                         {assign var='log_memory_usage_checked' value=''}
246                 {/if}
247                 <td  ><input type='hidden' name='log_memory_usage' value='false'><input name='log_memory_usage'  type="checkbox" value='true' {$log_memory_usage_checked}></td>
248
249         </tr>
250         <tr>
251                 <td  scope="row">{$MOD.LOG_SLOW_QUERIES}: </td>
252                 {if !empty($config.dump_slow_queries)}
253                         {assign var='dump_slow_queries_checked' value='CHECKED'}
254                 {else}
255                         {assign var='dump_slow_queries_checked' value=''}
256                 {/if}
257                 <td ><input type='hidden' name='dump_slow_queries' value='false'><input name='dump_slow_queries'  type="checkbox" value='true' {$dump_slow_queries_checked}></td>
258
259                 <td  scope="row">{$MOD.SLOW_QUERY_TIME_MSEC}: </td>
260                 <td  >
261                         <input type='text' size='5' name='slow_query_time_msec' value='{$config.slow_query_time_msec}'>
262                 </td>
263
264         </tr>
265         <tr>
266                 <td  scope="row">{$MOD.UPLOAD_MAX_SIZE}: </td>
267                 <td  >
268                         <input type='text' size='8' name='upload_maxsize' value='{$config.upload_maxsize}'>
269                 </td>
270                 <td  scope="row">{$MOD.STACK_TRACE_ERRORS}: </td>
271                 {if !empty($config.stack_trace_errors)}
272                         {assign var='stack_trace_errors_checked' value='CHECKED'}
273                 {else}
274                         {assign var='stack_trace_errors_checked' value=''}
275                 {/if}
276                 <td ><input type='hidden' name='stack_trace_errors' value='false'><input name='stack_trace_errors'  type="checkbox" value='true' {$stack_trace_errors_checked}></td>
277
278
279
280         </tr>
281
282         <tr>
283                 <td  scope="row">{$MOD.DEVELOPER_MODE}: </td>
284                 {if !empty($config.developerMode)}
285                         {assign var='developerModeChecked' value='CHECKED'}
286                 {else}
287                         {assign var='developerModeChecked' value=''}
288                 {/if}
289                 <td ><input type='hidden' name='developerMode' value='false'><input name='developerMode'  type="checkbox" value='true' {$developerModeChecked}></td>
290         </tr>
291         <tr>
292                 <td scope="row">{$MOD.LBL_VCAL_PERIOD} {sugar_help text=$MOD.vCAL_HELP}</td>
293                 <td >
294                         <input type='text' size='4' name='vcal_time' value='{$config.vcal_time}'>
295                 </td>
296         <td scope="row">{$MOD.LBL_IMPORT_MAX_RECORDS} {sugar_help text=$MOD.LBL_IMPORT_MAX_RECORDS_HELP}</td>
297                 <td >
298                         <input type='text' size='4' name='import_max_records_total_limit' value='{$config.import_max_records_total_limit}'>
299                 </td>
300
301         </tr>
302
303
304
305 </table>
306
307
308 <table  width="100%" border="0" cellspacing="1" cellpadding="0" class="edit view">
309 <tr>
310 <th align="left" scope="row" colspan="6"><h4>{$MOD.LBL_LOGGER}</h4></th>
311 </tr>
312         <tr>
313                 <td  scope="row" valign='middle'>{$MOD.LBL_LOGGER_FILENAME}</td>
314                 <td   valign='middle' ><input type='text' name = 'logger_file_name'  value="{$config.logger.file.name}"></td>
315                 <td  scope="row">{$MOD.LBL_LOGGER_FILE_EXTENSION}</td>
316                 <td ><input name ="logger_file_ext" type="text" size="5" value="{$config.logger.file.ext}"></td>
317                 <td scope="row">{$MOD.LBL_LOGGER_FILENAME_SUFFIX}</td>
318                 <td ><select name = "logger_file_suffix" selected='{$config.logger.file.suffix}'>{$filename_suffix}</select></td>
319         </tr>
320         <tr>
321                 <td scope="row">{$MOD.LBL_LOGGER_MAX_LOG_SIZE} </td>
322                 <td > <input name="logger_file_maxSize" size="4" value="{$config.logger.file.maxSize}"></td>
323                 <td scope="row">{$MOD.LBL_LOGGER_DEFAULT_DATE_FORMAT}</td>
324                 <td  ><input name ="logger_file_dateFormat" type="text" value="{$config.logger.file.dateFormat}"></td>
325         </tr>
326         <tr>
327                 <td scope="row">{$MOD.LBL_LOGGER_LOG_LEVEL} </td>
328                 <td > <select name="logger_level">{$log_levels}</select></td>
329                 <td scope="row">{$MOD.LBL_LOGGER_MAX_LOGS} </td>
330                 <td > <input name="logger_file_maxLogs" value="{$config.logger.file.maxLogs}"></td>
331         </tr>
332         <tr>
333             <td><a href="index.php?module=Configurator&action=LogView" target="_blank">{$MOD.LBL_LOGVIEW}</a></td>
334         </tr>
335 </table>
336
337
338
339 <div style="padding-top: 2px;">
340 <input title="{$APP.LBL_SAVE_BUTTON_TITLE}" class="button primary"  type="submit" name="save" value="  {$APP.LBL_SAVE_BUTTON_LABEL}  " class="button primary"/>
341                 &nbsp;<input title="{$MOD.LBL_SAVE_BUTTON_TITLE}"  class="button"  type="submit" name="restore" value="  {$MOD.LBL_RESTORE_BUTTON_LABEL} " />
342                 &nbsp;<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}  " />
343 </div>
344 {$JAVASCRIPT}
345
346
347 <script>
348 addToValidate('ConfigureSettings', 'system_name', 'varchar', true,'System Name' );
349 addToValidateMoreThan('ConfigureSettings', 'list_max_entries_per_page', 'int', true, '', 1);
350 addToValidateMoreThan('ConfigureSettings', 'list_max_entries_per_subpanel', 'int', true, '', 1);
351 </script>
352 </form>
353 <div id='upload_panel' style="display:none">
354     <form id="upload_form" name="upload_form" method="POST" action='index.php' enctype="multipart/form-data">
355         <input type="file" id="my_file_company" name="file_1" size="20" onchange="uploadCheck(false)"/>
356         {sugar_getimage name="sqsWait" ext=".gif" alt=$mod_strings.LBL_LOADING other_attributes='id="loading_img_company" style="display:none" '}
357     </form>
358 </div>
359 {literal}
360 <script type='text/javascript'>
361 function init_logo(){
362     document.getElementById('upload_panel').style.display="inline";
363     document.getElementById('upload_panel').style.position="absolute";
364     YAHOO.util.Dom.setX('upload_panel', YAHOO.util.Dom.getX('container_upload'));
365     YAHOO.util.Dom.setY('upload_panel', YAHOO.util.Dom.getY('container_upload')-5);
366 }
367 YAHOO.util.Event.onDOMReady(function(){
368     init_logo();
369 });
370 function toggleDisplay_2(div_string){
371     toggleDisplay(div_string);
372     init_logo();
373 }
374  function uploadCheck(quotes){
375     //AJAX call for checking the file size and comparing with php.ini settings.
376     var callback = {
377         upload:function(r) {
378             eval("var file_type = " + r.responseText);
379             var forQuotes = file_type['forQuotes'];
380             document.getElementById('loading_img_'+forQuotes).style.display="none";
381             bad_image = SUGAR.language.get('Configurator',(forQuotes == 'quotes')?'LBL_ALERT_TYPE_JPEG':'LBL_ALERT_TYPE_IMAGE');
382             switch(file_type['data']){
383                 case 'other':
384                     alert(bad_image);
385                     document.getElementById('my_file_' + forQuotes).value='';
386                     break;
387                 case 'size':
388                     alert(SUGAR.language.get('Configurator','LBL_ALERT_SIZE_RATIO'));
389                     document.getElementById(forQuotes + "_logo").value=file_type['path'];
390                     document.getElementById(forQuotes + "_logo_image").src=file_type['url'];
391                     break;
392                 case 'file_error':
393                     alert(SUGAR.language.get('Configurator','ERR_ALERT_FILE_UPLOAD'));
394                     document.getElementById('my_file_' + forQuotes).value='';
395                     break;
396                 //File good
397                 case 'ok':
398                     document.getElementById(forQuotes + "_logo").value=file_type['path'];
399                     document.getElementById(forQuotes + "_logo_image").src=file_type['url'];
400                     break;
401                 //error in getimagesize because unsupported type
402                 default:
403                    alert(bad_image);
404                    document.getElementById('my_file_' + forQuotes).value='';
405             }
406         },
407         failure:function(r){
408             alert(SUGAR.language.get('app_strings','LBL_AJAX_FAILURE'));
409         }
410     }
411     document.getElementById("company_logo").value='';
412     document.getElementById('loading_img_company').style.display="inline";
413     var file_name = document.getElementById('my_file_company').value;
414     postData = '&entryPoint=UploadFileCheck&forQuotes=false';
415     YAHOO.util.Connect.setForm(document.getElementById('upload_form'), true,true);
416     if(file_name){
417         if(postData.substring(0,1) == '&'){
418             postData=postData.substring(1);
419         }
420         YAHOO.util.Connect.asyncRequest('POST', 'index.php', callback, postData);
421     }
422 }
423
424 </script>
425 {/literal}