You are here

function imagepicker_views_handler_field_image_url::options_form in Image Picker 7

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

Overrides views_handler_field::options_form

File

handlers/imagepicker_views_handler_field_image_url.inc, line 21
@author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Class

imagepicker_views_handler_field_image_url
@file @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  if (module_exists('image') && imagepicker_variable_get('imagepicker_image_enable', 0)) {
    $opts = image_style_options();
    $form['presets'] = array(
      '#type' => 'select',
      '#title' => t('Presets'),
      '#options' => $opts,
      '#default_value' => $this->options['presets'],
    );
  }
  $form['img_size'] = array(
    '#type' => 'select',
    '#title' => t('Size'),
    '#description' => t('Size if not using a preset'),
    '#options' => array(
      'full' => t('Full'),
      'thumb' => t('Thumbnail'),
    ),
    '#default_value' => $this->options['img_size'],
  );
}