function imagecrop_form_imagecache_ui_action_form_alter in Image javascript crop 6
Implementation of hook_form_{form_id}_alter().
File
- ./
imagecrop.module, line 405 - Provides a javascript toolbox through an imagecache action.
Code
function imagecrop_form_imagecache_ui_action_form_alter($form, $form_state) {
if ($form['action']['#value'] == 'imagecrop_javascript') {
$form['reset-crops'] = array(
'#type' => 'checkbox',
'#title' => t('Reset the already cropped images to the new width and height'),
'#description' => t('All crop selections that have the same width / height as old settings, will be updated to the new width and height.'),
'#weight' => 0,
);
$form['old-height'] = array(
'#type' => 'hidden',
'#value' => $form['data']['height']['#default_value'],
);
$form['old-width'] = array(
'#type' => 'hidden',
'#value' => $form['data']['width']['#default_value'],
);
$form['#submit'][] = 'imagecrop_javascript_submit';
}
}