X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FContact%2FForm%2FTask%2FPickProfile.php;h=43d3c2a92fd05c51154810c30dfc1c85c6e8589c;hb=fe482240fb0d8a15a50325a36b2854ffbafeffab;hp=8714544bfdb1c58511653ac9c54c128af92414a0;hpb=a5d44edbee5498fa4195c5f3571db6b820185fa8;p=civicrm-core.git diff --git a/CRM/Contact/Form/Task/PickProfile.php b/CRM/Contact/Form/Task/PickProfile.php index 8714544bfd..43d3c2a92f 100644 --- a/CRM/Contact/Form/Task/PickProfile.php +++ b/CRM/Contact/Form/Task/PickProfile.php @@ -1,7 +1,7 @@ _contactIds) > $this->_maxContacts) { - CRM_Core_Session::setStatus(ts("The maximum number of contacts you can select for Batch Update is %1. You have selected %2. Please select fewer contacts from your search results and try again.", array(1 => $this->_maxContacts, 2 => count($this->_contactIds))), ts('Maximum Exceeded'), 'error'); + CRM_Core_Session::setStatus(ts("The maximum number of contacts you can select for Batch Update is %1. You have selected %2. Please select fewer contacts from your search results and try again.", array( + 1 => $this->_maxContacts, + 2 => count($this->_contactIds), + )), ts('Maximum Exceeded'), 'error'); $validate = TRUE; } @@ -97,13 +94,12 @@ class CRM_Contact_Form_Task_PickProfile extends CRM_Contact_Form_Task { } /** - * Build the form + * Build the form object. * - * @access public * * @return void */ - function buildQuickForm() { + public function buildQuickForm() { CRM_Utils_System::setTitle(ts('Batch Profile Update for Contact')); foreach ($this->_contactIds as $id) { @@ -122,30 +118,29 @@ class CRM_Contact_Form_Task_PickProfile extends CRM_Contact_Form_Task { } $ufGroupElement = $this->add('select', 'uf_group_id', ts('Select Profile'), array('' => ts('- select profile -')) + $profiles, TRUE, array('class' => 'crm-select2 huge')); - $this->addDefaultButtons(ts('Continue >>')); + $this->addDefaultButtons(ts('Continue')); } /** - * Add local and global form rules + * Add local and global form rules. * - * @access protected * * @return void */ - function addRules() { + public function addRules() { $this->addFormRule(array('CRM_Contact_Form_Task_PickProfile', 'formRule')); } /** - * global validation rules for the form + * Global validation rules for the form. * - * @param array $fields posted values of the form + * @param array $fields + * Posted values of the form. * - * @return array list of errors to be posted back to the form - * @static - * @access public + * @return array + * list of errors to be posted back to the form */ - static function formRule($fields) { + public static function formRule($fields) { if (CRM_Core_BAO_UFField::checkProfileType($fields['uf_group_id'])) { $errorMsg['uf_group_id'] = "You cannot select mix profile for batch update."; } @@ -158,9 +153,8 @@ class CRM_Contact_Form_Task_PickProfile extends CRM_Contact_Form_Task { } /** - * process the form after the input has been submitted and validated + * Process the form after the input has been submitted and validated. * - * @access public * * @return void */ @@ -172,6 +166,5 @@ class CRM_Contact_Form_Task_PickProfile extends CRM_Contact_Form_Task { // also reset the batch page so it gets new values from the db $this->controller->resetPage('Batch'); } - //end of function -} +}