function tipsy_admin

cis7 tipsy.admin.inc tipsy_admin($form, &$form_state)
cle7 tipsy.admin.inc tipsy_admin($form, &$form_state)
elmsmedia7 tipsy.admin.inc tipsy_admin($form, &$form_state)
icor7 tipsy.admin.inc tipsy_admin($form, &$form_state)
meedjum_blog7 tipsy.admin.inc tipsy_admin($form, &$form_state)
mooc7 tipsy.admin.inc tipsy_admin($form, &$form_state)

Implementation of tipsy admin form

1 string reference to 'tipsy_admin'
tipsy_menu in sites/all/modules/ulmus/tipsy/tipsy.module
Implements hook_menu().

File

sites/all/modules/ulmus/tipsy/tipsy.admin.inc, line 6

Code

function tipsy_admin($form, &$form_state) {
  $settings = _tipsy_get_settings();
  $form = array();

  $form['#attached']['js'][] = drupal_get_path('module', 'tipsy') . '/javascripts/tipsy.admin.js';
  $form['#attached']['css'][] = drupal_get_path('module', 'tipsy') . '/stylesheets/tipsy.admin.css';

  $form['drupal_forms'] = array(
    '#type' => 'fieldset',
    '#title' => t('Drupal forms general settings'),
    '#weight' => -5,
    '#collapsible' => TRUE,
    '#collapsed' => FALSE,
  );
  $form['drupal_forms']['forms'] = array(
    '#type' => 'checkbox',
    '#default_value' => $settings['drupal_forms']['forms'],
    '#title' => t('Apply Tipsy for form items descriptions on all Drupal forms.'),
    '#description' => t('This will automatically enable Tipsy tooltips to form elements descriptions.'),
  );
  $form['drupal_forms']['wrapper'] = array(
    '#tree' => TRUE,
    '#weight' => 0,
    '#prefix' => '<div class="clear-block" id="tipsy-drupal-forms-wrapper">',
    '#suffix' => '</div>',
  );
  $form['drupal_forms']['wrapper']['options'] = tipsy_options_form($settings['drupal_forms'], true);

  $form['custom_selectors'] = array(
    '#type' => 'fieldset',
    '#title' => t('Custom selectors'),
    '#weight' => -4,
    '#collapsible' => TRUE,
    '#collapsed' => FALSE,
  );
  $form['custom_selectors']['rules'] = array(
    '#tree' => TRUE,
    '#prefix' => '<div id="tipsy-custom-selectors">',
    '#suffix' => '</div>',
    '#theme' => 'tipsy_custom_selectors_form',
  );
  $form['custom_selectors']['rules_submit'] = array(
    '#type' => 'button',
    '#value' => t('Add another rule'),
    '#submit' => array('tipsy_custom_selectors_add'), // If no javascript action.
    '#ajax' => array(
      'callback' => 'tipsy_admin_callback',
      'wrapper' => 'tipsy-custom-selectors',
      'method' => 'replace',
      'effect' => 'fade',
    ),
  );
  if ($settings['custom_selectors']) {
    foreach ($settings['custom_selectors'] as $delta => $options) {
      $form['custom_selectors']['rules'][$delta] = tipsy_custom_selector_form($options);
    }
  }
  else {
    $form['custom_selectors']['rules'][0] = tipsy_custom_selector_form();
  }

  // The "Add another rule" button was clicked.
  if (isset($form_state['values']['rules_submit'])) {
    $form['custom_selectors']['rules'][] = tipsy_custom_selector_form();
  }

  $form['buttons']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save configuration'),
  );
  $form['#theme'] = 'system_settings_form';
  $form['#submit'][] = 'tipsy_admin_submit';
  return $form;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.