2 % $cgi->param('class') =~ /^(\w)$/ or die "illegal class";
5 % my %classmap = ('C' => 'cancel',
8 % my $classname = $classmap{$class};
10 % my (@types) = qsearch( 'reason_type', { 'class' => $class } );
12 % unless (scalar(@types)) {
13 % print $cgi->redirect( "reason_type.html?class=$class" );
15 <% include( 'elements/edit.html',
16 'name' => ucfirst($classname) . ' Reason',
19 'reasonnum' => ucfirst($classname) . ' Reason',
20 'reason_type' => ucfirst($classname) . ' Reason type',
21 'reason' => ucfirst($classname) . ' Reason',
22 'disabled' => 'Disabled',
26 { 'field' => 'reason_type',
28 'value' => { 'vcolumn' => 'typenum',
35 'type' => 'fixedhidden',
38 { 'field' => 'disabled',
43 'viewall_url' => $p . "browse/reason.html?class=$class",