projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
invoice_sections_with_taxes per-agent, RT#79636
[freeside.git]
/
httemplate
/
elements
/
select.html
diff --git
a/httemplate/elements/select.html
b/httemplate/elements/select.html
index
42cd895
..
100df94
100644
(file)
--- a/
httemplate/elements/select.html
+++ b/
httemplate/elements/select.html
@@
-4,12
+4,13
@@
field => 'myfield', # NAME property
curr_value => 'foo',
labels => { # or 'option_labels'
field => 'myfield', # NAME property
curr_value => 'foo',
labels => { # or 'option_labels'
+ # note: these will be escaped for you, don't escape them
'AL' => 'Alabama',
'AK' => 'Alaska',
'AR' => 'Arkansas',
},
options => [ 'AL', 'AK', 'AR' ],
'AL' => 'Alabama',
'AK' => 'Alaska',
'AR' => 'Arkansas',
},
options => [ 'AL', 'AK', 'AR' ],
- curr_value =>
$cgi->param('myfield'
),
+ curr_value =>
scalar( $cgi->param('myfield')
),
# recommended
id => 'myid', # DOM id
# recommended
id => 'myid', # DOM id
@@
-21,6
+22,7
@@
disabled => 0,
onchange => 'do_something()',
js_only => 0, # disables the whole thing
disabled => 0,
onchange => 'do_something()',
js_only => 0, # disables the whole thing
+ element_etc => '', # anything else to put in the <select> tag
&>
</%doc>
&>
</%doc>
@@
-29,12
+31,13
@@
<SELECT NAME = "<% $opt{field} %>"
ID = "<% $opt{id} %>"
previousValue = "<% $curr_value %>"
<SELECT NAME = "<% $opt{field} %>"
ID = "<% $opt{id} %>"
previousValue = "<% $curr_value %>"
- previousText = "<% $labels->{$curr_value} || $curr_value %>"
+ previousText = "<% $labels->{$curr_value} || $curr_value
|h
%>"
<% $multiple %>
<% $size %>
<% $style %>
<% $opt{disabled} %>
<% $onchange %>
<% $multiple %>
<% $size %>
<% $style %>
<% $opt{disabled} %>
<% $onchange %>
+ <% $opt{'element_etc'} %>
>
% if ( $opt{options} ) {
>
% if ( $opt{options} ) {
@@
-44,7
+47,7
@@
<OPTION VALUE="<% $option %>"
<% $opt{curr_value} eq $option ? 'SELECTED' : '' %>
>
<OPTION VALUE="<% $option %>"
<% $opt{curr_value} eq $option ? 'SELECTED' : '' %>
>
- <% $labels->{$option} || $option %>
+ <% $labels->{$option} || $option
|h
%>
</OPTION>
% }
</OPTION>
% }
@@
-66,7
+69,7
@@
%
% }
%
% }
-</SELECT>
+</SELECT>
<% $opt{'post_field_label'} %>
% }
<%init>
% }
<%init>