X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_svc.pm;h=a1168199caf9fbdf633f5908ba9ca6efcd245d7e;hb=1ea67bf5e8a9e99967a267129c0e4227682cefba;hp=6ca48894a491b446b491afa16d6d372aec21b36f;hpb=2920cfc494c2811ca7879d6ecaa353d216c9f69d;p=freeside.git diff --git a/FS/FS/part_svc.pm b/FS/FS/part_svc.pm index 6ca48894a..a1168199c 100644 --- a/FS/FS/part_svc.pm +++ b/FS/FS/part_svc.pm @@ -65,6 +65,10 @@ empty for full access, "readonly" for read-only, "hidden" to hide it entirely right to change the password field, rather than just "Edit password". Only relevant to svc_acct for now. +=item has_router - Allow the service to have an L connected +through it. Probably only relevant to svc_broadband, svc_acct, and svc_dsl +for now. + =back =head1 METHODS @@ -394,11 +398,12 @@ sub check { $self->ut_numbern('svcpart') || $self->ut_text('svc') || $self->ut_alpha('svcdb') - || $self->ut_enum('disabled', [ '', 'Y' ] ) - || $self->ut_enum('preserve', [ '', 'Y' ] ) + || $self->ut_flag('disabled') + || $self->ut_flag('preserve') || $self->ut_enum('selfservice_access', [ '', 'hidden', 'readonly' ] ) || $self->ut_foreign_keyn('classnum', 'part_svc_class', 'classnum' ) - || $self->ut_enum('restrict_edit_password', [ '', 'Y' ] ) + || $self->ut_flag('restrict_edit_password') + || $self->ut_flag('has_router') ; return $error if $error; @@ -757,11 +762,9 @@ sub process { if ( $flag =~ /^[MAH]$/ ) { $param->{ $f } = delete( $param->{ $f.'_classnum' } ); } - if ( $flag =~ /^S$/ - or $_ eq 'usergroup' ) { - $param->{ $f } = ref($param->{ $f }) - ? join(',', @{$param->{ $f }} ) - : $param->{ $f }; + if ( ( $flag =~ /^[MAHS]$/ or $_ eq 'usergroup' ) + and ref($param->{ $f }) ) { + $param->{ $f } = join(',', @{ $param->{ $f } }); } ( $f, $f.'_flag', $f.'_label' ); }