[interchange-cvs] interchange - heins modified dist/lib/UI/pages/admin/ship_edit.html

interchange-core@icdevgroup.org interchange-core@icdevgroup.org
Mon Apr 7 08:31:01 2003


User:      heins
Date:      2003-04-07 12:30:41 GMT
Modified:  dist/lib/UI/pages/admin ship_edit.html
Log:
* Fix problem where ship table would not be presented on first pass
  through a UPS Internal definition.

Revision  Changes    Path
2.3       +8 -8      interchange/dist/lib/UI/pages/admin/ship_edit.html


rev 2.3, prev_rev 2.2
Index: ship_edit.html
===================================================================
RCS file: /var/cvs/interchange/dist/lib/UI/pages/admin/ship_edit.html,v
retrieving revision 2.2
retrieving revision 2.3
diff -u -r2.2 -r2.3
--- ship_edit.html	14 Jan 2003 02:25:50 -0000	2.2
+++ ship_edit.html	7 Apr 2003 12:30:41 -0000	2.3
@@ -111,19 +111,19 @@
 	[bounce page="[either][cgi ui_bounce_url][or]__UI_BASE__/ship[/either]"]
 [/if]
 
-[if cgi ui_shipmode]
 	[perl]
 		my $inmode = $CGI->{ui_shipmode};
 		#Log("inmode=$inmode");
 		my $lines = $Config->{Shipping_line};
 		#Log("shipping: " . $Tag->uneval( { ref => $lines }) );
 		my $ref;
-		for(@$lines) {
-			next unless $_->[0] eq $inmode;
-			$ref = $_;
-			last;
+		if($inmode) {
+			for(@$lines) {
+				next unless $_->[0] eq $inmode;
+				$ref = $_;
+				last;
+			}
 		}
-		return if ! $ref;
 		$ref = [] if ! $ref;
 		my ($mode, $desc, $crit, $min, $max, $cost, $query, $opt) = @{$ref};
 		#Log("gave: " . join("|", @$ref) );
@@ -170,7 +170,7 @@
 		}
 		return;
 	[/perl]
-[/if]
+
 <form action="[area @@MV_PAGE@@]" method=POST>
 <input type=hidden NAME=ui_ship_ups VALUE="[value ui_ship_ups]">
 <input type=hidden NAME=mv_action VALUE="return">
@@ -226,7 +226,7 @@
 </td>
 <td class=rnorm>
 <select name=ui_ship_type onChange="check_for_ups(this.form,
-			this.form.ui_ship_type.options[this.form.ui_ship_type.selectedIndex].value) && this.form.submit()">
+			this.options[this.selectedIndex].value) && this.form.submit()">
 [loop lr=1 option=ui_ship_type
 		list="_subtotal	Standard shipping by price
 weight	Standard shipping by weight