1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
<% include( 'elements/edit.html',
'name' => $classname . ' Reason Type',
'table' => 'reason_type',
'labels' => {
'typenum' => $classname . ' reason type',
'type' => $classname . ' reason type name',
'class' => '',
},
'fields' => [
'type',
{ 'field' => 'class',
'type' => 'hidden',
},
],
'viewall_url' => $p . "browse/reason_type.html?class=$class",
'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};
</%init>
|