-<% include('/elements/header-popup.html', "Change Package") %>
+<& /elements/header-popup.html, mt("Change Package") &>
-<% include('/elements/error.html') %>
+<SCRIPT TYPE="text/javascript" SRC="../elements/order_pkg.js"></SCRIPT>
-<FORM ACTION="<% $p %>edit/process/change-cust_pkg.html" METHOD=POST>
+<& /elements/error.html &>
+
+<FORM NAME="OrderPkgForm" ACTION="<% $p %>edit/process/change-cust_pkg.html" METHOD=POST>
<INPUT TYPE="hidden" NAME="pkgnum" VALUE="<% $pkgnum %>">
<% ntable('#cccccc') %>
<TR>
- <TH ALIGN="right">Current package</TH>
+ <TH ALIGN="right"><% mt('Current package') |h %></TH>
<TD COLSPAN=7>
<% $curuser->option('show_pkgnum') ? $cust_pkg->pkgnum.': ' : '' %><B><% $part_pkg->pkg |h %></B> - <% $part_pkg->comment |h %>
</TD>
</TR>
-
- <TR>
- <TH ALIGN="right">New package</TH>
- <TD COLSPAN=7>
- <% include('/elements/select-cust-part_pkg.html',
- 'cust_main' => $cust_main,
- 'element_name' => 'pkgpart',
- #'extra_sql' => ' AND pkgpart != '. $cust_pkg->pkgpart,
- 'curr_value' => scalar($cgi->param('pkgpart')),
- )
- %>
- </TD>
- </TR>
- <% include('/elements/tr-select-cust_location.html',
+ <& /elements/tr-select-cust-part_pkg.html,
+ 'pre_label' => emt('New'),
+ 'curr_value' => scalar($cgi->param('pkgpart')),
+ 'classnum' => $part_pkg->classnum,
+ 'cust_main' => $cust_main,
+ &>
+
+ <& /elements/tr-select-cust_location.html,
'cgi' => $cgi,
'cust_main' => $cust_main,
- )
- %>
+ &>
</TABLE>
+<& /elements/standardize_locations.html,
+ 'form' => "OrderPkgForm",
+ 'callback' => 'document.OrderPkgForm.submit();',
+&>
+
<BR>
-<INPUT TYPE="submit" VALUE="Change package">
+<INPUT NAME = "submitButton"
+ TYPE = "button"
+ VALUE = "<% mt("Change package") |h %>"
+ onClick = "this.disabled=true; standardize_new_location();"
+ <% scalar($cgi->param('pkgpart')) ? '' : 'DISABLED' %>
+>
</FORM>
</BODY>