diff options
-rw-r--r-- | config/pikul_codes.tag | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/config/pikul_codes.tag b/config/pikul_codes.tag index 4169c0b..fb4a0e6 100644 --- a/config/pikul_codes.tag +++ b/config/pikul_codes.tag @@ -24,15 +24,12 @@ sub { $weight)}; Pikul::cleanup(); my $elements = '<select name="mv_shipmode" id="ship_widget" class="form-control" onchange="this.form.submit()">'; - my $mv_shipmode = $Tag->value('mv_shipmode'); - for my $i (0 .. $#codes) { + for my $code (@codes) { $elements .= qq( <option name="mv_shipmode" value="$table) - . qq(_$codes[$i]") - . ($mv_shipmode - ? ($mv_shipmode eq $table . "_$codes[$i]" ? ' selected' : '') - : $i ? '' : ' selected') - . ">$table $codes[$i]</option>"; + . qq(_$code") + . ($Tag->value('mv_shipmode') eq $table . "_$code" ? ' selected' : '') + . ">$table $code</option>"; } $elements .= q( </select>); |