Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
ca833681
Commit
ca833681
authored
Nov 09, 2009
by
Dries Buytaert
Browse files
- Patch
#627204
by yched: removed unnecessary prefix on field 'add more' element.
parent
e54794cd
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/field/field.default.inc
View file @
ca833681
...
...
@@ -17,7 +17,7 @@ function field_default_extract_form_values($obj_type, $object, $field, $instance
if
(
isset
(
$form_state
[
'values'
][
$field_name
][
$langcode
]))
{
$items
=
$form_state
[
'values'
][
$field_name
][
$langcode
];
// Remove the 'value' of the 'add more' button.
unset
(
$items
[
$field_name
.
'_
add_more'
]);
unset
(
$items
[
'
add_more'
]);
}
}
...
...
modules/field/field.form.inc
View file @
ca833681
...
...
@@ -183,7 +183,7 @@ function field_multiple_value_form($field, $instance, $langcode, $items, &$form,
// Add 'add more' button, if not working with a programmed form.
if
(
$field
[
'cardinality'
]
==
FIELD_CARDINALITY_UNLIMITED
&&
empty
(
$form_state
[
'programmed'
]))
{
$form_element
[
$field_name
.
'_
add_more'
]
=
array
(
$form_element
[
'
add_more'
]
=
array
(
'#type'
=>
'submit'
,
'#name'
=>
$field_name
.
'_add_more'
,
'#value'
=>
t
(
'Add another item'
),
...
...
@@ -236,7 +236,7 @@ function theme_field_multiple_value_form($variables) {
// preview or failed validation)
$items
=
array
();
foreach
(
element_children
(
$element
)
as
$key
)
{
if
(
$key
===
$element
[
'#field_name'
]
.
'_
add_more'
)
{
if
(
$key
===
'
add_more'
)
{
$add_more_button
=
&
$element
[
$key
];
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment