summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2008-01-04 02:19:50 +0000
committerivan <ivan>2008-01-04 02:19:50 +0000
commit3fc09b0e69ba395c452b636696c3576c9a762af6 (patch)
tree9d88d4bfbcd7423e260415cbe1bfcd07175f65ba
parentb0003b80600bb73625465e8e80bd654a863a43ad (diff)
adding new elements: percentage input, fixed country and state display, tablebreak+title
-rw-r--r--httemplate/elements/tablebreak-tr-title.html5
-rw-r--r--httemplate/elements/tr-fixed-country.html10
-rw-r--r--httemplate/elements/tr-fixed-state.html10
-rw-r--r--httemplate/elements/tr-input-percentage.html8
4 files changed, 33 insertions, 0 deletions
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 @@
+</TABLE>
+
+<TABLE BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0>
+
+<% 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)";
+
+</%init>
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);
+
+</%init>
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',
+ )
+%>