diff options
author | ivan <ivan> | 2011-06-10 03:33:57 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-06-10 03:33:57 +0000 |
commit | ef398b33e062bbb7a89c527bf4b34d62414c372c (patch) | |
tree | 732209a2e97859325ea5b3f8de073425dda97e8e /httemplate/elements | |
parent | 8ea66dde554e2b302ac6a24655fb285eaa569f61 (diff) |
add package def option to show $0 recurring on invoices, RT#9777
Diffstat (limited to 'httemplate/elements')
-rw-r--r-- | httemplate/elements/checkbox.html | 6 | ||||
-rw-r--r-- | httemplate/elements/input-text.html | 4 | ||||
-rw-r--r-- | httemplate/elements/tr-select-agent.html | 6 |
3 files changed, 14 insertions, 2 deletions
diff --git a/httemplate/elements/checkbox.html b/httemplate/elements/checkbox.html index 51760701e..91efe8578 100644 --- a/httemplate/elements/checkbox.html +++ b/httemplate/elements/checkbox.html @@ -6,6 +6,7 @@ ? ' CHECKED' : '' %> + <% $opt{disabled} %> <% $onchange %> ><% $opt{'postfix'} %> <%init> @@ -16,4 +17,9 @@ my $onchange = $opt{'onchange'} ? 'onChange="'. $opt{'onchange'}. '(this)"' : ''; +$opt{'disabled'} = &{ $opt{'disabled'} }( \%opt ) + if ref($opt{'disabled'}) eq 'CODE'; +$opt{'disabled'} = 'DISABLED' + if $opt{'disabled'} && $opt{'disabled'} !~ /disabled/i; # uuh... yeah? + </%init> diff --git a/httemplate/elements/input-text.html b/httemplate/elements/input-text.html index fb50a5070..827941501 100644 --- a/httemplate/elements/input-text.html +++ b/httemplate/elements/input-text.html @@ -15,7 +15,9 @@ my %opt = @_; my $value = length($opt{curr_value}) ? $opt{curr_value} : $opt{value}; my $onchange = $opt{'onchange'} - ? 'onChange="'. $opt{'onchange'}. '(this)"' + ? join(' ', map $_.'="'. $opt{'onchange'}. '(this)"', + qw( onChange onKeyDown onKeyUp onKeyPress ) + ) : ''; my $size = $opt{'size'} diff --git a/httemplate/elements/tr-select-agent.html b/httemplate/elements/tr-select-agent.html index 9f2f76a6c..6e5187532 100644 --- a/httemplate/elements/tr-select-agent.html +++ b/httemplate/elements/tr-select-agent.html @@ -24,7 +24,11 @@ Example: </%doc> % if ( scalar(@agents) == 1 ) { - <INPUT TYPE="hidden" NAME="<% $opt{'field'} || 'agentnum' %>" VALUE="<% $agents[0]->agentnum %>"> + <INPUT TYPE = "hidden" + NAME = "<% $opt{'field'} || 'agentnum' %>" + ID = "<% $opt{'field'} || 'agentnum' %>" + VALUE = "<% $agents[0]->agentnum %>" + > %# YUCK. empty row so we don't throw g_row in edit.html off :/ <TR> |