mirror of
https://github.com/salesagility/SuiteCRM.git
synced 2025-03-16 14:23:33 +00:00
Add an option to disable AOP altogether. Rename the current option for disabling the joomla side to avoid confusion.
This commit is contained in:
parent
0becccf2a8
commit
7d9954f740
3 changed files with 31 additions and 6 deletions
custom
Extension/modules/Administration/Ext/Language
modules/Administration
|
@ -23,7 +23,8 @@
|
|||
*/
|
||||
$mod_strings['LBL_SALESAGILITY_ADMIN'] = 'Advanced OpenAdmin';
|
||||
$mod_strings['LBL_AOP_ADMIN_MANAGE_AOP'] = 'Advanced OpenPortal Settings';
|
||||
$mod_strings['LBL_AOP_ENABLE_PORTAL'] = 'Enable Portal';
|
||||
$mod_strings['LBL_AOP_ENABLE_AOP'] = 'Enable AOP';
|
||||
$mod_strings['LBL_AOP_ENABLE_PORTAL'] = 'Enable External Portal';
|
||||
$mod_strings['LBL_AOP_JOOMLA_SETTINGS'] = 'Portal Settings';
|
||||
$mod_strings['LBL_AOP_JOOMLA_URL'] = 'Joomla URL';
|
||||
$mod_strings['LBL_AOP_JOOMLA_ACCESS_KEY'] = 'Joomla Access Key';
|
||||
|
|
|
@ -50,6 +50,7 @@ $errors = array();
|
|||
|
||||
if(!array_key_exists('aop',$cfg->config)){
|
||||
$cfg->config['aop'] = array(
|
||||
'enable_aop' => 1,
|
||||
'enable_portal' => '',
|
||||
'joomla_url'=>'',
|
||||
'joomla_access_key'=>'',
|
||||
|
@ -64,12 +65,16 @@ if(!array_key_exists('aop',$cfg->config)){
|
|||
'support_from_name'=>'',
|
||||
);
|
||||
}
|
||||
if(!array_key_exists('enable_aop',$cfg->config['aop'])){
|
||||
$cfg->config['aop']['enable_aop'] = 1;
|
||||
}
|
||||
if(isset($_REQUEST['do']) && $_REQUEST['do'] == 'save') {
|
||||
if(!empty($_REQUEST['joomla_url'])){
|
||||
$cfg->config['aop']['joomla_url'] = 'http://' . preg_replace( '~^http://~', '', $_REQUEST['joomla_url']);
|
||||
}else{
|
||||
$cfg->config['aop']['joomla_url'] = '';
|
||||
}
|
||||
$cfg->config['aop']['enable_aop'] = !empty($_REQUEST['enable_aop']);
|
||||
$cfg->config['aop']['enable_portal'] = !empty($_REQUEST['enable_portal']);
|
||||
$cfg->config['aop']['joomla_access_key'] = $_REQUEST['joomla_access_key'];
|
||||
$cfg->config['aop']['distribution_method'] = $_REQUEST['distribution_method'];
|
||||
|
|
|
@ -16,9 +16,22 @@
|
|||
<script type="text/javascript">
|
||||
{literal}
|
||||
$(function() {
|
||||
$('#enable_portal').change(function (){
|
||||
$('#enable_aop').change(function (){
|
||||
|
||||
if($('#enable_portal').is(":checked")){
|
||||
if($('#enable_aop').is(":checked")){
|
||||
$('#email_settings').show();
|
||||
$('#distribution_settings').show();
|
||||
$('#enable_portal_row').show();
|
||||
}else{
|
||||
removeFromValidate('ConfigureSettings','joomla_url');
|
||||
$('#email_settings').hide();
|
||||
$('#distribution_settings').hide();
|
||||
$('#enable_portal_row').hide();
|
||||
}
|
||||
});
|
||||
$('#enable_aop').change();
|
||||
$('#enable_portal').change(function (){
|
||||
if($('#enable_portal').is(":checked") && $('#enable_aop').is(":checked")){
|
||||
addToValidate('ConfigureSettings','joomla_url','text',true,"{/literal}{$MOD.LBL_AOP_JOOMLA_URL}{literal}");
|
||||
$('#joomla_url_row').show();
|
||||
}else{
|
||||
|
@ -27,7 +40,6 @@
|
|||
}
|
||||
});
|
||||
$('#enable_portal').change();
|
||||
|
||||
});
|
||||
{/literal}
|
||||
</script>
|
||||
|
@ -36,6 +48,13 @@
|
|||
<tr><th align="left" scope="row" colspan="4"><h4>{$MOD.LBL_AOP_JOOMLA_SETTINGS}</h4></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td scope="row" width="200">{$MOD.LBL_AOP_ENABLE_AOP}: </td>
|
||||
<td >
|
||||
<input type='checkbox' id='enable_aop' name='enable_aop' {if $config.enable_aop}checked='checked'{/if} >
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr id="enable_portal_row">
|
||||
<td scope="row" width="200">{$MOD.LBL_AOP_ENABLE_PORTAL}: </td>
|
||||
<td >
|
||||
<input type='checkbox' id='enable_portal' name='enable_portal' {if $config.enable_portal}checked='checked'{/if} >
|
||||
|
@ -57,7 +76,7 @@
|
|||
</tr>-->
|
||||
</table>
|
||||
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="0" class="edit view">
|
||||
<table id='distribution_settings' width="100%" border="0" cellspacing="1" cellpadding="0" class="edit view">
|
||||
<tr><th align="left" scope="row" colspan="4"><h4>{$MOD.LBL_AOP_CASE_ASSIGNMENT}</h4></th>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -113,7 +132,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="0" class="edit view">
|
||||
<table id='email_settings' width="100%" border="0" cellspacing="1" cellpadding="0" class="edit view">
|
||||
<tr><th align="left" scope="row" colspan="4"><h4>{$MOD.LBL_AOP_EMAIL_SETTINGS}</h4></th>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
Loading…
Reference in a new issue