],
'duration_interval' => [
'name' => 'duration_interval',
+ 'required' => TRUE,
],
'duration_unit' => [
'name' => 'duration_unit',
'description' => ts('Duration of this membership (e.g. 30 days, 2 months, 5 years, 1 lifetime)'),
+ 'required' => TRUE,
],
'period_type' => [
'name' => 'period_type',
'description' => ts("Select 'rolling' if membership periods begin at date of signup. Select 'fixed' if membership periods begin on a set calendar date."),
'help' => ['id' => 'period-type', 'file' => "CRM/Member/Page/MembershipType.hlp"],
+ 'required' => TRUE,
],
'fixed_period_start_day' => [
'name' => 'fixed_period_start_day',
// to stop & make that one work.
$this->assign('tpl_standardised_fields', ['name', 'description', 'member_of_contact_id', 'minimum_fee']);
- $this->addField('minimum_fee');
- $this->addField('duration_unit', [], TRUE);
- $this->addField('period_type', [], TRUE);
- $this->addField('is_active');
- $this->addField('weight');
- $this->addField('max_related');
-
$this->addRule('name', ts('A membership type with this name already exists. Please select another name.'),
'objectExists', array('CRM_Member_DAO_MembershipType', $this->_id)
);
$this->addRule('minimum_fee', ts('Please enter a monetary value for the Minimum Fee.'), 'money');
- $this->add('text', 'duration_interval', ts('Duration Interval'),
- CRM_Core_DAO::getAttribute('CRM_Member_DAO_MembershipType', 'duration_interval')
- );
-
$props = array('api' => array('params' => array('contact_type' => 'Organization')));
$this->addEntityRef('member_of_contact_id', ts('Membership Organization'), $props, TRUE);