+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
class CRM_Event_Form_ManageEvent_TabHeader {
/**
- * @param CRM_Core_Form $form
+ * @param CRM_Event_Form_ManageEvent $form
*
* @return array
*/
}
/**
- * @param CRM_Core_Form $form
+ * @param CRM_Event_Form_ManageEvent $form
*
* @return array
* @throws Exception
$tabs['location'] = array('title' => ts('Event Location')) + $default;
$tabs['fee'] = array('title' => ts('Fees')) + $default;
$tabs['registration'] = array('title' => ts('Online Registration')) + $default;
- if (CRM_Core_Permission::check('administer CiviCRM')) {
+ if (CRM_Core_Permission::check('administer CiviCRM') || CRM_Event_BAO_Event::checkPermission(NULL, CRM_Core_Permission::EDIT)) {
$tabs['reminder'] = array('title' => ts('Schedule Reminders'), 'class' => 'livePage') + $default;
}
$tabs['conference'] = array('title' => ts('Conference Slots')) + $default;
$tabs['pcp'] = array('title' => ts('Personal Campaigns')) + $default;
$tabs['repeat'] = array('title' => ts('Repeat')) + $default;
+ // Repeat tab must refresh page when switching repeat mode so js & vars will get set-up
+ if (!$form->_isRepeatingEvent) {
+ unset($tabs['repeat']['class']);
+ }
+
// check if we're in shopping cart mode for events
$enableCart = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::EVENT_PREFERENCES_NAME,
'enable_cart'
}
/**
- * @param $form
+ * @param CRM_Event_Form_ManageEvent $form
*/
public static function reset(&$form) {
$tabs = self::process($form);
$current = $current ? $current : 'settings';
return $current;
}
+
}