function image_scale_form
image_scale_form($data)
Form structure for the image scale form.
Note that this is not a complete form, it only contains the portion of the form for configuring the scale options. Therefore it does not not need to include metadata about the effect, nor a submit button.
Parameters
$data: The current configuration for this scale effect.
File
- modules/image/image.admin.inc, line 559
- Administration pages for image settings.
Code
function image_scale_form($data) { $form = image_resize_form($data); $form['#element_validate'] = array('image_effect_scale_validate'); $form['width']['#required'] = FALSE; $form['height']['#required'] = FALSE; $form['upscale'] = array( '#type' => 'checkbox', '#default_value' => (isset($data['upscale'])) ? $data['upscale'] : 0, '#title' => t('Allow Upscaling'), '#description' => t('Let scale make images larger than their original size'), ); return $form; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!image!image.admin.inc/function/image_scale_form/7.x