X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Freason_type.html;h=ea5650ec3a2d7513aabb0da072e17fadf5a31150;hb=84c8202ee1d4d74a6ed55ac31c3f0de8cb572e04;hp=970529e350a00403f036dcbc77b6989b58be6b94;hpb=ce98306f315a53f2ac4b8c010341c4f84bf728a8;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}; + +