event refactor, landing on HEAD!
[freeside.git] / httemplate / elements / tr-input-text.html
diff --git a/httemplate/elements/tr-input-text.html b/httemplate/elements/tr-input-text.html
new file mode 100644 (file)
index 0000000..ac21cb5
--- /dev/null
@@ -0,0 +1,31 @@
+<% include('tr-td-label.html', @_ ) %>
+
+  <TD <% $style %>>
+
+    <% $opt{'prefix'} %><INPUT TYPE  = "<% $opt{type} || 'text' %>"
+                               NAME  = "<% $opt{field} %>"
+                               ID    = "<% $opt{id} %>"
+                               VALUE = "<% $opt{curr_value} || $opt{value} %>"
+                               <% $size %>
+                               <% $onchange %>
+                        >
+
+  </TD>
+
+</TR>
+
+<%init>
+
+my %opt = @_;
+
+my $onchange = $opt{'onchange'}
+                 ? 'onChange="'. $opt{'onchange'}. '(this)"'
+                 : '';
+
+my $size = $opt{'size'}
+             ? 'SIZE="'. $opt{'size'}. '"'
+             : '';
+
+my $style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : '';
+
+</%init>