<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
- function setDefaultValues() {
+ public function setDefaultValues() {
$title = CRM_Core_DAO::getFieldValue('CRM_Contribute_DAO_ContributionPage', $this->_id, 'title');
CRM_Utils_System::setTitle(ts('Thank-you and Receipting') . " ($title)");
return parent::setDefaultValues();
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->registerRule('emailList', 'callback', 'emailList', 'CRM_Utils_Rule');
// thank you title and text (html allowed in text)
$this->add('text', 'thankyou_title', ts('Thank-you Page Title'), CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_ContributionPage', 'thankyou_title'), TRUE);
- $this->addWysiwyg('thankyou_text', ts('Thank-you Message'), CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_ContributionPage', 'thankyou_text'));
- $this->addWysiwyg('thankyou_footer', ts('Thank-you Page Footer'), CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_ContributionPage', 'thankyou_footer'));
+
+ $attributes = CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_ContributionPage', 'thankyou_text');
+ $attributes['click_wysiwyg'] = TRUE;
+ $this->addWysiwyg('thankyou_text', ts('Thank-you Message'), $attributes);
+ // FIXME: This hack forces height of editor to 175px. Need to modify QF classes for editors to allow passing
+ // explicit height and width.
+ $footerAttribs = array(
+ 'rows' => 2,
+ 'cols' => 40,
+ 'click_wysiwyg' => TRUE,
+ );
+ $this->addWysiwyg('thankyou_footer', ts('Thank-you Footer'), $footerAttribs);
$this->addElement('checkbox', 'is_email_receipt', ts('Email Receipt to Contributor?'), NULL, array('onclick' => "showReceipt()"));
$this->add('text', 'receipt_from_name', ts('Receipt From Name'), CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_ContributionPage', 'receipt_from_name'));
/**
* Global form rule
*
- * @param array $fields the input form values
- * @param array $files the uploaded files if any
- * @param array $options additional user data
+ * @param array $fields
+ * The input form values.
+ * @param array $files
+ * The uploaded files if any.
+ * @param array $options
+ * Additional user data.
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
- static function formRule($fields, $files, $options) {
+ public static function formRule($fields, $files, $options) {
$errors = array();
// if is_email_receipt is set, the receipt message must be non-empty
* Process the form
*
* @return void
- * @access public
*/
public function postProcess() {
// get the submitted form values.
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Thanks and Receipt');
}
}
-