function canvasactions_pos_form in ImageCache Actions 5.3
Same name and namespace in other branches
- 5.2 utility.inc \canvasactions_pos_form()
Prepare a subform for displaying positioning fields
Helper function to render a common element.
1 call to canvasactions_pos_form()
- canvasactions_definecanvas_form in ./
canvasactions.inc - Implementation of imagecache_hook_form()
File
- ./
utility.inc, line 31
Code
function canvasactions_pos_form($action) {
$form = array(
#'#theme' => 'canvasactions_pos_form',
'xpos' => array(
'#type' => 'textfield',
'#title' => t('X offset'),
'#default_value' => isset($action['xpos']) ? $action['xpos'] : 'center',
'#size' => 6,
'#description' => t('Enter an offset in pixels or use a keyword: <em>left</em>, <em>center</em>, or <em>right</em>.'),
),
'ypos' => array(
'#type' => 'textfield',
'#title' => t('Y offset'),
'#default_value' => isset($action['ypos']) ? $action['ypos'] : 'center',
'#size' => 6,
'#description' => t('Enter an offset in pixels or use a keyword: <em>top</em>, <em>center</em>, or <em>bottom</em>.'),
),
);
return $form;
}