You are here

function image_advance_resize_form in image effect 7

1 string reference to 'image_advance_resize_form'
image_effect_image_effect_info in ./image_effect.module
Implements hook_image_effect_info()

File

./image_effect.module, line 48
Image Effect module file.

Code

function image_advance_resize_form($data) {
  $form['width'] = array(
    '#type' => 'textfield',
    '#title' => t('Width'),
    '#default_value' => isset($data['width']) ? $data['width'] : '',
    '#field_suffix' => ' ' . t('pixels'),
    '#required' => TRUE,
    '#size' => 10,
    '#element_validate' => array(
      'image_effect_integer_validate',
    ),
    '#allow_negative' => FALSE,
  );
  $form['height'] = array(
    '#type' => 'textfield',
    '#title' => t('Height'),
    '#default_value' => isset($data['height']) ? $data['height'] : '',
    '#field_suffix' => ' ' . t('pixels'),
    '#required' => TRUE,
    '#size' => 10,
    '#element_validate' => array(
      'image_effect_integer_validate',
    ),
    '#allow_negative' => FALSE,
  );
  $form['background'] = array(
    '#type' => 'checkbox',
    '#title' => t('Use transparent background'),
    '#default_value' => isset($data['background']) ? $data['background'] : NULL,
  );
  return $form;
}