From: Ivan Kohler Date: Sat, 12 Mar 2016 02:56:59 +0000 (-0800) Subject: move misc/cust_pkg_usageprice.html to elements/table-cust_pkg_usageprice.html, RT... X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=943f3ff4145a0ce2ef946aba3f0ba4aa495f224e;p=freeside.git move misc/cust_pkg_usageprice.html to elements/table-cust_pkg_usageprice.html, RT#33410 --- diff --git a/httemplate/elements/table-cust_pkg_usageprice.html b/httemplate/elements/table-cust_pkg_usageprice.html new file mode 100644 index 000000000..b023e81d1 --- /dev/null +++ b/httemplate/elements/table-cust_pkg_usageprice.html @@ -0,0 +1,125 @@ +<%doc> +Sets up the xmlhttp, javascript and initial (empty) table for selecting cust_pkg_usageprice. +Available values are based on pkgpart, and can be updated when changing pkgpart +by passing the new pkgpart to the following javascript: + + usageprice_pkg_changed( pkgpart, pkgnum ) + +The pkgnum input is optional, and will be used to set initial selected values. + +If pkgpart is passed as an option to this element, will run usageprice_pkg_changed +once to initialize table; pkgnum can be passed as an option along with this. + +You can disable usageprice selection temporarily (remove the fields from the form) +with the javascript usageprice_disable(1), and restore it with usageprice_disable(0,pkgnum). +While disabled, calling usageprice_pkg_changed will have no effect. + + +<& /elements/xmlhttp.html, + 'url' => $p.'misc/xmlhttp-part_pkg_usageprice.html', + 'subs' => [ 'get_part_pkg_usageprice' ], +&> + + + + +
+ + + + +<%init> +my %opt = @_; + + + diff --git a/httemplate/misc/change_pkg.cgi b/httemplate/misc/change_pkg.cgi index b562d24cd..e3ef4b7a8 100755 --- a/httemplate/misc/change_pkg.cgi +++ b/httemplate/misc/change_pkg.cgi @@ -39,11 +39,10 @@
-<% include('/misc/cust_pkg_usageprice.html', +<& /elements/table-cust_pkg_usageprice.html, 'pkgpart' => (scalar($cgi->param('pkgpart')) || $cust_pkg->pkgpart), 'pkgnum' => ($cust_pkg->change_to_pkgnum || $pkgnum), - ) %> -
+&> <% mt('Change') |h %> <% ntable('#cccccc') %> diff --git a/httemplate/misc/cust_pkg_usageprice.html b/httemplate/misc/cust_pkg_usageprice.html deleted file mode 100644 index f2e0f57e6..000000000 --- a/httemplate/misc/cust_pkg_usageprice.html +++ /dev/null @@ -1,121 +0,0 @@ -<%doc> -Sets up the xmlhttp, javascript and initial (empty) table for selecting cust_pkg_usageprice. -Available values are based on pkgpart, and can be updated when changing pkgpart -by passing the new pkgpart to the following javascript: - - usageprice_pkg_changed( pkgpart, pkgnum ) - -The pkgnum input is optional, and will be used to set initial selected values. - -If pkgpart is passed as an option to this element, will run usageprice_pkg_changed -once to initialize table; pkgnum can be passed as an option along with this. - -You can disable usageprice selection temporarily (remove the fields from the form) -with the javascript usageprice_disable(1), and restore it with usageprice_disable(0,pkgnum). -While disabled, calling usageprice_pkg_changed will have no effect. - - -<& /elements/xmlhttp.html, - 'url' => $p.'misc/xmlhttp-part_pkg_usageprice.html', - 'subs' => [ 'get_part_pkg_usageprice' ], -&> - - - - -
- - - -<%init> -my %opt = @_; - - - diff --git a/httemplate/misc/order_pkg.html b/httemplate/misc/order_pkg.html index f3a573c56..a08cb4bf1 100644 --- a/httemplate/misc/order_pkg.html +++ b/httemplate/misc/order_pkg.html @@ -136,12 +136,10 @@
-<& /misc/cust_pkg_usageprice.html, +<& /elements/table-cust_pkg_usageprice.html, 'pkgpart' => $pkgpart &> -
- % my $discount_cust_pkg = $curuser->access_right('Discount customer package'); % my $waive_setup_fee = $curuser->access_right('Waive setup fee'); %