adding new elements: percentage input, fixed country and state display, tablebreak...
authorivan <ivan>
Fri, 4 Jan 2008 02:19:50 +0000 (02:19 +0000)
committerivan <ivan>
Fri, 4 Jan 2008 02:19:50 +0000 (02:19 +0000)
httemplate/elements/tablebreak-tr-title.html [new file with mode: 0644]
httemplate/elements/tr-fixed-country.html [new file with mode: 0644]
httemplate/elements/tr-fixed-state.html [new file with mode: 0644]
httemplate/elements/tr-input-percentage.html [new file with mode: 0644]

diff --git a/httemplate/elements/tablebreak-tr-title.html b/httemplate/elements/tablebreak-tr-title.html
new file mode 100644 (file)
index 0000000..35dc05d
--- /dev/null
@@ -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 (file)
index 0000000..806d92c
--- /dev/null
@@ -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 (file)
index 0000000..eea30dd
--- /dev/null
@@ -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 (file)
index 0000000..ae553a9
--- /dev/null
@@ -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',
+          )
+%>