switcher always visible, but postpaid option only if in postpaid customer group. Removed inline style

This commit is contained in:
Mihael
2025-06-02 17:05:24 +02:00
parent 3bc20eafd7
commit d043ef29a2
2 changed files with 14 additions and 16 deletions

View File

@@ -1,14 +1,7 @@
{if $show_switch}
<style>
.payments-selection {
justify-content: flex-end;
margin: 10px 0;
}
</style>
<div class="payment-switcher">
<div class="payment-switcher">
<div class="payments-selection">
{* The select dropdown *}
<select id="b2b-group-select" name="b2b_group_type" class="custom-select" onchange="switchB2Bpayment();">
@@ -17,14 +10,16 @@
{l s='Prepaid' d='Modules.B2bpayments.ShopBreadcrumb'}
</option>
{* Option for Postpaid *}
<option value="postpaid" {if $current_group_is_postpaid}selected{/if}>
{l s='Postpaid' d='Modules.B2bpayments.ShopBreadcrumb'}
</option>
{* Option for Postpaid
* show only if customer is in group "B2B Odgoda placanja" *}
{if in_array(5, $customer_groups)}
<option value="postpaid" {if $current_group_is_postpaid}selected{/if}>
{l s='Postpaid' d='Modules.B2bpayments.ShopBreadcrumb'}
</option>
{/if}
</select>
</div>
</div>
</div>