% $cgi->param('class') =~ /^(\w)$/ or die "illegal class";
% my $class=$1;
%
-% my %classmap = ('C' => 'cancel',
-% 'S' => 'suspend',
-% );
-% my $classname = $classmap{$class};
+% my $classname = $FS::reason_type::class_name{$class};
%
% my (@types) = qsearch( 'reason_type', { 'class' => $class } );
%
'fields' => [
{ 'field' => 'reason_type',
'type' => 'select',
+ #XXX use something more sane than a hashref
+ #then fix tr-select.html
'value' => { 'vcolumn' => 'typenum',
'ccolumn' => 'type',
'values' => \@types,
},
'reason',
{ 'field' => 'class',
- 'type' => 'fixedhidden',
+ 'type' => 'hidden',
'value' => $class,
},
{ 'field' => 'disabled',
'viewall_url' => $p . "browse/reason.html?class=$class",
)
%>
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+
+</%init>