diff --git a/include/class.config.php b/include/class.config.php index a85fc696263e4316da1f0181e6ccf6a4ea6921ce..cb1f15d5c4f96447db712798a2a6a8bcfbd548ec 100644 --- a/include/class.config.php +++ b/include/class.config.php @@ -999,12 +999,6 @@ class OsticketConfig extends Config { case 'access': return $this->updateAccessSettings($vars, $errors); break; - case 'autoresp': - return $this->updateAutoresponderSettings($vars, $errors); - break; - case 'alerts': - return $this->updateAlertsSettings($vars, $errors); - break; case 'kb': return $this->updateKBSettings($vars, $errors); break; @@ -1114,6 +1108,9 @@ class OsticketConfig extends Config { if (!preg_match('`(?!<\\\)#`', $vars['ticket_number_format'])) $errors['ticket_number_format'] = 'Ticket number format requires at least one hash character (#)'; + $this->updateAutoresponderSettings($vars, $errors); + $this->updateAlertsSettings($vars, $errors); + if(!Validator::process($f, $vars, $errors) || $errors) return false; diff --git a/include/class.nav.php b/include/class.nav.php index 7d3c119b753d515ddf3e24a76359627eec9723c2..e6df1e897ea390b2d59b4dc38de5edfcdf11ae18 100644 --- a/include/class.nav.php +++ b/include/class.nav.php @@ -249,8 +249,6 @@ class AdminNav extends StaffNav{ $subnav[]=array('desc'=>__('Tasks'),'href'=>'settings.php?t=tasks','iconclass'=>'lists'); $subnav[]=array('desc'=>__('Access'),'href'=>'settings.php?t=access','iconclass'=>'users'); $subnav[]=array('desc'=>__('Knowledgebase'),'href'=>'settings.php?t=kb','iconclass'=>'kb-settings'); - $subnav[]=array('desc'=>__('Autoresponder'),'href'=>'settings.php?t=autoresp','iconclass'=>'email-autoresponders'); - $subnav[]=array('desc'=>__('Alerts and Notices'),'href'=>'settings.php?t=alerts','iconclass'=>'alert-settings'); break; case 'manage': $subnav[]=array('desc'=>__('Help Topics'),'href'=>'helptopics.php','iconclass'=>'helpTopics'); diff --git a/include/staff/settings-alerts.inc.php b/include/staff/settings-alerts.inc.php index 3a9326bc4127343b57831a14a81b8d50f1b5c5bb..03168d557c872843ce65ae83c41daa2d8fb12c34 100644 --- a/include/staff/settings-alerts.inc.php +++ b/include/staff/settings-alerts.inc.php @@ -1,8 +1,3 @@ -<h2><?php echo __('Alerts and Notices'); ?> - <i class="help-tip icon-question-sign" href="#page_title"></i></h2> -<form action="settings.php?t=alerts" method="post" id="save"> -<?php csrf_token(); ?> -<input type="hidden" name="t" value="alerts" > <table class="form_table settings_table" width="940" border="0" cellspacing="0" cellpadding="2"> <thead> <tr> @@ -233,8 +228,3 @@ </tr> </tbody> </table> -<p style="text-align:center;"> - <input class="button" type="submit" name="submit" value="<?php echo __('Save Changes'); ?>"> - <input class="button" type="reset" name="reset" value="<?php echo __('Reset Changes'); ?>"> -</p> -</form> diff --git a/include/staff/settings-autoresp.inc.php b/include/staff/settings-autoresp.inc.php index 0a59f4b9d215589b6f1cd2ad2540854dc4cb4c7c..42a52de40eee2b35f5836ef7639aae04e7b63f5e 100644 --- a/include/staff/settings-autoresp.inc.php +++ b/include/staff/settings-autoresp.inc.php @@ -1,7 +1,3 @@ -<h2><?php echo __('Autoresponder Settings'); ?></h2> -<form action="settings.php?t=autoresp" method="post" id="save"> -<?php csrf_token(); ?> -<input type="hidden" name="t" value="autoresp" > <table class="form_table settings_table" width="940" border="0" cellspacing="0" cellpadding="2"> <thead> <tr> @@ -60,8 +56,3 @@ echo $config['overlimit_notice_active'] ? 'checked="checked"' : ''; ?>/> </tr> </tbody> </table> -<p style="padding-left:200px;"> - <input class="button" type="submit" name="submit" value="<?php echo __('Save Changes'); ?>"> - <input class="button" type="reset" name="reset" value="<?php echo __('Reset Changes'); ?>"> -</p> -</form> diff --git a/include/staff/settings-tickets.inc.php b/include/staff/settings-tickets.inc.php index 8e1c23723176dc71d50d3bccfcb6f23262741b8a..c2cf0f20077069397f978c21df38c73d4f8072af 100644 --- a/include/staff/settings-tickets.inc.php +++ b/include/staff/settings-tickets.inc.php @@ -7,6 +7,17 @@ if(!($maxfileuploads=ini_get('max_file_uploads'))) <form action="settings.php?t=tickets" method="post" id="save"> <?php csrf_token(); ?> <input type="hidden" name="t" value="tickets" > + +<ul class="clean tabs"> + <li class="active"><a href="#settings"><i class="icon-asterisk"></i> + <?php echo __('Settings'); ?></a></li> + <li><a href="#autoresp"><i class="icon-mail-reply-all"></i> + <?php echo __('Autoresponder'); ?></a></li> + <li><a href="#alerts"><i class="icon-bell-alt"></i> + <?php echo __('Alerts and Notices'); ?></a></li> +</ul> + +<div class="tab_content" id="settings"> <table class="form_table settings_table" width="940" border="0" cellspacing="0" cellpadding="2"> <thead> <tr> @@ -279,6 +290,16 @@ if(!($maxfileuploads=ini_get('max_file_uploads'))) <?php } ?> </tbody> </table> +</div> +<div class="hidden tab_content" id="autoresp" + data-tip-namespace="settings.autoresponder"> + <?php include STAFFINC_DIR . 'settings-autoresp.inc.php'; ?> +</div> +<div class="hidden tab_content" id="alerts" + data-tip-namespace="settings.alerts"> + <?php include STAFFINC_DIR . 'settings-alerts.inc.php'; ?> +</div> + <p style="padding-left:250px;"> <input class="button" type="submit" name="submit" value="<?php echo __('Save Changes');?>"> <input class="button" type="reset" name="reset" value="<?php echo __('Reset Changes');?>">