Remove some fields from the form to rely on EntityTrait
authoreileen <emcnaughton@wikimedia.org>
Sun, 29 Jul 2018 04:30:52 +0000 (16:30 +1200)
committereileen <emcnaughton@wikimedia.org>
Sun, 29 Jul 2018 05:01:21 +0000 (17:01 +1200)
CRM/Member/Form/MembershipType.php

index a9ac197f113578f0ae5236a14fd05fa75394930b..3a5d4926bc9361288e8174521b7388bba370e464 100644 (file)
@@ -250,22 +250,11 @@ class CRM_Member_Form_MembershipType extends CRM_Member_Form_MembershipConfig {
     // 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);