You are here

function clientside_validation_menu in Clientside Validation 7

Same name and namespace in other branches
  1. 6 clientside_validation.module \clientside_validation_menu()
  2. 7.2 clientside_validation.module \clientside_validation_menu()

Implements hook_menu().

File

./clientside_validation.module, line 63
Add client side validation to forms.

Code

function clientside_validation_menu() {
  $items['admin/config/validation'] = array(
    'title' => 'Validation',
    'description' => 'Validation settings.',
    'position' => 'right',
    'weight' => -10,
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'system.admin.inc',
    'file path' => drupal_get_path('module', 'system'),
  );
  $items['admin/config/validation/clientside_validation'] = array(
    'title' => 'Clientside Validation',
    'description' => 'Administer clientside validation.',
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'system.admin.inc',
    'file path' => drupal_get_path('module', 'system'),
  );
  $items['admin/config/validation/clientside_validation/general'] = array(
    'title' => 'General settings',
    'description' => 'Edit general settings.',
    'weight' => -1,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'clientside_validation_general_settings_form',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'clientside_validation.admin.inc',
  );
  $items['admin/config/validation/clientside_validation/default'] = array(
    'title' => 'Default settings',
    'description' => 'Edit default settings.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'clientside_validation_settings_form',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'clientside_validation.admin.inc',
    'weight' => 5,
  );
  $items['admin/config/validation/clientside_validation/content-types'] = array(
    'title' => 'Content types',
    'description' => 'Override settings for content types.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'clientside_validation_settings_overview',
      'content-types',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'clientside_validation.admin.inc',
    'weight' => 10,
  );
  if (module_exists('clientside_validation_webform')) {
    $items['admin/config/validation/clientside_validation/webforms'] = array(
      'title' => 'Webforms',
      'description' => 'Override settings for webforms.',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'clientside_validation_settings_overview',
        'webforms',
      ),
      'access arguments' => array(
        'administer site configuration',
      ),
      'file' => 'clientside_validation.admin.inc',
      'weight' => 11,
    );
  }
  $items['admin/config/validation/clientside_validation/custom-forms'] = array(
    'title' => 'Custom forms',
    'description' => 'Override settings for custom forms.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'clientside_validation_settings_overview',
      'custom-forms',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'clientside_validation.admin.inc',
    'weight' => 12,
  );
  $items['admin/config/validation/clientside_validation/%/%/edit'] = array(
    'title' => 'Edit settings',
    'type' => MENU_CALLBACK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'clientside_validation_settings_form',
      5,
      4,
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'clientside_validation.admin.inc',
  );
  $items['admin/config/validation/clientside_validation/%/%/disable'] = array(
    'title' => 'Disable settings',
    'type' => MENU_CALLBACK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'clientside_validation_settings_confirmation_form',
      5,
      4,
      'disable',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'clientside_validation.admin.inc',
  );
  $items['admin/config/validation/clientside_validation/%/%/enable'] = array(
    'title' => 'Enable settings',
    'type' => MENU_CALLBACK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'clientside_validation_settings_confirmation_form',
      5,
      4,
      'enable',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'clientside_validation.admin.inc',
  );
  $items['admin/config/validation/clientside_validation/%/%/delete'] = array(
    'title' => 'Delete settings',
    'type' => MENU_CALLBACK,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'clientside_validation_settings_confirmation_form',
      5,
      4,
      'delete',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'clientside_validation.admin.inc',
  );
  $items['clientside_validation/ajax'] = array(
    'title' => 'Clientside validation ajax callback',
    'page callback' => '_clientside_validation_ajax_call',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['clientside_validation/captcha'] = array(
    'title' => 'Clientside validation ajax callback to validate captcha',
    'page callback' => '_clientside_validation_ajax_captcha',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['clientside_validation/phone'] = array(
    'title' => 'Clientside validation ajax callback to validate phone numbers',
    'page callback' => '_clientside_validation_ajax_phone',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['clientside_validation/drupalURL'] = array(
    'title' => 'Clientside validation validate url callback',
    'page callback' => '_clientside_validation_url_validation_callback',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}