Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fusiondirectory
fusiondirectory
Commits
9184e06d
Commit
9184e06d
authored
Apr 25, 2016
by
Côme Chilliet
Browse files
Growing SetAttribute line number until number of values or 15 is reached
parent
d882635e
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/simpleplugin/class_attribute.inc
View file @
9184e06d
...
...
@@ -1976,6 +1976,7 @@ class SetAttribute extends Attribute
protected
$valueUnicity
=
TRUE
;
protected
$editingValue
=
FALSE
;
protected
$linearRendering
=
TRUE
;
protected
$size
=
4
;
/*! \brief The constructor of SetAttribute
*
...
...
@@ -2108,10 +2109,13 @@ class SetAttribute extends Attribute
function
renderOnlyFormInput
()
{
if
((
$this
->
size
<
15
)
&&
(
$this
->
size
<
count
(
$this
->
value
)))
{
$this
->
size
=
min
(
15
,
count
(
$this
->
value
));
}
$id
=
$this
->
getHtmlId
();
$smarty
=
get_smarty
();
$smarty
->
assign
(
$id
.
'_values'
,
$this
->
getDisplayValues
());
$display
=
'<select multiple="multiple" name="row'
.
$id
.
'[]" id="row'
.
$id
.
'"'
.
$display
=
'<select multiple="multiple" name="row'
.
$id
.
'[]" id="row'
.
$id
.
'"
size="'
.
$this
->
size
.
'"
'
.
(
$this
->
disabled
?
' disabled="disabled"'
:
''
)
.
' >'
.
"
\n
"
;
$display
.
=
'{html_options options=$'
.
$id
.
'_values}'
;
...
...
@@ -2259,6 +2263,11 @@ class SetAttribute extends Attribute
{
return
in_array
(
$value
,
$this
->
value
);
}
function
setSize
(
$size
)
{
$this
->
size
=
$size
;
}
}
/*! \brief This class allow to handle easily a composite attribute
...
...
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