class CRM_Contribute_Form_ManagePremiums extends CRM_Contribute_Form {
/**
- * Function to pre process the form
+ * pre process the form
*
* @access public
*
}
/**
- * This function sets the default values for the form. Manage Premiums that in edit/view mode
+ * Set default values for the form. Manage Premiums that in edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
*/
public function buildQuickForm() {
- //parent::buildQuickForm( );
+ parent::buildQuickForm( );
+ $this->setPageTitle(ts('Premium Product'));
if ($this->_action & CRM_Core_Action::PREVIEW) {
CRM_Contribute_BAO_Premium::buildPremiumPreviewBlock($this, $this->_id);
-
- $this->addButtons(array(
- array(
- 'type' => 'next',
- 'name' => ts('Done with Preview'),
- 'isDefault' => TRUE,
- ),
- )
- );
-
return;
}
if ($this->_action & CRM_Core_Action::DELETE) {
- $this->addButtons(array(
- array(
- 'type' => 'next',
- 'name' => ts('Delete'),
- 'isDefault' => TRUE,
- ),
- array(
- 'type' => 'cancel',
- 'name' => ts('Cancel'),
- ),
- )
- );
return;
}
),
)
);
-
$this->assign('productId', $this->_id);
}
*
* @param array $params (ref.) an assoc array of name/value pairs
*
+ * @param $files
+ *
* @return mixed true or array of errors
* @access public
* @static
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
*
* @access private
*
+ * @param $filename
+ * @param $resizedName
+ * @param $width
+ * @param $height
+ *
* @return Path to image
*/
private function _resizeImage($filename, $resizedName, $width, $height) {
$config = CRM_Core_Config::singleton();
return $config->imageUploadURL.basename($newFilename);
}
+
}