From 3fc09b0e69ba395c452b636696c3576c9a762af6 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 4 Jan 2008 02:19:50 +0000 Subject: [PATCH] adding new elements: percentage input, fixed country and state display, tablebreak+title --- httemplate/elements/tablebreak-tr-title.html | 5 +++++ httemplate/elements/tr-fixed-country.html | 10 ++++++++++ httemplate/elements/tr-fixed-state.html | 10 ++++++++++ httemplate/elements/tr-input-percentage.html | 8 ++++++++ 4 files changed, 33 insertions(+) create mode 100644 httemplate/elements/tablebreak-tr-title.html create mode 100644 httemplate/elements/tr-fixed-country.html create mode 100644 httemplate/elements/tr-fixed-state.html create mode 100644 httemplate/elements/tr-input-percentage.html diff --git a/httemplate/elements/tablebreak-tr-title.html b/httemplate/elements/tablebreak-tr-title.html new file mode 100644 index 000000000..35dc05d8b --- /dev/null +++ b/httemplate/elements/tablebreak-tr-title.html @@ -0,0 +1,5 @@ + + + + +<% include('tr-title.html', @_ ) %> diff --git a/httemplate/elements/tr-fixed-country.html b/httemplate/elements/tr-fixed-country.html new file mode 100644 index 000000000..806d92cd6 --- /dev/null +++ b/httemplate/elements/tr-fixed-country.html @@ -0,0 +1,10 @@ +<% include('tr-fixed.html', %opt ) %> +<%init> + +my %opt = @_; + +my $value = $opt{'curr_value'} || $opt{'value'}; + +$opt{'formatted_value'} = code2country($value). " ($value)"; + + diff --git a/httemplate/elements/tr-fixed-state.html b/httemplate/elements/tr-fixed-state.html new file mode 100644 index 000000000..eea30ddc5 --- /dev/null +++ b/httemplate/elements/tr-fixed-state.html @@ -0,0 +1,10 @@ +<% include('tr-fixed.html', %opt ) %> +<%init> + +my %opt = @_; + +my $value = $opt{'curr_value'} || $opt{'value'}; + +$opt{'formatted_value'} = state_label($value, $opt{'object'}->country); + + diff --git a/httemplate/elements/tr-input-percentage.html b/httemplate/elements/tr-input-percentage.html new file mode 100644 index 000000000..ae553a93c --- /dev/null +++ b/httemplate/elements/tr-input-percentage.html @@ -0,0 +1,8 @@ +<% include('tr-input-text.html', @_, + 'type' => 'text', + 'postfix' => '%', + 'size' => 5, #6? check in IE (not a big deal) + 'maxlength' => 7, + 'text-align' => 'right', + ) +%> -- 2.11.0