change credit reasons from freetext to new reason/reason type system (#2777)
[freeside.git] / httemplate / edit / reason_type.html
1 %
2 %$cgi->param('class') =~ /^(\w)$/;
3 %my $class = $1;
4 %
5 %my $classname = $FS::reason_type::class_name{$class};
6 %
7 <% include( 'elements/edit.html',
8                  'name'   => $classname . ' Reason Type',
9                  'table'  => 'reason_type',
10                  'labels' => { 
11                                'typenum'  => $classname . ' reason type',
12                                'type'     => $classname . ' reason type name',
13                                'class'    => '',
14                              },
15                  'fields' => [
16                                'type',
17                                { 'field' => 'class',
18                                  'type'  => 'hidden',
19                                },
20                              ],
21                  'viewall_url' => $p . "browse/reason_type.html?class=$class",
22                  'new_hashref_callback' => sub {{ 'class' => $class }},
23            )
24 %>