X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Freason_type.html;h=ea5650ec3a2d7513aabb0da072e17fadf5a31150;hb=5f9edcbe9fb3b3eb905614927aa6120d50c06ff1;hp=970529e350a00403f036dcbc77b6989b58be6b94;hpb=9509e5bfb7f9331303153cac24d7bfecbe2ea9f1;p=freeside.git diff --git a/httemplate/edit/reason_type.html b/httemplate/edit/reason_type.html index 970529e35..ea5650ec3 100644 --- a/httemplate/edit/reason_type.html +++ b/httemplate/edit/reason_type.html @@ -1,13 +1,3 @@ -% -%$cgi->param('class') =~ /^(\w)$/; -%my $class = $1; -% -%my %classmap = ( 'C' => 'Cancel', -% 'S' => 'Suspend', -% ); -% -%my $classname = $classmap{$class}; -% <% include( 'elements/edit.html', 'name' => $classname . ' Reason Type', 'table' => 'reason_type', @@ -26,3 +16,14 @@ 'new_hashref_callback' => sub {{ 'class' => $class }}, ) %> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +$cgi->param('class') =~ /^(\w)$/; +my $class = $1; + +my $classname = $FS::reason_type::class_name{$class}; + +