You are here

function gallery_assist_global_form in Gallery Assist 7

Form builder; Manage GA global settings.

Parameters

$cero: Placeholder array.

$form_state: An associative array containing the current state of the form.

See also

gallery_assist_global_form_submit()

1 string reference to 'gallery_assist_global_form'
gallery_assist_menu in ./gallery_assist.module
Implements hook_menu().

File

./gallery_assist.admin.inc, line 333
GA module administration forms.

Code

function gallery_assist_global_form($cero, $form_state) {
  $form = array();
  $form['cache'] = array(
    '#type' => 'fieldset',
    '#title' => 'Caching',
    '#collapsible' => TRUE,
  );
  $form['cache']['cacheforce'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable global cache for GA.'),
    '#default_value' => variable_get("gallery_assist_cacheforce", FALSE),
    '#description' => t('Force GA to cache the whole module data.<br />This option overwrite all assignments cache settings.'),
  );
  $form['cache']['cacheforce_is'] = array(
    '#type' => 'hidden',
    '#value' => variable_get("gallery_assist_cacheforce", FALSE),
  );
  $form['assignation'] = array(
    '#type' => 'fieldset',
    '#title' => 'Gallery functionality on content types',
    '#collapsible' => TRUE,
  );
  $content_types = node_type_get_names();
  $content_types_assignation = gallery_assist_check_assignation($content_types);
  $form['assignation']['assigned'] = array(
    '#type' => 'checkboxes',
    '#options' => $content_types,
    '#default_value' => $content_types_assignation,
    '#description' => 'Assign the gallery functionality to the following content types',
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => 'Save',
  );
  $form['gareset'] = array(
    '#type' => 'submit',
    '#value' => 'Reset',
  );
  return $form;
}