From 0e8861ca6b3b04b99ea9477e8c1555561b21c929 Mon Sep 17 00:00:00 2001 From: khoff Date: Sat, 8 Jun 2002 07:48:37 +0000 Subject: Default svcpart support for part_pkg. Fixes 'bug' with new customer and online signup. --- httemplate/browse/part_pkg.cgi | 4 +++- httemplate/docs/schema.html | 1 + httemplate/edit/part_pkg.cgi | 17 +++++++++++++++-- 3 files changed, 19 insertions(+), 3 deletions(-) (limited to 'httemplate') diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index c20811491..fd269bef1 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -81,7 +81,8 @@ END my($svcpart)=$pkg_svc->getfield('svcpart'); my($part_svc) = qsearchs('part_svc',{'svcpart'=> $svcpart }); print $n,qq!!, - $part_svc->getfield('svc'),"", + $part_svc->getfield('svc'),"", + (($hashref->{def_svcpart} == $svcpart) ? "*" : ""), $pkg_svc->getfield('quantity'),"\n"; $n=""; } @@ -93,6 +94,7 @@ $colspan = $cgi->param('showdisabled') ? 8 : 9; print <Add a new package definition +  * - Default service END diff --git a/httemplate/docs/schema.html b/httemplate/docs/schema.html index 2b8b3a132..e2a0f475a 100644 --- a/httemplate/docs/schema.html +++ b/httemplate/docs/schema.html @@ -238,6 +238,7 @@
  • plan - price plan
  • plandata - additional price plan data
  • disabled - Disabled flag, empty or `Y' +
  • def_svcpart - Default svcpart to use when ordering this part_pkg
  • part_referral - Referral listing
      diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index e03017db4..770facb7e 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -112,7 +112,10 @@ print '>'; print ''; my $thead = "\n\n". ntable('#cccccc', 2). <Quan.Service + +Quan. +Service + END #unless ( $cgi->param('clone') ) { @@ -169,6 +172,16 @@ unless ( 0 ) { #print ""; } +print qq!Default service
      \n!; + + foreach my $f ( qw( clone pkgnum ) ) { print qq!'; } @@ -376,7 +389,7 @@ my $widget = new HTML::Widgets::SelectLayers( 'form_action' => 'process/part_pkg.cgi', 'form_text' => [ qw(pkg comment freq clone pkgnum pkgpart), @fixups ], 'form_checkbox' => [ qw(setuptax recurtax disabled) ], - 'form_select' => [ @form_select ], + 'form_select' => [ qw(def_svcpart), @form_select ], 'fixup_callback' => sub { #my $ = @_; my $html = ''; -- cgit v1.2.1