X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FPrice%2FForm%2FField.php;h=7146644ac23c77868d7a6b33996fbf4306220c52;hb=d2de89f2d59302dcd3bc273389682cd129a8cde1;hp=3870e0dbc54c7b313e3e045bed55701dd7e85259;hpb=dbfabc8e664a214931c5a31a61ecc07a74ccab50;p=civicrm-core.git diff --git a/CRM/Price/Form/Field.php b/CRM/Price/Form/Field.php index 3870e0dbc5..7146644ac2 100644 --- a/CRM/Price/Form/Field.php +++ b/CRM/Price/Form/Field.php @@ -44,7 +44,7 @@ class CRM_Price_Form_Field extends CRM_Core_Form { CONST NUM_OPTION = 15; /** - * the custom set id saved to the session for an update + * The custom set id saved to the session for an update * * @var int * @access protected @@ -68,13 +68,13 @@ class CRM_Price_Form_Field extends CRM_Core_Form { protected $_extendComponentId; /** - * variable is set if price set is used for membership + * Variable is set if price set is used for membership * @access protected */ protected $_useForMember; /** - * Function to set variables up before form is built + * Set variables up before form is built * * @param null * @@ -96,21 +96,11 @@ class CRM_Price_Form_Field extends CRM_Core_Form { CRM_Utils_System::appendBreadCrumb($breadCrumb); - switch ($this->_action) { - case CRM_Core_Action::ADD: - CRM_Utils_System::setTitle(ts('Add Price Field')); - break; - case CRM_Core_Action::UPDATE: - CRM_Utils_System::setTitle(ts('Edit Price Field')); - break; - case CRM_Core_Action::DELETE: - CRM_Utils_System::setTitle(ts('Delete Price Field')); - break; - } + $this->setPageTitle(ts('Price Field')); } /** - * This function sets the default values for the form. Note that in edit/view mode + * Set default values for the form. Note that in edit/view mode * the default values are retrieved from the database * * @param null @@ -180,7 +170,7 @@ class CRM_Price_Form_Field extends CRM_Core_Form { } /** - * Function to actually build the form + * Build the form object * * @param null * @@ -310,7 +300,7 @@ class CRM_Price_Form_Field extends CRM_Core_Form { array( '' => ' ') + $membershipTypes, FALSE, $js ); - $this->add('text', 'membership_num_terms[' . $i . ']', ts('Number of terms'), CRM_Utils_Array::value('membership_num_terms', $attributes)); + $this->add('text', 'membership_num_terms[' . $i . ']', ts('Number of Terms'), CRM_Utils_Array::value('membership_num_terms', $attributes)); } // weight @@ -399,12 +389,12 @@ class CRM_Price_Form_Field extends CRM_Core_Form { } /** - * global validation rules for the form + * Global validation rules for the form * - * @param array $fields (referance) posted values of the form + * @param array $fields posted values of the form * * @param $files - * @param $form + * @param CRM_Core_Form $form * * @return array if errors then list of errors to be posted back to the form, * true otherwise