$allow_outbound = isset($storedOptions['allow_outbound_group_usage']) && $storedOptions['allow_outbound_group_usage'] == 1 ? 'CHECKED' : ''; } else { $xtpl->assign('EDIT_GROUP_FOLDER_STYLE', "visibility:hidden"); } $xtpl->assign('ALLOW_OUTBOUND_USAGE', $allow_outbound); $xtpl->assign('IS_AUTO_IMPORT', $is_auto_import); if ($focus->isMailBoxTypeCreateCase()) { $createCaseRowStyle = "display:''"; } } $xtpl->assign('hasGrpFld', $focus->groupfolder_id == null ? '' : 'checked="1"'); $xtpl->assign('LEAVEMESSAGESONMAILSERVER_STYLE', $leaveMessagesOnMailServerStyle); $xtpl->assign('LEAVEMESSAGESONMAILSERVER', get_select_options_with_id($app_list_strings['dom_int_bool'], $leaveMessagesOnMailServer)); $distributionMethod = get_select_options_with_id($app_list_strings['dom_email_distribution_for_auto_create'], $distrib_method); $xtpl->assign('DISTRIBUTION_METHOD', $distributionMethod); $xtpl->assign('DISTRIBUTION_OPTIONS', getAOPAssignField('distribution_options', $distributionAssignOptions)); $xtpl->assign('distribution_user_name', $distribution_user_name); $xtpl->assign('distribution_user_id', $distribution_user_id); $xtpl->assign('CREATE_CASE_ROW_STYLE', $createCaseRowStyle); $xtpl->assign('CREATE_CASE_EMAIL_TEMPLATE_OPTIONS', get_select_options_with_id($email_templates_arr, $create_case_email_template)); if (!empty($create_case_email_template)) { $xtpl->assign("CREATE_CASE_EDIT_TEMPLATE", "visibility:inline"); } else { $xtpl->assign("CREATE_CASE_EDIT_TEMPLATE", "visibility:hidden"); } $quicksearch_js = ""; //$javascript = get_set_focus_js(). $javascript->getScript() . $quicksearch_js; $xtpl->assign('JAVASCRIPT', get_set_focus_js() . $javascript->getScript() . $quicksearch_js); require_once 'include/Smarty/plugins/function.sugar_help.php'; $tipsStrings = array('LBL_SSL_DESC', 'LBL_ASSIGN_TO_TEAM_DESC', 'LBL_ASSIGN_TO_GROUP_FOLDER_DESC', 'LBL_FROM_ADDR_DESC', 'LBL_CREATE_CASE_HELP', 'LBL_CREATE_CASE_REPLY_TEMPLATE_HELP', 'LBL_ALLOW_OUTBOUND_GROUP_USAGE_DESC', 'LBL_AUTOREPLY_HELP', 'LBL_FILTER_DOMAIN_DESC', 'LBL_MAX_AUTO_REPLIES_DESC'); $smarty = null;
$cfg->config['aop']['joomla_account_creation_email_template_id'] = $_REQUEST['joomla_account_creation_email_template_id']; $cfg->config['aop']['support_from_address'] = $_REQUEST['support_from_address']; $cfg->config['aop']['support_from_name'] = $_REQUEST['support_from_name']; /* * We save the case_status_changes array as json since the way config changes are persisted to config.php * means that removing entries is tricky. json simplifies this. */ $cfg->config['aop']['case_status_changes'] = json_encode(array_combine($_POST['if_status'], $_POST['then_status'])); $cfg->saveConfig(); header('Location: index.php?module=Administration&action=index'); exit; } $distribStrings = $app_list_strings['dom_email_distribution_for_auto_create']; unset($distribStrings['AOPDefault']); $distributionMethod = get_select_options_with_id($distribStrings, $cfg->config['aop']['distribution_method']); $distributionOptions = getAOPAssignField('distribution_options', $cfg->config['aop']['distribution_options']); if (!empty($cfg->config['aop']['distribution_user_id'])) { $distributionUserName = BeanFactory::getBean("Users", $cfg->config['aop']['distribution_user_id'])->name; } else { $distributionUserName = ''; } $sugar_smarty->assign('distribution_user_name', $distributionUserName); $emailTemplateList = get_bean_select_array(true, 'EmailTemplate', 'name'); $userEmailTemplateDropdown = get_select_options_with_id($emailTemplateList, $cfg->config['aop']['user_email_template_id']); $contactEmailTemplateDropdown = get_select_options_with_id($emailTemplateList, $cfg->config['aop']['contact_email_template_id']); $creationEmailTemplateDropdown = get_select_options_with_id($emailTemplateList, $cfg->config['aop']['case_creation_email_template_id']); $closureEmailTemplateDropdown = get_select_options_with_id($emailTemplateList, $cfg->config['aop']['case_closure_email_template_id']); $joomlaEmailTemplateDropdown = get_select_options_with_id($emailTemplateList, $cfg->config['aop']['joomla_account_creation_email_template_id']); $sugar_smarty->assign('USER_EMAIL_TEMPLATES', $userEmailTemplateDropdown); $sugar_smarty->assign('CONTACT_EMAIL_TEMPLATES', $contactEmailTemplateDropdown); $sugar_smarty->assign('CREATION_EMAIL_TEMPLATES', $creationEmailTemplateDropdown);