*/
static function buildQuickForm(&$form) {
$form->add('static', 'pdf_format_header', NULL, ts('Page Format'));
- $form->add('select', 'format_id', ts('Select Format'),
- array(
- 0 => ts('- default -')) + CRM_Core_BAO_PdfFormat::getList(TRUE), FALSE,
+ $form->add(
+ 'select',
+ 'format_id',
+ ts('Select Format'),
+ array(0 => ts('- default -')) + CRM_Core_BAO_PdfFormat::getList(TRUE),
+ FALSE,
array('onChange' => "selectFormat( this.value, false );")
- );
- $form->add('select', 'paper_size', ts('Paper Size'),
- array(
- 0 => ts('- default -')) + CRM_Core_BAO_PaperSize::getList(TRUE), FALSE,
+ );;
+ $form->add(
+ 'select',
+ 'paper_size',
+ ts('Paper Size'),
+ array(0 => ts('- default -')) + CRM_Core_BAO_PaperSize::getList(TRUE),
+ FALSE,
array('onChange' => "selectPaper( this.value ); showUpdateFormatChkBox();")
);
$form->add('static', 'paper_dimensions', NULL, ts('Width x Height'));
- $form->add('select', 'orientation', ts('Orientation'), CRM_Core_BAO_PdfFormat::getPageOrientations(), FALSE,
+ $form->add(
+ 'select',
+ 'orientation',
+ ts('Orientation'),
+ CRM_Core_BAO_PdfFormat::getPageOrientations(),
+ FALSE,
array('onChange' => "updatePaperDimensions(); showUpdateFormatChkBox();")
);
- $form->add('select', 'metric', ts('Unit of Measure'), CRM_Core_BAO_PdfFormat::getUnits(), FALSE,
+ $form->add(
+ 'select',
+ 'metric',
+ ts('Unit of Measure'),
+ CRM_Core_BAO_PdfFormat::getUnits(),
+ FALSE,
array('onChange' => "selectMetric( this.value );")
);
- $form->add('text', 'margin_left', ts('Left Margin'),
- array(
- 'size' => 8, 'maxlength' => 8, 'onkeyup' => "showUpdateFormatChkBox();"), TRUE
+ $form->add(
+ 'text',
+ 'margin_left',
+ ts('Left Margin'),
+ array('size' => 8, 'maxlength' => 8, 'onkeyup' => "showUpdateFormatChkBox();"),
+ TRUE
);
- $form->add('text', 'margin_right', ts('Right Margin'),
- array(
- 'size' => 8, 'maxlength' => 8, 'onkeyup' => "showUpdateFormatChkBox();"), TRUE
+ $form->add(
+ 'text',
+ 'margin_right',
+ ts('Right Margin'),
+ array('size' => 8, 'maxlength' => 8, 'onkeyup' => "showUpdateFormatChkBox();"),
+ TRUE
);
- $form->add('text', 'margin_top', ts('Top Margin'),
- array(
- 'size' => 8, 'maxlength' => 8, 'onkeyup' => "showUpdateFormatChkBox();"), TRUE
+ $form->add(
+ 'text',
+ 'margin_top',
+ ts('Top Margin'),
+ array('size' => 8, 'maxlength' => 8, 'onkeyup' => "showUpdateFormatChkBox();"),
+ TRUE
);
- $form->add('text', 'margin_bottom', ts('Bottom Margin'),
- array(
- 'size' => 8, 'maxlength' => 8, 'onkeyup' => "showUpdateFormatChkBox();"), TRUE
+ $form->add(
+ 'text',
+ 'margin_bottom',
+ ts('Bottom Margin'),
+ array('size' => 8, 'maxlength' => 8, 'onkeyup' => "showUpdateFormatChkBox();"),
+ TRUE
);
$form->add('checkbox', 'bind_format', ts('Always use this Page Format with the selected Template'));
$form->add('checkbox', 'update_format', ts('Update Page Format (this will affect all templates that use this format)'));
CRM_Mailing_BAO_Mailing::commonLetterCompose($form);
if ($form->_single) {
- $cancelURL = CRM_Utils_System::url('civicrm/contact/view',
+ $cancelURL = CRM_Utils_System::url(
+ 'civicrm/contact/view',
"reset=1&cid={$form->_cid}&selectedChild=activity",
- FALSE, NULL, FALSE
+ FALSE,
+ NULL,
+ FALSE
);
if ($form->get('action') == CRM_Core_Action::VIEW) {
$form->addButtons(array(
* we allow the controller to set force/reset externally, useful when we are being
* driven by the wizard framework
*/
-
+
$this->_reset = CRM_Utils_Request::retrieve('reset', 'Boolean', CRM_Core_DAO::$_nullObject);
$this->_force = CRM_Utils_Request::retrieve('force', 'Boolean', $this, FALSE);
$this->_limit = CRM_Utils_Request::retrieve('limit', 'Positive', $this);
* add form checkboxes for each row. This is needed out here to conform to QF protocol
* of all elements being declared in builQuickForm
*/
-
+
$rows = $this->get('rows');
if (is_array($rows)) {
if (!$this->_single) {
$this->_formValues[$f] = CRM_Utils_Rule::cleanMoney($this->_formValues[$f]);
}
}
-
+
$config = CRM_Core_Config::singleton();
$tags = CRM_Utils_Array::value('contact_tags', $this->_formValues);
if ($tags && !is_array($tags)) {
unset($this->_formValues['contact_tags']);
$this->_formValues['contact_tags'][$tags] = 1;
}
-
+
if ($tags && is_array($tags)) {
unset($this->_formValues['contact_tags']);
foreach($tags as $notImportant => $tagID) {
$this->_formValues['contact_tags'][$tagID] = 1;
}
}
-
-
+
+
if (!$config->groupTree) {
$group = CRM_Utils_Array::value('group', $this->_formValues);
if ($group && !is_array($group)) {
unset($this->_formValues['group']);
$this->_formValues['group'][$group] = 1;
}
-
+
if ($group && is_array($group)) {
unset($this->_formValues['group']);
foreach($group as $notImportant => $groupID) {
$this->_formValues['group'][$groupID] = 1;
}
}
-
+
}
CRM_Core_BAO_CustomValue::fixFieldValueOfTypeMemo($this->_formValues);
// check actionName and if next, then do not repeat a search, since we are going to the next page
// hack, make sure we reset the task values
- $stateMachine = &$this->controller->getStateMachine();
+ $stateMachine = $this->controller->getStateMachine();
$formName = $stateMachine->getTaskFormName();
$this->controller->resetPage($formName);
return;
*
* @return void
* @access public
- */ function preProcess() {
-
+ */
+ function preProcess() {
$this->skipOnHold = $this->skipDeceased = FALSE;
CRM_Contact_Form_Task_PDFLetterCommon::preProcess($this);
$this->add('static', 'more_options_header', NULL, ts('Record Update Options'));
$this->add('checkbox', 'receipt_update', ts('Update receipt dates for these contributions'), FALSE);
$this->add('checkbox', 'thankyou_update', ts('Update thank-you dates for these contributions'), FALSE);
- //$this->add( 'checkbox', 'group_recurring_contribution', ts('Group recurring contribution (1 letter by recurring contribution for the choosen period)'), false );
// Group options for tokens are not yet implemented. dgg
$options = array(ts('Contact'), ts('Recurring'));
$this->addRadio('is_group_by', ts('Grouping contributions in one letter based on'), $options, array(), "<br/>", FALSE);
-
+
$this->addButtons(array(
array(
'type' => 'submit',