diff options
author | khoff <khoff> | 2002-06-08 07:48:37 +0000 |
---|---|---|
committer | khoff <khoff> | 2002-06-08 07:48:37 +0000 |
commit | 0e8861ca6b3b04b99ea9477e8c1555561b21c929 (patch) | |
tree | 7417f21cb08027ee883fbf5cb10d1a64755c9645 /httemplate | |
parent | 0ada85923cfb057caf1d0e66b73a08b2700703bd (diff) |
Default svcpart support for part_pkg. Fixes 'bug' with new customer and online signup.
Diffstat (limited to 'httemplate')
-rwxr-xr-x | httemplate/browse/part_pkg.cgi | 4 | ||||
-rw-r--r-- | httemplate/docs/schema.html | 1 | ||||
-rwxr-xr-x | httemplate/edit/part_pkg.cgi | 17 |
3 files changed, 19 insertions, 3 deletions
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!<TD><A HREF="${p}edit/part_svc.cgi?$svcpart">!, - $part_svc->getfield('svc'),"</A></TD><TD>", + $part_svc->getfield('svc'),"</A>", + (($hashref->{def_svcpart} == $svcpart) ? "*</TD><TD>" : "</TD><TD>"), $pkg_svc->getfield('quantity'),"</TD></TR>\n"; $n="<TR>"; } @@ -93,6 +94,7 @@ $colspan = $cgi->param('showdisabled') ? 8 : 9; print <<END; <TR><TD COLSPAN=$colspan><I><A HREF="${p}edit/part_pkg.cgi">Add a new package definition</A></I></TD></TR> </TABLE> +  * - Default service </BODY> </HTML> 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 @@ <li>plan - price plan <li>plandata - additional price plan data <li>disabled - Disabled flag, empty or `Y' + <li>def_svcpart - Default svcpart to use when ordering this part_pkg </ul> <li><a name="part_referral" href="man/FS/part_referral.html">part_referral</a> - Referral listing <ul> 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 '</TD></TR></TABLE>'; my $thead = "\n\n". ntable('#cccccc', 2). <<END; -<TR><TH BGCOLOR="#dcdcdc"><FONT SIZE=-1>Quan.</FONT></TH><TH BGCOLOR="#dcdcdc">Service</TH></TR> +<TR> +<TH BGCOLOR="#dcdcdc"><FONT SIZE=-1>Quan.</FONT></TH> +<TH BGCOLOR="#dcdcdc"><FONT SIZE=-1>Service</FONT></TH> +</TR> END #unless ( $cgi->param('clone') ) { @@ -169,6 +172,16 @@ unless ( 0 ) { #print "</TR></TABLE>"; } +print qq!Default service <SELECT NAME="def_svcpart" onChange="fchanged(this)">!, + qq!<OPTION VALUE="0">None!; +foreach my $part_svc ( @part_svc ) { + print qq!<OPTION VALUE="!, $part_svc->svcpart, '"', + (($hashref->{def_svcpart} == $part_svc->svcpart) ? " SELECTED>" : ">"), + $part_svc->svc, qq!</OPTION>!; +} +print qq!</SELECT><BR>\n!; + + foreach my $f ( qw( clone pkgnum ) ) { print qq!<INPUT TYPE="hidden" NAME="$f" VALUE="!. $cgi->param($f). '">'; } @@ -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 = ''; |