function imagepicker_group_images_form in Image Picker 6.2
Same name and namespace in other branches
- 5.2 imagepicker.module \imagepicker_group_images_form()
- 5 imagepicker.module \imagepicker_group_images_form()
- 7 imagepicker.functions.inc \imagepicker_group_images_form()
Insert a form into the edit image page to allow the image to be associated with a group.
Parameters
$img_id: The id of the image to be inserted.
$account: Optional, allows the administrator to edit user settings.
Return value
Returns the group image form.
3 string references to 'imagepicker_group_images_form'
File
- ./
imagepicker.functions.inc, line 1744 - Imagepicker functions
Code
function imagepicker_group_images_form(&$form_state, $img_id, $account = FALSE) {
$grouplist = imagepicker_get_groups($account);
$enabledlist = imagepicker_get_image_groups($img_id);
$form['group_images'] = array(
'#type' => 'fieldset',
'#title' => t('Groups'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['group_images']['grouplist'] = array(
'#type' => 'checkboxes',
'#default_value' => $enabledlist,
'#options' => $grouplist,
'#title' => t('Your Groups'),
);
$form['group_images']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save group settings'),
);
$form['img_id'] = array(
'#type' => 'value',
'#value' => $img_id,
);
return $form;
}