diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-07-20 14:34:23 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-07-20 14:34:23 +0800 |
commit | 0550cb43f08b97292639f800512df3965ee96df1 (patch) | |
tree | 9a29763b063c3ada19f41cde6c8f843e6f61fbaf /config | |
parent | b521361bfc18d0fcbe7773018f8f34e1b6900eae (diff) |
mv_shipmode seems to be always submitted
Diffstat (limited to 'config')
-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>); |