+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
}
}
- $this->_cdType = CRM_Utils_Array::value('type', $_GET);
- $this->assign('cdType', FALSE);
- if ($this->_cdType) {
- $this->assign('cdType', TRUE);
- return CRM_Custom_Form_CustomData::preProcess($this);
- }
-
// when custom data is included in this page
if (!empty($_POST['hidden_custom'])) {
CRM_Custom_Form_CustomData::preProcess($this);
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @param null
- *
* @return array
* array of default values
*/
$this->addElement('hidden', 'activity_type_id', $petitionTypeID);
// script / instructions / description of petition purpose
- $this->addWysiwyg('instructions', ts('Introduction'), $attributes['instructions']);
+ $this->add('wysiwyg', 'instructions', ts('Introduction'), $attributes['instructions']);
// Campaign id
$campaigns = CRM_Campaign_BAO_Campaign::getCampaigns(CRM_Utils_Array::value('campaign_id', $this->_values));
// custom group id
$this->add('select', 'contact_profile_id', ts('Contact Profile'),
array(
- '' => ts('- select -')
+ '' => ts('- select -'),
) + $customContactProfiles, TRUE
);
// thank you title and text (html allowed in text)
$this->add('text', 'thankyou_title', ts('Thank-you Page Title'), CRM_Core_DAO::getAttribute('CRM_Campaign_DAO_Survey', 'thankyou_title'));
- $this->addWysiwyg('thankyou_text', ts('Thank-you Message'), CRM_Core_DAO::getAttribute('CRM_Campaign_DAO_Survey', 'thankyou_text'));
+ $this->add('wysiwyg', 'thankyou_text', ts('Thank-you Message'), CRM_Core_DAO::getAttribute('CRM_Campaign_DAO_Survey', 'thankyou_text'));
// bypass email confirmation?
$this->add('checkbox', 'bypass_confirm', ts('Bypass email confirmation'));
}
/**
- * Global validation rules for the form
+ * Global validation rules for the form.
* @param $fields
* @param $files
* @param $form
$session->replaceUserContext(CRM_Utils_System::url('civicrm/campaign', 'reset=1&subPage=petition'));
}
}
+
}