You are here

function flag_lists_generate_lists_form in Flag Lists 7

Same name and namespace in other branches
  1. 6 flag_lists.admin.inc \flag_lists_generate_lists_form()
  2. 7.3 flag_lists.admin.inc \flag_lists_generate_lists_form()
1 string reference to 'flag_lists_generate_lists_form'
flag_lists_menu in ./flag_lists.module
Implementation of hook_menu().

File

./flag_lists.admin.inc, line 423
Contains administrative pages for creating, editing, and deleting flag lists.

Code

function flag_lists_generate_lists_form() {
  $templates = flag_lists_get_templates();
  $options = array();
  foreach ($templates as $template) {
    $options[$template->fid] = $template->name . ' (' . implode(', ', $template->types) . ')';
  }
  $form['templates'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Generate lists and/or listings for the following templates.'),
    '#options' => $options,
  );
  $form['lists'] = array(
    '#type' => 'textfield',
    '#title' => t('How many lists should be generated?'),
    '#default_value' => '0',
    '#size' => 7,
    '#maxlength' => 7,
  );
  $form['listings'] = array(
    '#type' => 'textfield',
    '#title' => t('How many listings should be generated?'),
    '#default_value' => '0',
  );
  $form['kill_lists'] = array(
    '#type' => 'checkbox',
    '#title' => t('Delete ALL existing lists and listings before generating new ones? Templates will not be deleted.'),
    '#default_value' => FALSE,
  );
  $form['kill_listings'] = array(
    '#type' => 'checkbox',
    '#title' => t('Delete ALL existing listings before generating new ones? (Lists are not deleted unless the above is checked.)'),
    '#default_value' => FALSE,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Do it!'),
  );
  return $form;
}