2 % $cgi->param('class') =~ /^(\w)$/ or die "illegal class";
5 % my $classname = $FS::reason_type::class_name{$class};
7 % my (@types) = qsearch( 'reason_type', { 'class' => $class } );
9 % unless (scalar(@types)) {
10 % print $cgi->redirect( "reason_type.html?class=$class" );
12 <% include( 'elements/edit.html',
13 'name' => ucfirst($classname) . ' Reason',
16 'reasonnum' => ucfirst($classname) . ' Reason',
17 'reason_type' => ucfirst($classname) . ' Reason type',
18 'reason' => ucfirst($classname) . ' Reason',
19 'disabled' => 'Disabled',
23 { 'field' => 'reason_type',
25 #XXX use something more sane than a hashref
26 #then fix tr-select.html
27 'value' => { 'vcolumn' => 'typenum',
37 { 'field' => 'disabled',
42 'viewall_url' => $p . "browse/reason.html?class=$class",
48 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');