You are here

function imagepicker_block_form in Image Picker 7

Same name and namespace in other branches
  1. 6.2 imagepicker.module \imagepicker_block_form()
1 call to imagepicker_block_form()
imagepicker_block_configure in ./imagepicker.module
Implements hook_block_configure().

File

./imagepicker.module, line 706
@author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function imagepicker_block_form($i) {
  $groups = imagepicker_get_all_groups();
  $form['imagepicker_galleryblocks_link_' . $i] = array(
    '#type' => 'textfield',
    '#title' => t('Link text for Gallery Block !i', array(
      '!i' => $i,
    )),
    '#default_value' => imagepicker_variable_get('imagepicker_galleryblocks_link_' . $i, t('Photo Gallery !i', array(
      '!i' => $i,
    ))),
    '#required' => TRUE,
    '#description' => t('Set the link text for this block. Can contain html.'),
    '#maxlength' => 255,
  );
  $form['imagepicker_galleryblocks_group_' . $i] = array(
    '#type' => 'select',
    '#title' => t('Select a group for this block'),
    '#default_value' => imagepicker_variable_get('imagepicker_galleryblocks_group_' . $i, ''),
    '#options' => $groups,
  );
  $form['imagepicker_galleryblocks_text_' . $i] = array(
    '#type' => 'textarea',
    '#title' => t('Block text'),
    '#default_value' => imagepicker_variable_get('imagepicker_galleryblocks_text_' . $i, ''),
    '#required' => FALSE,
    '#description' => t("You can add some text to the block. To include the link in the text use the token '[link]'."),
  );
  $form['imagepicker_galleryblocks_enable_' . $i] = array(
    '#type' => 'value',
    '#value' => 1,
  );
  $form['imagepicker_galleryblocks_grouptot'] = array(
    '#type' => 'value',
    '#value' => count($groups),
  );
  return $form;
}