Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
drupal.org
clientside_validation
Commits
35358289
Commit
35358289
authored
May 07, 2012
by
Peter Droogmans
Browse files
changed menu structure
parent
844c9524
Changes
2
Hide whitespace changes
Inline
Side-by-side
clientside_validation.admin.inc
View file @
35358289
...
...
@@ -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
(
...
...
clientside_validation.module
View file @
35358289
...
...
@@ -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
]))
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment