X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fsvc_acct_pop.pm;h=de41f5bb6ecd23464cfde750f11a94658ae52e17;hp=3b8e9785a7fa13bfb7d53d01507dad1071725e48;hb=57bb423fe457ba4e13726877f53bcdf944f828f8;hpb=3eb749fd79fec377d4975f69b077b14e5aaf94dd diff --git a/FS/FS/svc_acct_pop.pm b/FS/FS/svc_acct_pop.pm index 3b8e9785a..de41f5bb6 100644 --- a/FS/FS/svc_acct_pop.pm +++ b/FS/FS/svc_acct_pop.pm @@ -93,6 +93,7 @@ sub check { or $self->ut_number('ac') or $self->ut_number('exch') or $self->ut_numbern('loc') + or $self->SUPER::check ; } @@ -107,7 +108,8 @@ Returns: sub text { my $self = shift; - $self->city. ', '. $self->state. ' ('. $self->ac. ')/'. $self->exch; + $self->city. ', '. $self->state. + ' ('. $self->ac. ')/'. $self->exch. '-'. $self->loc; } =back @@ -120,6 +122,8 @@ sub text { =cut +#horrible false laziness with signup.cgi (pull special-case for 0 & 1 +# pop code out from signup.cgi??) sub popselector { my( $popnum, $state ) = @_; @@ -129,7 +133,6 @@ sub popselector { push @{$svc_acct_pop{$_->state}}, $_ foreach @svc_acct_pop; } - my $size = 0; my $text = < function opt(what,href,text) { @@ -140,8 +143,7 @@ sub popselector { function popstate_changed(what) { state = what.options[what.selectedIndex].text; - for (var i = what.form.popnum.length;i > 0;i--) - what.form.popnum.options[i] = null; + what.form.popnum.options.length = 0 what.form.popnum.options[0] = new Option("", "", false, true); END @@ -151,7 +153,6 @@ END foreach my $pop ( @{$svc_acct_pop{$popstate}}) { my $o_popnum = $pop->popnum; my $poptext = $pop->text; - $size = length($poptext) if length($poptext) > $size; $text .= "opt(what.form.popnum, \"$o_popnum\", \"$poptext\");\n" } $text .= "}\n"; @@ -166,27 +167,33 @@ END $text .= ''; #callback? return 3 html pieces? #''; $text .= qq!'; + $text; + } =back -=head1 VERSION - -$Id: svc_acct_pop.pm,v 1.4 2001-09-27 20:41:37 ivan Exp $ - =head1 BUGS It should be renamed to part_pop. popselector? putting web ui components in here? they should probably live -somewhere else... +somewhere else... + +popselector: pull special-case for 0 & 1 pop code out from signup.cgi =head1 SEE ALSO