Commit 35358289 authored by Peter Droogmans's avatar Peter Droogmans
Browse files

changed menu structure

parent 844c9524
......@@ -5,6 +5,7 @@
*/
function clientside_validation_general_settings_form($form_id, $form_state) {
drupal_set_title('Edit general settings');
//jquery.validate.js settings
$form['clientside_validation_min'] = array(
......
......@@ -28,27 +28,31 @@ function clientside_validation_menu() {
'description' => 'Validation settings.',
'position' => 'right',
'weight' => -10,
'page callback' => 'drupal_get_form',
'page arguments' => array('clientside_validation_general_settings_form'),
'access arguments' => array('access administration pages'),
'file' => 'clientside_validation.admin.inc',
'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' => 'drupal_get_form',
'page arguments' => array('clientside_validation_general_settings_form'),
'page callback' => 'system_admin_menu_block_page',
'access arguments' => array('administer site configuration'),
'file' => 'clientside_validation.admin.inc',
'file' => 'system.admin.inc',
'file path' => drupal_get_path('module', 'system'),
);
$items['admin/config/validation/clientside_validation/general'] = array(
'title' => 'General',
'type' => MENU_DEFAULT_LOCAL_TASK,
'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',
'type' => MENU_LOCAL_TASK,
'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'),
......@@ -57,7 +61,7 @@ function clientside_validation_menu() {
);
$items['admin/config/validation/clientside_validation/content-types'] = array(
'title' => 'Content types',
'type' => MENU_LOCAL_TASK,
'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'),
......@@ -66,7 +70,7 @@ function clientside_validation_menu() {
);
$items['admin/config/validation/clientside_validation/webforms'] = array(
'title' => 'Webforms',
'type' => MENU_LOCAL_TASK,
'description' => 'Override settings for webforms.',
'page callback' => 'drupal_get_form',
'page arguments' => array('clientside_validation_settings_overview', 'webforms'),
'access arguments' => array('administer site configuration'),
......@@ -75,7 +79,7 @@ function clientside_validation_menu() {
);
$items['admin/config/validation/clientside_validation/custom-forms'] = array(
'title' => 'Custom forms',
'type' => MENU_LOCAL_TASK,
'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'),
......@@ -1152,8 +1156,11 @@ function clientside_validation_settings_title($cvs_type, $cvs_formid, $edit = TR
if (!$edit) {
$title = 'Create settings for %formid';
}
switch ($cvs_type) {
case 'default':
return t('Edit default settings');
break;
case 'content-types':
$content_types = node_type_get_types();
if (isset($content_types[$cvs_formid])) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment