You are here

public function pdf_export_views_handler_area::options_form in PDF Export 7

Default options form that provides the label widget that all fields should have.

Overrides views_handler_area::options_form

File

pdf_export_views/pdf_export_views_handler_area.inc, line 33
Definition of pdf_export_views_handler_area.

Class

pdf_export_views_handler_area
PDF export area text handler.

Code

public function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['button_label'] = array(
    '#title' => t('Button label'),
    '#type' => 'textfield',
    '#default_value' => $this->options['button_label'],
  );
  $form['button_classes'] = array(
    '#title' => t('CSS classes'),
    '#type' => 'textfield',
    '#default_value' => $this->options['button_classes'],
  );
  $form['pdf_name'] = array(
    '#title' => t('PDF name'),
    '#description' => t("Let this field empty if you want to use the view's name. If you enter a name, you should append the .pdf at the end."),
    '#type' => 'textfield',
    '#default_value' => $this->options['pdf_name'],
  );
  $form['pdf_content_selector'] = array(
    '#title' => t('PDF content selector'),
    '#description' => t('Use the selector for the content you would like to display on PDF, you can separate it with comma and the order passed will be respected.'),
    '#type' => 'textfield',
    '#required' => TRUE,
    '#default_value' => $this->options['pdf_content_selector'],
  );
  $themes = list_themes();
  $themes_options = array();
  foreach ($themes as $theme_name => $theme_obj) {
    if (1 == $theme_obj->status) {
      $themes_options[$theme_name] = $theme_name;
    }
  }
  $form['css_theme'] = array(
    '#title' => t('CSS theme'),
    '#description' => t('The theme where the css file is.'),
    '#type' => 'select',
    '#options' => $themes_options,
    '#default_value' => $this->options['css_theme'],
  );
  $form['css_files'] = array(
    '#title' => t('CSS file'),
    '#description' => t('The path to the css file relative to the theme path. You can include multiple paths separated by an space.'),
    '#type' => 'textfield',
    '#default_value' => $this->options['css_files'],
  );
}