add progressbar to service definition add - duplicate checking can take a while,...
[freeside.git] / httemplate / edit / part_pkg.cgi
index dc29924..1790cdf 100755 (executable)
@@ -93,7 +93,12 @@ Package information
       <INPUT TYPE="text" NAME="comment" SIZE=32 VALUE="<%=$part_pkg->comment%>">
     </TD>
   </TR>
-
+  <TR>
+    <TD ALIGN="right">Promotional code</TD>
+    <TD>
+      <INPUT TYPE="text" NAME="promo_code" SIZE=32 VALUE="<%=$part_pkg->promo_code%>">
+    </TD>
+  </TR>
   <TR>
     <TD ALIGN="right">Disable new orders</TD>
     <TD>
@@ -257,7 +262,9 @@ my $widget = new HTML::Widgets::SelectLayers(
   'options'        => \%options,
   'form_name'      => 'dummy',
   'form_action'    => 'process/part_pkg.cgi',
-  'form_text'      => [ qw(pkg comment clone pkgnum pkgpart), @fixups ],
+  'form_text'      => [ qw(pkg comment promo_code clone pkgnum pkgpart),
+                        @fixups
+                      ],
   'form_checkbox'  => [ qw(setuptax recurtax disabled) ],
   'form_radio'     => \@form_radio,
   'form_select'    => \@form_select,
@@ -295,6 +302,12 @@ my $widget = new HTML::Widgets::SelectLayers(
                      ? $plandata{$field}
                      : $href->{$field}{'default'} ).
                  qq!" onChange="fchanged(this)">!;
+      } elsif ( $href->{$field}{'type'} eq 'checkbox' ) {
+        $html .= qq!<INPUT TYPE="checkbox" NAME="$field" VALUE=1 !.
+                 ( exists($plandata{$field}) && $plandata{$field}
+                   ? ' CHECKED'
+                   : ''
+                 ). '>';
       } elsif ( $href->{$field}{'type'} =~ /^select/ ) {
         $html .= '<SELECT';
         $html .= ' MULTIPLE'