event refactor, landing on HEAD!
[freeside.git] / httemplate / edit / reason.html
index 2f59328..c652a08 100644 (file)
@@ -9,6 +9,9 @@
 %
 % 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',
@@ -22,6 +25,8 @@
                 '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,
@@ -29,7 +34,7 @@
                               },
                               'reason',
                               { 'field' => 'class',
-                                'type'  => 'fixedhidden',
+                                'type'  => 'hidden',
                                 'value' => $class,
                               },
                               { 'field' => 'disabled',