function imagepicker_edit_form in Image Picker 7
Same name and namespace in other branches
- 5.2 imagepicker.module \imagepicker_edit_form()
- 5 imagepicker.module \imagepicker_edit_form()
- 6.2 imagepicker.edit.inc \imagepicker_edit_form()
2 string references to 'imagepicker_edit_form'
- imagepicker_admin_images in ./
imagepicker.admin.inc - _imagepicker_edit_img in ./
imagepicker.edit.inc - private functions
File
- ./
imagepicker.edit.inc, line 28 - @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function imagepicker_edit_form($form, &$form_state, $img, $src = 'iframe', $account = FALSE) {
$form['title'] = array(
'#type' => 'textfield',
'#title' => t('Title'),
'#description' => t('Edit title of your image'),
'#default_value' => htmlspecialchars_decode($img->img_title, ENT_QUOTES),
);
$form['description'] = array(
'#type' => 'textarea',
'#title' => t('Description'),
'#rows' => 2,
'#cols' => 80,
'#description' => t('Edit description of your image, max. 254 characters.'),
'#default_value' => htmlspecialchars_decode($img->img_description, ENT_QUOTES),
);
if ($account) {
$form['account'] = array(
'#type' => 'value',
'#value' => $account->uid,
);
}
$form['img_id'] = array(
'#type' => 'value',
'#value' => $img->img_id,
);
$form['src'] = array(
'#type' => 'value',
'#value' => $src,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Save'),
'#submit' => array(
'imagepicker_edit_form_do',
),
);
$form['cancel'] = array(
'#type' => 'submit',
'#value' => t('Cancel'),
'#submit' => array(
'imagepicker_edit_form_cancel',
),
);
return $form;
}