X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fbrowse%2Freason_type.html;h=e5f42e8398cdb13a720aa3a7a455db2f4554367d;hb=02a46bc015742668a7f6d9336a190fec3141ff56;hp=a8ccbdc85058f1238e9da2443bf9d31f1e32c29d;hpb=ce98306f315a53f2ac4b8c010341c4f84bf728a8;p=freeside.git
diff --git a/httemplate/browse/reason_type.html b/httemplate/browse/reason_type.html
index a8ccbdc85..e5f42e839 100644
--- a/httemplate/browse/reason_type.html
+++ b/httemplate/browse/reason_type.html
@@ -1,68 +1,106 @@
-%
-%$cgi->param('class') =~ /^(\w)$/ or die "illegal class";
-%my $class=$1;
-%
-%my %classmap = ( 'C' => 'cancel',
-% 'S' => 'suspend',
-% );
-%
-%my $classname = $classmap{$class};
-%
-%my $html_init = ucfirst($classname) .
-% " reason types allow groups of $classname reasons for reporting purposes." .
-% qq!
Add a ! .
-% $classname . " reason type
";
-%
-%my $reasons_sub = sub {
-% my $reason_type = shift;
-%
-% [ map {
-% [
-% {
-% 'data' => $_->reason,
-% 'align' => 'left',
-% 'link' => $p. "edit/reason.html?class=$class&reasonnum=".
-% $_->reasonnum,
-% },
-% ];
-% }
-% $reason_type->enabled_reasons,
-%
-% ];
-%
-%};
-%
-%my $where_clause = "WHERE class='$class'";
-%my $count_query = 'SELECT COUNT(*) FROM reason_type ';
-%$count_query .= $where_clause;
-%
-%my $link = [ $p.'edit/reason_type.html?class='.$class.'&typenum=', 'typenum' ];
-%
-%
-<% include( 'elements/browse.html',
- 'title' => ucfirst($classname) . " Reason Types",
- 'menubar' => [ ucfirst($classname) . " reasons" =>
- $p.'browse/reason.html?class=' . $class,
- ],
- 'html_init' => $html_init,
- 'name' => $classname . " reason types",
- 'query' => { 'table' => 'reason_type',
- 'hashref' => {},
- 'extra_sql' => $where_clause .
- 'ORDER BY typenum',
- },
- 'count_query' => $count_query,
- 'header' => [ '#',
- ucfirst($classname) . ' Reason Type',
- ucfirst($classname) . ' Reasons',
- ],
- 'fields' => [ 'typenum',
- 'type',
- $reasons_sub,
- ],
- 'links' => [ $link,
- $link,
- '',
- ],
- )
-%>
+<& elements/browse.html,
+ 'title' => ucwords($classname) . " Reasons",
+ 'html_init' => $html_init,
+ 'name' => $classname . " reason types",
+ 'query' => { 'table' => 'reason_type',
+ 'hashref' => {},
+ 'extra_sql' => $where_clause .
+ 'ORDER BY typenum',
+ },
+ 'count_query' => $count_query,
+ 'header' => [ '#',
+ ucwords($classname) . ' Reason Type',
+ ucwords($classname) . ' Reasons',
+ ],
+ 'fields' => [ 'typenum',
+ 'type',
+ $reasons_sub,
+ ],
+ 'links' => [ $link,
+ $link,
+ '',
+ ],
+ 'disable_total' => 1,
+ 'html_form' => qq!