X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fpart_svc.cgi;h=c03de5cce0d2426ef697ba06dba6f736599b4f02;hb=8585b98f48712b459ac15619b452c682cfcceac1;hp=97e2d9694c592271d6b77642f86c650a7d01eda3;hpb=b5c4237a34aef94976bc343c8d9e138664fc3984;p=freeside.git
diff --git a/httemplate/edit/part_svc.cgi b/httemplate/edit/part_svc.cgi
index 97e2d9694..c03de5cce 100755
--- a/httemplate/edit/part_svc.cgi
+++ b/httemplate/edit/part_svc.cgi
@@ -9,8 +9,26 @@
Service Part #<% $part_svc->svcpart ? $part_svc->svcpart : "(NEW)" %>
Service
+
+Self-service access:
+
+
{disabled} eq 'Y' ? ' CHECKED' : '' %>> Disable new orders
+
{'preserve'} eq 'Y' ? ' CHECKED' : '' %>> Preserve this service on package cancellation
+
+
@@ -80,6 +98,7 @@ Service
% #'form_action' => 'process/part_svc.cgi',
% 'form_action' => 'part_svc.cgi', #self
% 'form_text' => [ qw( svc svcpart ) ],
+% 'form_select' => [ 'selfservice_access' ],
% 'form_checkbox' => [ 'disabled', 'preserve' ],
% 'layer_callback' => sub {
% my $layer = shift;
@@ -139,7 +158,11 @@ Service
% )
% } fields($layer);
% }
-% push @fields, 'usergroup' if $layer eq 'svc_acct'; #kludge
+% push @fields, 'usergroup'
+% if $layer eq 'svc_acct'
+% or ( $layer eq 'svc_broadband' and
+% $conf->exists('svc_broadband-radius') ); # double kludge
+% # (but we do want to check the config, right?)
% $part_svc->svcpart($clone) if $clone; #haha, undone below
%
%
@@ -314,32 +337,17 @@ Service
% qq!';
%
-% } elsif ( $def->{type} eq 'select-svc_pbx.html' ) {
-%
-% $html .= include('/elements/select-svc_pbx.html',
-% 'curr_value' => $value,
-% 'element_name' => "${layer}__${field}",
-% 'element_etc' => $disabled,
-% 'multiple' => ($flag eq 'S'),
-% );
-%
-% } elsif ( $def->{type} eq 'select-lnp_status.html' ) {
+% } elsif ( $def->{type} =~ /select-(.*?).html/ ) {
%
-% $html .= include('/elements/select-lnp_status.html',
+% $html .= include("/elements/".$def->{type},
% 'curr_value' => $value,
% 'element_name' => "${layer}__${field}",
% 'element_etc' => $disabled,
-% 'multiple' => ($flag eq 'S'),
+% 'multiple' => ($def->{multiple} ||
+% $flag eq 'S'),
+% # allow the table def to force 'multiple'
% );
%
-% } elsif ( $def->{type} eq 'radius_usergroup_selector' ) {
-%
-% #XXX disable the RADIUS usergroup selector? ugh it sure does need
-% #an overhaul, people have dum group problems because of it
-%
-% $html .= FS::svc_acct::radius_usergroup_selector(
-% [ split(',', $value) ], "${layer}__${field}" );
-%
% } elsif ( $def->{type} eq 'communigate_pro-accessmodes' ) {
%
% $html .= include('/elements/communigate_pro-accessmodes.html',
@@ -387,7 +395,8 @@ Service
%
% $html .= include('/elements/progress-init.html',
% $layer, #form name
-% [ qw(svc svcpart disabled preserve exportnum),
+% [ qw(svc svcpart selfservice_access disabled preserve
+% exportnum),
% @fields ],
% 'process/part_svc.cgi',
% $p.'browse/part_svc.cgi',
@@ -417,6 +426,7 @@ Table <% $widget->html %>
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+my $conf = FS::Conf->new;
my $part_svc;
my $clone = '';
if ( $cgi->param('clone') && $cgi->param('clone') =~ /^(\d+)$/ ) {#clone