protected $_campaignID = NULL;
/**
- * Function to set variables up before form is built
+ * Check if repeating event
+ */
+ protected $_isRepeatingEvent;
+
+ /**
+ * set variables up before form is built
*
* @return void
* @access public
$this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE, NULL, 'GET');
if ($this->_id) {
+ $this->_isRepeatingEvent = CRM_Core_BAO_RecurringEntity::getParentFor($this->_id, 'civicrm_event');
$this->assign('eventId', $this->_id);
if (!empty($this->_addBlockName) && empty($this->_addProfileBottom) && empty($this->_addProfileBottomAdd)) {
$this->add('hidden', 'id', $this->_id);
// its an update mode, do a permission check
if (!CRM_Event_BAO_Event::checkPermission($this->_id, CRM_Core_Permission::EDIT)) {
- CRM_Core_Error::fatal(ts('You do not have permission to access this page'));
+ CRM_Core_Error::fatal(ts('You do not have permission to access this page.'));
}
$participantListingID = CRM_Utils_Array::value('participant_listing_id', $eventInfo);
CRM_Utils_System::setTitle(ts('Edit Event Template') . " - $title");
}
else {
+ $configureText = ts('Configure Event');
$title = CRM_Utils_Array::value('title', $eventInfo);
- CRM_Utils_System::setTitle(ts('Configure Event') . " - $title");
+ //If it is a repeating event change title
+ if ($this->_isRepeatingEvent) {
+ $configureText = 'Configure Repeating Event';
+ }
+ CRM_Utils_System::setTitle($configureText . " - $title");
}
$this->assign('title', $title);
}
$this->_templateId = (int) CRM_Utils_Request::retrieve('template_id', 'Integer', $this);
+ //Is a repeating event
+ if ($this->_isRepeatingEvent) {
+ $isRepeatingEntity = TRUE;
+ $this->assign('isRepeatingEntity', $isRepeatingEntity);
+ }
+
// also set up tabs
CRM_Event_Form_ManageEvent_TabHeader::build($this);
}
/**
- * This function sets the default values for the form. For edit/view mode
+ * Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
return 'CRM/Event/Form/ManageEvent/Tab.tpl';
}
}
+
+ /**
+ * Pre-load libraries required by Online Registration Profile fields
+ */
+ static function addProfileEditScripts() {
+ CRM_UF_Page_ProfileEditor::registerProfileScripts();
+ CRM_UF_Page_ProfileEditor::registerSchemas(array('IndividualModel', 'ParticipantModel'));
+ }
}