- $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,
- array('onChange' => "selectFormat( this.value, false );")
- );;
+ $form->add('static', 'pdf_format_header', NULL, ts('Page Format: %1', array(1 => '<span class="pdf-format-header-label"></span>')));
+ $form->addSelect('format_id', array(
+ 'label' => ts('Select Format'),
+ 'placeholder' => ts('Default'),
+ 'entity' => 'message_template',
+ 'field' => 'pdf_format_id',
+ 'option_url' => 'civicrm/admin/pdfFormats',
+ ));