You are here

function imagepicker_group_images_form in Image Picker 5

Same name and namespace in other branches
  1. 5.2 imagepicker.module \imagepicker_group_images_form()
  2. 6.2 imagepicker.functions.inc \imagepicker_group_images_form()
  3. 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

2 string references to 'imagepicker_group_images_form'
imagepicker_image_select in ./imagepicker.module
imagepicker_user_view in ./imagepicker.module

File

./imagepicker.module, line 1794
Enables permitted roles to upload images for insertion into configured nodes.

Code

function imagepicker_group_images_form($img_id) {
  $grouplist = imagepicker_get_groups();
  $enabledlist = imagepicker_get_image_groups($img_id);
  $form['group_images'] = array(
    '#type' => 'fieldset',
    '#title' => t('Groups'),
    '#description' => t(''),
    '#collapsible' => TRUE,
    '#collapsed' => FALSE,
  );
  $form['group_images']['grouplist'] = array(
    '#type' => 'checkboxes',
    '#default_value' => $enabledlist,
    '#options' => $grouplist,
    '#title' => t('Your Groups'),
    '#description' => t(''),
  );
  $form['group_images']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save group settings'),
  );
  $form['img_id'] = array(
    '#type' => 'hidden',
    '#value' => $img_id,
  );
  return $form;
}