You are here

function ajaxsubmit_admin_settings in Javascript Tools 5

Menu callback for admin settings form.

1 string reference to 'ajaxsubmit_admin_settings'
ajaxsubmit_menu in ajaxsubmit/ajaxsubmit.module
Implementation of hook_menu().

File

ajaxsubmit/ajaxsubmit.module, line 118
Make designated forms submit via AJAX.

Code

function ajaxsubmit_admin_settings() {
  $form = array();
  $known_forms = form_store_get_all();
  $options = array();
  foreach ($known_forms as $item) {
    $options[$item->form_id] = $item->form_id . ' - ' . $item->description;
  }
  $form['ajaxsubmit_forms'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Forms'),
    '#description' => t('Select the forms to apply the AJAX Submit behavior to.'),
    '#default_value' => array_filter(variable_get('ajaxsubmit_forms', array())),
    '#options' => $options,
  );
  $output = system_settings_form($form);
  return $output;
}