Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
forena
Commits
e5196af7
Commit
e5196af7
authored
Apr 26, 2013
by
metzlerd
Browse files
Fixed issue with data_source causing validation errors when set with non
select parameters.
parent
c0fdf7e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
forena.module
View file @
e5196af7
...
...
@@ -523,10 +523,15 @@ function forena_parameter_form($formid, &$form_state, $parameters, $attributes=
@
(
strcmp
((
string
)
$node
[
'require'
],
"1"
)
==
0
)
?
$required
=
TRUE
:
$required
=
FALSE
;
$ctl_attrs
=
array
();
//returned values filtered against data_field attr.
if
(
$data_source
)
{
$list
=
Frx
::
RepoMan
()
->
dataBlockParams
(
$data_source
,
$data_field
,
$label_field
);
if
(
!
$required
&&
$add_null
)
$list
=
array
(
''
=>
''
)
+
$list
;
}
//Determine the form element type to be displayed
//If select or radios is chosen then begin a $list array for display values.
$multiselect
=
FALSE
;
$list
=
array
();
$ajax
=
FALSE
;
$add_null
=
FALSE
;
switch
(
$type
)
{
...
...
@@ -590,11 +595,6 @@ function forena_parameter_form($formid, &$form_state, $parameters, $attributes=
$list
=
''
;
}
//returned values filtered against data_field attr.
if
(
$data_source
)
{
$list
=
Frx
::
RepoMan
()
->
dataBlockParams
(
$data_source
,
$data_field
,
$label_field
);
if
(
!
$required
&&
$add_null
)
$list
=
array
(
''
=>
''
)
+
$list
;
}
if
(
isset
(
$menu_parms
[
$id
])
&&
$type
==
'textfield'
)
{
$disabled
=
TRUE
;
}
...
...
@@ -628,8 +628,6 @@ function forena_parameter_form($formid, &$form_state, $parameters, $attributes=
);
}
//if $list is not empty then push options
//onto the array. options will cause an error for
//textfield elements.
...
...
Write
Preview
Markdown
is supported
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