You are here

function imagecrop_javascript_form in Image javascript crop 5

Same name and namespace in other branches
  1. 6 imagecrop_actions.inc \imagecrop_javascript_form()

@file Imagecache actions implementation.

Parameters

$data values passed on by imagecache:

File

./imagecrop_actions.inc, line 10
Imagecache actions implementation.

Code

function imagecrop_javascript_form($data) {
  $form['width'] = array(
    '#type' => 'textfield',
    '#title' => t('Width'),
    '#required' => TRUE,
    '#default_value' => $data['width'],
    '#description' => t('Enter a width in pixels or as a percentage. i.e. 500 or 80%.'),
  );
  $form['height'] = array(
    '#type' => 'textfield',
    '#title' => t('Height'),
    '#required' => TRUE,
    '#default_value' => $data['height'],
    '#description' => t('Enter a height in pixels or as a percentage. i.e. 500 or 80%.'),
  );
  $form['xoffset'] = array(
    '#type' => 'textfield',
    '#title' => t('X offset'),
    '#default_value' => $data['xoffset'],
    '#description' => t('Enter an offset in pixels or use a keyword: <em>left</em>, <em>center</em>, or <em>right</em>.'),
  );
  $form['yoffset'] = array(
    '#type' => 'textfield',
    '#title' => t('Y offset'),
    '#default_value' => $data['yoffset'],
    '#description' => t('Enter an offset in pixels or use a keyword: <em>top</em>, <em>center</em>, or <em>bottom</em>.'),
  );
  $form['resizable'] = array(
    '#type' => 'checkbox',
    '#title' => t('Is the toolbox resizable or not?'),
    '#default_value' => $data['resizable'],
  );
  return $form;
}