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
d39be464
Commit
d39be464
authored
May 07, 2012
by
Jelle Sebreghts
Browse files
hide webform settings if clientside_validation_webform is disabled
parent
6b26ea94
Changes
2
Show whitespace changes
Inline
Side-by-side
clientside_validation.admin.inc
View file @
d39be464
...
...
@@ -438,7 +438,7 @@ function clientside_validation_settings_form_submit($form, &$form_state) {
clientside_validation_settings_update
(
$cvs_type
,
$cvs_formid
,
$values
);
}
else
{
clientside_validation_settings_add
(
$cvs_type
,
$cvs_formid
,
$values
);
clientside_validation_settings_add
(
$cvs_type
,
$cvs_formid
,
$values
,
TRUE
);
}
}
}
...
...
clientside_validation.module
View file @
d39be464
...
...
@@ -68,6 +68,7 @@ function clientside_validation_menu() {
'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.'
,
...
...
@@ -77,6 +78,7 @@ function clientside_validation_menu() {
'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.'
,
...
...
@@ -224,7 +226,6 @@ function clientside_validation_webform_after_build(&$form, &$form_state) {
$settings
=
array
();
_clientside_validation_add_general_settings
(
$settings
,
$form
[
'#id'
]);
_clientside_validation_add_special_rules
(
$js_rules
,
$settings
,
$form
);
if
(
variable_get
(
'clientside_validation_use_minified'
,
0
)
==
0
)
{
drupal_add_js
(
drupal_get_path
(
'module'
,
'clientside_validation'
)
.
'/jquery-validate/jquery.validate.js'
);
}
...
...
@@ -330,7 +331,6 @@ function clientside_validation_form_after_build(&$form, &$form_state) {
function
_clientside_validation_add_general_settings
(
&
$settings
,
$form_id
)
{
$definedsettings
=
clientside_validation_settings_current_form
();
// Add a setting for this form if the hidden elements should still be validated
$include_hidden_setting
=
$definedsettings
[
'include_hidden'
][
'include_hidden'
];
$include_hidden
=
preg_split
(
'/(\r\n?|\n)/'
,
$include_hidden_setting
,
-
1
,
PREG_SPLIT_NO_EMPTY
);
...
...
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