Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ctools
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
ctools
Commits
c383d5ba
Commit
c383d5ba
authored
15 years ago
by
Earl Miles
Browse files
Options
Downloads
Patches
Plain Diff
Fix broken node add context form
parent
821ab15c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugins/contexts/node_add_form.inc
+10
-4
10 additions, 4 deletions
plugins/contexts/node_add_form.inc
with
10 additions
and
4 deletions
plugins/contexts/node_add_form.inc
+
10
−
4
View file @
c383d5ba
...
...
@@ -41,7 +41,8 @@ function ctools_context_create_node_add_form($empty, $data = NULL, $conf = FALSE
}
if
(
$conf
)
{
$data
=
$data
[
'type'
];
// Holdover from typo'd config.
$data
=
isset
(
$data
[
'types'
])
?
$data
[
'types'
]
:
$data
[
'type'
];
}
if
(
!
empty
(
$data
))
{
...
...
@@ -55,7 +56,8 @@ function ctools_context_create_node_add_form($empty, $data = NULL, $conf = FALSE
$node
=
array
(
'uid'
=>
$user
->
uid
,
'name'
=>
$user
->
name
,
'type'
=>
$type
);
ctools_include
(
'form'
);
$form_id
=
$node
->
type
.
'_node_form'
;
module_load_include
(
'inc'
,
'node'
,
'node.pages'
);
$form_id
=
$node
[
'type'
]
.
'_node_form'
;
$form_state
=
array
(
'want form'
=>
TRUE
,
'args'
=>
array
(
$node
));
$form
=
ctools_build_form
(
$form_id
,
$form_state
);
...
...
@@ -85,7 +87,11 @@ function ctools_context_node_add_form_settings_form($conf, $external = FALSE) {
$options
[
$type
]
=
$info
->
name
;
}
$form
[
'types'
]
=
array
(
if
(
isset
(
$conf
[
'types'
])
&&
!
isset
(
$conf
[
'type'
]))
{
$conf
[
'type'
]
=
$conf
[
'types'
];
}
$form
[
'type'
]
=
array
(
'#title'
=>
t
(
'Node type'
),
'#type'
=>
'select'
,
'#options'
=>
$options
,
...
...
@@ -94,7 +100,7 @@ function ctools_context_node_add_form_settings_form($conf, $external = FALSE) {
);
if
(
$external
)
{
$form
[
'type
s
'
][
'#description'
]
.
=
' '
.
t
(
'Select external to require this from an external source (such as a containing panel page).'
);
$form
[
'type'
][
'#description'
]
.
=
' '
.
t
(
'Select external to require this from an external source (such as a containing panel page).'
);
}
return
$form
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment