hold off until 1.7.2
authorjeff <jeff>
Thu, 8 Feb 2007 09:13:21 +0000 (09:13 +0000)
committerjeff <jeff>
Thu, 8 Feb 2007 09:13:21 +0000 (09:13 +0000)
htetc/handler.pl
httemplate/edit/part_pkg.cgi
httemplate/edit/process/part_pkg.cgi

index 164da37..c1ca954 100644 (file)
@@ -119,7 +119,8 @@ sub handler
       use Chart::LinesPoints;
       use Chart::Mountain;
       use Color::Scheme;
       use Chart::LinesPoints;
       use Chart::Mountain;
       use Color::Scheme;
-      use HTML::Widgets::SelectLayers 0.07;
+      use HTML::Widgets::SelectLayers 0.06;
+      #use HTML::Widgets::SelectLayers 0.07; # after 1.7.2
       use Locale::Country;
       use FS;
       use FS::UID qw(cgisuidsetup dbh getotaker datasrc driver_name);
       use Locale::Country;
       use FS;
       use FS::UID qw(cgisuidsetup dbh getotaker datasrc driver_name);
index a84fafa..83ca2ca 100755 (executable)
@@ -159,23 +159,23 @@ Line-item revenue recognition
 
 </TD><TD VALIGN="top">
 
 
 </TD><TD VALIGN="top">
 
-Reseller information
-<% ntable("#cccccc", 2) %>
-  <TR>
-    <TD ALIGN="right"><% 'Agent Types' %></TD>
-    <TD>
-      <% include( '/elements/select-table.html',
-                  'element_name' => 'agent_type',
-                  'table'        => 'agent_type',
-                 'name_col'     => 'atype',
-                 'value'        => \@agent_type,
-                 'empty_label'  => '(none)',
-                 'element_etc'  => 'multiple size="10"',
-                )
-      %>
-    </TD>
-  </TR>
-</TABLE>
+%#Reseller information      # after 1.7.2
+%#<% ntable("#cccccc", 2) %>
+%#  <TR>
+%#    <TD ALIGN="right"><% 'Agent Types' %></TD>
+%#    <TD>
+%#      <% include( '/elements/select-table.html',
+%#                  'element_name' => 'agent_type',
+%#                  'table'        => 'agent_type',
+%#               'name_col'     => 'atype',
+%#               'value'        => \@agent_type,
+%#               'empty_label'  => '(none)',
+%#               'element_etc'  => 'multiple size="10"',
+%#                )
+%#      %>
+%#    </TD>
+%#  </TR>
+%#</TABLE>
 </TD></TR></TABLE>
 %
 %
 </TD></TR></TABLE>
 %
 %
@@ -271,7 +271,9 @@ Reseller information
 %#} else {
 %#  push @fixups, 'taxclass'; #hidden
 %#}
 %#} else {
 %#  push @fixups, 'taxclass'; #hidden
 %#}
-%my @form_elements = ( 'classnum', 'taxclass', 'agent_type' );
+%my @form_elements = ( 'classnum', 'taxclass' );
+%# copying non-existant elements is probably harmless, but after 1.7.2
+%#my @form_elements = ( 'classnum', 'taxclass', 'agent_type' );
 %
 %my @form_radio = ();
 %if ( dbdef->table('pkg_svc')->column('primary_svc') ) {
 %
 %my @form_radio = ();
 %if ( dbdef->table('pkg_svc')->column('primary_svc') ) {
@@ -328,7 +330,7 @@ Reseller information
 %                 ( exists($plandata{$field})
 %                     ? $plandata{$field}
 %                     : $href->{$field}{'default'} ).
 %                 ( exists($plandata{$field})
 %                     ? $plandata{$field}
 %                     : $href->{$field}{'default'} ).
-%                 qq!">!;
+%                 qq!" onChange="fchanged(this)">!;  #after 1.7.2
 %      } elsif ( $href->{$field}{'type'} eq 'checkbox' ) {
 %        $html .= qq!<INPUT TYPE="checkbox" NAME="$field" VALUE=1 !.
 %                 ( exists($plandata{$field}) && $plandata{$field}
 %      } elsif ( $href->{$field}{'type'} eq 'checkbox' ) {
 %        $html .= qq!<INPUT TYPE="checkbox" NAME="$field" VALUE=1 !.
 %                 ( exists($plandata{$field}) && $plandata{$field}
@@ -339,7 +341,7 @@ Reseller information
 %        $html .= '<SELECT';
 %        $html .= ' MULTIPLE'
 %          if $href->{$field}{'type'} eq 'select_multiple';
 %        $html .= '<SELECT';
 %        $html .= ' MULTIPLE'
 %          if $href->{$field}{'type'} eq 'select_multiple';
-%        $html .= qq! NAME="$field">!;
+%        $html .= qq! NAME="$field" onChange="fchanged(this)">!; # after 1.7.2
 %
 %        if ( $href->{$field}{'select_table'} ) {
 %          foreach my $record (
 %
 %        if ( $href->{$field}{'select_table'} ) {
 %          foreach my $record (
@@ -362,7 +364,7 @@ Reseller information
 %                         ? ' SELECTED'
 %                         : ''
 %                     ).
 %                         ? ' SELECTED'
 %                         : ''
 %                     ).
-%                     '>'. $value;
+%                     '">'. $value;
 %          }
 %
 %        } else {
 %          }
 %
 %        } else {
@@ -383,7 +385,7 @@ Reseller information
 %             
 %    $html .= '<INPUT TYPE="submit" VALUE="'.
 %             ( $hashref->{pkgpart} ? "Apply changes" : "Add package" ).
 %             
 %    $html .= '<INPUT TYPE="submit" VALUE="'.
 %             ( $hashref->{pkgpart} ? "Apply changes" : "Add package" ).
-%             '">';
+%             '" onClick="fchanged(this)">'; #after 1.7.2
 %
 %    $html;
 %
 %
 %    $html;
 %
index 1158222..55e7e05 100755 (executable)
@@ -55,7 +55,7 @@
 %  $pkgpart = $new->pkgpart;
 %}
 %
 %  $pkgpart = $new->pkgpart;
 %}
 %
-%unless ($error) {
+%unless (1 || $error) { # after 1.7.2
 %  my $error = $new->process_m2m(
 %    'link_table'   => 'type_pkgs',
 %    'target_table' => 'agent_type',
 %  my $error = $new->process_m2m(
 %    'link_table'   => 'type_pkgs',
 %    'target_table' => 'agent_type',