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
drupal
Commits
333e47ac
Commit
333e47ac
authored
Aug 16, 2002
by
Dries
Browse files
- Made sure the selection boxes don't grow too long. Requisted by kika, patch by Marco.
parent
2c77a388
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/taxonomy.module
View file @
333e47ac
...
...
@@ -513,8 +513,7 @@ function _taxonomy_term_select($title, $name, $value, $vocabulary_id, $descripti
$select
.
=
"<option value=
\"
$key
\"
"
.
(
is_array
(
$value
)
?
(
in_array
(
$key
,
$value
)
?
" selected=
\"
selected
\"
"
:
""
)
:
(
$key
==
$value
?
" selected=
\"
selected
\"
"
:
""
))
.
">"
.
check_form
(
$choice
)
.
"</option>"
;
}
// min 8, possibly options/3 (set max too?)
$size
=
max
(
8
,
round
(
count
(
$options
))
/
3
);
$size
=
min
(
12
,
count
(
$options
));
return
form_item
(
$title
,
"<select name=
\"
edit[
$name
][]
\"
"
.
(
$multiple
?
" multiple size=
\"
$size
\"
"
:
""
)
.
(
$extra
?
"
$extra
"
:
""
)
.
">
$select
</select>"
,
$description
);
}
...
...
modules/taxonomy/taxonomy.module
View file @
333e47ac
...
...
@@ -513,8 +513,7 @@ function _taxonomy_term_select($title, $name, $value, $vocabulary_id, $descripti
$select
.
=
"<option value=
\"
$key
\"
"
.
(
is_array
(
$value
)
?
(
in_array
(
$key
,
$value
)
?
" selected=
\"
selected
\"
"
:
""
)
:
(
$key
==
$value
?
" selected=
\"
selected
\"
"
:
""
))
.
">"
.
check_form
(
$choice
)
.
"</option>"
;
}
// min 8, possibly options/3 (set max too?)
$size
=
max
(
8
,
round
(
count
(
$options
))
/
3
);
$size
=
min
(
12
,
count
(
$options
));
return
form_item
(
$title
,
"<select name=
\"
edit[
$name
][]
\"
"
.
(
$multiple
?
" multiple size=
\"
$size
\"
"
:
""
)
.
(
$extra
?
"
$extra
"
:
""
)
.
">
$select
</select>"
,
$description
);
}
...
...
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