Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
acs-templating
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
acs-templating
Commits
361b300e
Commit
361b300e
authored
Jun 03, 2009
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Updated Localization - incorporated issues reported by Marco Cevoli
about untranslatable strings
parent
cd2ec42e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
48 deletions
+40
-48
widget-procs.tcl
tcl/widget-procs.tcl
+40
-48
No files found.
tcl/widget-procs.tcl
View file @
361b300e
...
...
@@ -434,59 +434,51 @@ ad_proc -public template::widget::menu {
attribute_reference
{
mode edit
}
}
{
upvar
$attribute
_reference attributes
# Create an array for easier testing of selected values
template::util::list_to_lookup
$values
_list values
if
{
!
[
string
equal
$mode
"edit"
]
}
{
set selected_list
[
list
]
set output
{}
upvar
$attribute
_reference attributes
foreach option
$options
_list
{
set label
[
lindex
$option
0
]
set value
[
lindex
$option
1
]
if
{
[
info
exists values
(
$value
)]
}
{
lappend selected_list
$label
append output
"<input type=
\"
hidden
\"
name=
\"
$widget
_name
\"
value=
\"
[
ad_quotehtml
$value
]
\"
>"
}
}
# Create an array for easier testing of selected values
template::util::list_to_lookup
$values
_list values
append output
[
join
$selected
_list
", "
]
}
else
{
set output
"<select name=
\"
$widget
_name
\"
"
foreach name
[
array
names attributes
]
{
if
{
[
string
equal
$attributes
(
$name
)
{}]
}
{
append output
"
$name
"
}
else
{
append output
"
$name
=
\"
$attributes
(
$name
)
\"
"
}
}
append output
">
\n
"
foreach option
$options
_list
{
set label
[
lindex
$option
0
]
set value
[
lindex
$option
1
]
if
{
!
[
string
equal
$mode
"edit"
]
}
{
set selected_list
[
list
]
set output
{}
foreach option
$options
_list
{
set label
[
lindex
$option
0
]
set value
[
lindex
$option
1
]
if
{
[
info
exists values
(
$value
)]
}
{
lappend selected_list
$label
append output
"<input type=
\"
hidden
\"
name=
\"
$widget
_name
\"
value=
\"
[
ad_quotehtml
$value
]
\"
>"
}
}
append output
[
join
$selected
_list
", "
]
append output
" <option value=
\"
[
template::util::quote_html
$value
]
\"
"
if
{
[
info
exists values
(
$value
)]
}
{
append output
" selected=
\"
selected
\"
"
}
}
else
{
append output
">
$label
</option>
\n
"
set output
"<select name=
\"
$widget
_name
\"
"
foreach name
[
array
names attributes
]
{
if
{
[
string
equal
$attributes
(
$name
)
{}]
}
{
append output
"
$name
"
}
else
{
append output
"
$name
=
\"
$attributes
(
$name
)
\"
"
}
}
append output
">
\n
"
foreach option
$options
_list
{
set label
[
lindex
$option
0
]
set value
[
lindex
$option
1
]
append output
" <option value=
\"
[
template::util::quote_html
$value
]
\"
"
if
{
[
info
exists values
(
$value
)]
}
{
append output
" selected=
\"
selected
\"
"
}
append output
">
$label
</option>
\n
"
}
append output
"</select>"
}
append output
"</select>"
}
return
$output
return
$output
}
ad_proc -public template::widget::select
{
element_reference tag_attributes
}
{
...
...
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