summaryrefslogtreecommitdiff
path: root/httemplate/edit/reason.html
diff options
context:
space:
mode:
authorjeff <jeff>2006-10-19 14:29:27 +0000
committerjeff <jeff>2006-10-19 14:29:27 +0000
commitce98306f315a53f2ac4b8c010341c4f84bf728a8 (patch)
tree284731e6ad5daf4580b3afdfa3812a864e136b89 /httemplate/edit/reason.html
parentcdffa6e5fe5c8cf0755a3f3497ae71170bbe4cea (diff)
suspension and cancellation reasons
Diffstat (limited to 'httemplate/edit/reason.html')
-rw-r--r--httemplate/edit/reason.html42
1 files changed, 42 insertions, 0 deletions
diff --git a/httemplate/edit/reason.html b/httemplate/edit/reason.html
new file mode 100644
index 000000000..2f5932846
--- /dev/null
+++ b/httemplate/edit/reason.html
@@ -0,0 +1,42 @@
+%
+% $cgi->param('class') =~ /^(\w)$/ or die "illegal class";
+% my $class=$1;
+%
+% my %classmap = ('C' => 'cancel',
+% 'S' => 'suspend',
+% );
+% my $classname = $classmap{$class};
+%
+% my (@types) = qsearch( 'reason_type', { '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',
+ 'value' => { 'vcolumn' => 'typenum',
+ 'ccolumn' => 'type',
+ 'values' => \@types,
+ },
+ },
+ 'reason',
+ { 'field' => 'class',
+ 'type' => 'fixedhidden',
+ 'value' => $class,
+ },
+ { 'field' => 'disabled',
+ 'type' => 'checkbox',
+ 'value' => 'Y'
+ },
+ ],
+ 'viewall_url' => $p . "browse/reason.html?class=$class",
+ )
+%>