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
1f84b386
Commit
1f84b386
authored
May 04, 2012
by
Peter Droogmans
Browse files
editing forms cleanup
parent
34294bff
Changes
1
Hide whitespace changes
Inline
Side-by-side
clientside_validation.admin.inc
View file @
1f84b386
...
...
@@ -89,14 +89,13 @@ function clientside_validation_general_settings_form($form_id, $form_state) {
}
function
clientside_validation_settings_form
(
$form
,
$form_state
,
$cvsid
=
NULL
,
$type
=
'default'
)
{
$default_settings
=
clientside_validation_settings_load
(
NULL
,
'default'
);
$settings
=
clientside_validation_settings_load
(
$cvsid
,
$type
);
if
(
isset
(
$settings
[
'settings'
])
&&
is_array
(
$settings
[
'settings'
]))
{
$settings
=
$settings
[
'settings'
];
}
if
(
!
$settings
)
{
$settings
=
$default_settings
;
$settings
=
clientside_validation_settings_load
(
NULL
,
'default'
)
;
}
$form
[
'#tree'
]
=
TRUE
;
...
...
@@ -345,6 +344,7 @@ function clientside_validation_settings_form($form, $form_state, $cvsid = NULL,
fields (e.g. conditional fields), those will be validated too.'
),
);
if
(
$type
!=
'default'
)
{
// @TODO: add user friendly names: array('validate_options' => 'Validate options', ... )
foreach
(
array
(
'validate_options'
,
'error'
,
'error_placement'
,
'include_hidden'
)
as
$fieldset
)
{
$statefield
=
':input[name="'
.
$fieldset
.
'_override_default"]'
;
$form
[
$fieldset
][
'#states'
]
=
array
(
...
...
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