agent selection on package add/edit (1151)
authorjeff <jeff>
Mon, 8 Oct 2007 20:59:42 +0000 (20:59 +0000)
committerjeff <jeff>
Mon, 8 Oct 2007 20:59:42 +0000 (20:59 +0000)
httemplate/edit/part_pkg.cgi
httemplate/edit/process/part_pkg.cgi

index 44fe809..5d7f755 100755 (executable)
@@ -159,23 +159,27 @@ Line-item revenue recognition
 
 </TD><TD VALIGN="top">
 
-%#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>
+%if ( $cgi->param('clone') ) {
+  <INPUT TYPE="hidden" NAME="agent_type" VALUE="">
+%}else{
+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>
+%}
 </TD></TR></TABLE>
 %
 %
@@ -271,9 +275,7 @@ Line-item revenue recognition
 %#} else {
 %#  push @fixups, 'taxclass'; #hidden
 %#}
-%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_elements = ( 'classnum', 'taxclass', 'agent_type' );
 %
 %my @form_radio = ();
 %if ( dbdef->table('pkg_svc')->column('primary_svc') ) {
index 176cf64..fd7b175 100755 (executable)
@@ -71,7 +71,7 @@
 %  $pkgpart = $new->pkgpart;
 %}
 %
-%unless (1 || $error) { # after 1.7.2
+%unless ($error) {
 %  my $error = $new->process_m2m(
 %    'link_table'   => 'type_pkgs',
 %    'target_table' => 'agent_type',