RT# 81706 Remove redundant loads of jquery.js
[freeside.git] / httemplate / browse / part_pkg_taxproduct / suretax.html
index 667c07e..91f3737 100755 (executable)
   'nohtmlheader'   => 1,
   'disable_total'  => 1,
 &>
-<style>
-input { float: right}
-</style>
-<script src="<% $fsurl %>elements/jquery.js"></script>
 <script>
 var category_labels = <% encode_json(\%category_labels) %>;
 $().ready(function() {
@@ -69,20 +65,32 @@ function select_taxproduct(taxproductnum, description) {
 }
   
 </script>  
-<DIV STYLE="width: 50%">
+<BR>
 <FORM NAME="myform">
-  <label for="new_taxproduct">New tax product code</label>
-  <input type="text" size="6" name="new_taxproduct" id="new_taxproduct">
-  <br>
-  <label for="new_category_desc">Category</label>
-  <input type="text" name="new_category_desc" id="new_category_desc" disabled=1>
-  <br>
-  <label for="new_taxproduct_desc">Product</label>
-  <input type="text" name="new_taxproduct_desc" id="new_taxproduct_desc">
-  <br>
+  <FONT SIZE="+1"><B><% emt('Add tax product') %></B></FONT>
+  <% ntable('#cccccc', 2) %>
+    <& /elements/tr-input-text.html,
+      'label'     => emt('Product code'),
+      'field'     => 'new_taxproduct',
+      'id'        => 'new_taxproduct',
+      'size'      => 6,
+      'maxlength' => 6,
+    &>
+    <& /elements/tr-input-text.html,
+      'label'     => emt('Category'),
+      'field'     => 'new_category_desc',
+      'id'        => 'new_category_desc',
+      'disabled'  => 1
+    &>
+    <& /elements/tr-input-text.html,
+      'label'     => emt('Product'),
+      'field'     => 'new_taxproduct_desc',
+      'id'        => 'new_taxproduct_desc',
+    &>
+  </table>
   <input type="button" id="new_taxproduct_submit" disabled=1 value="Add">
 </FORM>
-</DIV>
+<& /elements/footer-popup.html &>
 <%shared>
 # populate dropdown
 
@@ -116,7 +124,7 @@ foreach my $row ( qsearch({
 &>
 <& /elements/hidden.html,
   field       => 'id',
-  curr_value  => $cgi->param('id'),
+  curr_value  => scalar($cgi->param('id')),
 &>
 </%def>
 <%init>
@@ -130,8 +138,7 @@ my $id = $cgi->param('id');
 my $select_onclick = sub {
   my $row = shift;
   my $taxnum = $row->taxproductnum;
-  my $code = $row->taxproduct;
-  my $desc = $row->description;
+  my $desc = $row->taxproduct . ' ' . $row->description;
   "select_taxproduct('$taxnum', '$desc')";
 };