X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCustom%2FForm%2FMoveField.php;h=ce103511884e05d8cbc57d0ec75ad3810bec8586;hb=1e66775e6f88ac33d643ca2d68577ab01dd41dd5;hp=325bdc3529085f913a20ad8e937b8a0523612ad2;hpb=e3a363809875b227257e2247d43ed96115817c65;p=civicrm-core.git diff --git a/CRM/Custom/Form/MoveField.php b/CRM/Custom/Form/MoveField.php index 325bdc3529..ce10351188 100644 --- a/CRM/Custom/Form/MoveField.php +++ b/CRM/Custom/Form/MoveField.php @@ -1,7 +1,7 @@ _srcFID = CRM_Utils_Request::retrieve('fid', 'Positive', $this, TRUE ); @@ -95,18 +95,17 @@ class CRM_Custom_Form_MoveField extends CRM_Core_Form { ); CRM_Utils_System::setTitle(ts('Custom Field Move: %1', - array(1 => $this->_srcFieldLabel) - )); + array(1 => $this->_srcFieldLabel) + )); $session = CRM_Core_Session::singleton(); $session->pushUserContext(CRM_Utils_System::url('civicrm/admin/custom/group/field', "reset=1&action=browse&gid={$this->_srcGID}")); } /** - * Function to actually build the form + * Build the form object * * @return void - * @access public */ public function buildQuickForm() { @@ -117,7 +116,8 @@ class CRM_Custom_Form_MoveField extends CRM_Core_Form { } $customGroup = array( - '' => ts('- select -')) + $customGroup; + '' => ts('- select -'), + ) + $customGroup; $this->add('select', 'dst_group_id', ts('Destination'), @@ -148,10 +148,10 @@ class CRM_Custom_Form_MoveField extends CRM_Core_Form { * * @return array|bool */ - static function formRule($fields, $files, $self) { + public static function formRule($fields, $files, $self) { $self->_dstGID = $fields['dst_group_id']; - $tmp = CRM_Core_BAO_CustomField::_moveFieldValidate($self->_srcFID, $self->_dstGID); - $errors = array(); + $tmp = CRM_Core_BAO_CustomField::_moveFieldValidate($self->_srcFID, $self->_dstGID); + $errors = array(); if ($tmp['newGroupID']) { $errors['dst_group_id'] = $tmp['newGroupID']; } @@ -162,7 +162,6 @@ class CRM_Custom_Form_MoveField extends CRM_Core_Form { * Process the form when submitted * * @return void - * @access public */ public function postProcess() { CRM_Core_BAO_CustomField::moveField($this->_srcFID, $this->_dstGID); @@ -174,10 +173,10 @@ class CRM_Custom_Form_MoveField extends CRM_Core_Form { $srcUrl = CRM_Utils_System::url('civicrm/admin/custom/group/field', "reset=1&action=browse&gid={$this->_dstGID}"); CRM_Core_Session::setStatus(ts("%1 has been moved to the custom set %2.", array( - 1 => $this->_srcFieldLabel, - 2 => $dstGroup, - 3 => $srcUrl - )), '', 'success'); + 1 => $this->_srcFieldLabel, + 2 => $dstGroup, + 3 => $srcUrl, + )), '', 'success'); } -} +}