-<TR>
- <TD ALIGN="right">
- <P>No reason types. Go add some. </P>
- </TD>
-</TR>
-% }elsif (scalar(@types) == 1) {
-<TR>
- <TD ALIGN="right">
- <P id="new<% $name %>TLabel" style="display:<% $display %>">Reason Type</P>
- </TD>
- <TD>
- <P id="new<% $name %>T" disabled="<% $disabled %>" style="display:<% $display %>"><% $types[0]->type %>
- <INPUT type="hidden" name="new<% $name %>T" value="<% $types[0]->typenum %>">
- </TD>
-</TR>
-
-% }else{
-
-<TR>
- <TD ALIGN="right">
- <P id="new<% $id %>TLabel" style="display:<% $display %>">Reason Type</P>
- </TD>
- <TD>
- <SELECT id="new<% $id %>T" name="new<% $name %>T" "<% $disabled %>" style="display:<% $display %>">
-% for my $type (@types) {
- <OPTION VALUE="<% $type->typenum %>" <% ($init_type == $type->typenum) ? 'SELECTED' : '' %>><% $type->type %></OPTION>
-% }
- </SELECT>
- </TD>
-</TR>
+ <TR>
+ <TD ALIGN="right">
+ <P><% mt('No reason types. Please add some.') |h %></P>
+ </TD>
+ </TR>
+% } elsif (scalar(@types) == 1) {
+ <& tr-fixed.html,
+ label => 'Reason type',
+ field => $id.'_new_reason_type',
+ curr_value => $types[0]->typenum,
+ formatted_value => $types[0]->type,
+ &>
+% } else { # more than one type, the normal case
+ <& tr-select-table.html,
+ label => 'Reason type',
+ field => $id.'_new_reason_type',
+ table => 'reason_type',
+ name_col => 'type',
+ hashref => { 'class' => $class },
+ disable_empty => 1,
+ &>
+% } # scalar(@types)
+
+% if ( $class eq 'S' ) {
+ <& tr-checkbox.html,
+ label => 'Credit the unused portion of service when suspending',
+ field => $id.'_new_unused_credit',
+ value => 'Y'
+ &>
+ <& tr-select-part_pkg.html,
+ label => 'Charge this fee when unsuspending',
+ field => $id.'_new_unsuspend_pkgpart',
+ hashref => { disabled => '', freq => '0' },
+ empty_label => 'none',
+ &>
+ <& tr-checkbox.html,
+ label => 'Hold unsuspension fee until the next bill',
+ field => $id.'_new_unsuspend_hold',
+ value => 'Y',
+ &>