diff options
Diffstat (limited to 'httemplate/edit/reason.html')
-rw-r--r-- | httemplate/edit/reason.html | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/httemplate/edit/reason.html b/httemplate/edit/reason.html new file mode 100644 index 0000000..620a2ea --- /dev/null +++ b/httemplate/edit/reason.html @@ -0,0 +1,50 @@ +% +% $cgi->param('class') =~ /^(\w)$/ or die "illegal class"; +% my $class=$1; +% +% my $classname = $FS::reason_type::class_name{$class}; +% +% my (@types) = qsearch( 'reason_type', { 'class' => $class } ); +% +% unless (scalar(@types)) { +% print $cgi->redirect( "reason_type.html?class=$class" ); +% } +<% include( 'elements/edit.html', + 'name' => ucfirst($classname) . ' Reason', + 'table' => 'reason', + 'labels' => { + 'reasonnum' => ucfirst($classname) . ' Reason', + 'reason_type' => ucfirst($classname) . ' Reason type', + 'reason' => ucfirst($classname) . ' Reason', + 'disabled' => 'Disabled', + 'class' => '', + }, + 'fields' => [ + { 'field' => 'reason_type', + 'type' => 'select', + #XXX use something more sane than a hashref + #then fix tr-select.html + 'value' => { 'vcolumn' => 'typenum', + 'ccolumn' => 'type', + 'values' => \@types, + }, + }, + 'reason', + { 'field' => 'class', + 'type' => 'hidden', + 'value' => $class, + }, + { 'field' => 'disabled', + 'type' => 'checkbox', + 'value' => 'Y' + }, + ], + 'viewall_url' => $p . "browse/reason.html?class=$class", + ) +%> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +</%init> |