32 |
33 | = Html::activeHiddenInput($model, 'currency', [
34 | 'data-attribute' => 'currency',
35 | 'value' => $model->currency ?? $primaryCurrency->code,
36 | ]) ?>
37 | = Html::tag('label', $model->getAttributeLabel('amount'), ['for' => 'deposit-amount']) ?>
38 |
39 | 1) : ?>
40 | = $form->field($model, 'amount', [
41 | 'template' => (function () use ($availableCurrencies, $primaryCurrencySymbol) {
42 | foreach ($availableCurrencies as $currency) {
43 | $currencyDropdownOptions[] =
44 | '
' .
45 | Html::a($currency->getSymbol(), 'javascript:void(0);', [
46 | 'data-value' => $currency->code,
47 | 'data-label' => $currency->getSymbol(),
48 | ]) .
49 | '';
50 | }
51 |
52 | $currencyDropdownHtml = implode("\n", $currencyDropdownOptions ?? []);
53 | return <<
55 |
56 |
60 |
63 |
64 | {input}
65 |
66 | {hint}{error}
67 | HTML
68 | ;
69 | })()
70 | ]) ?>
71 |
72 | = Yii::t('merchant', 'Choose the purse currency you want to replenish and enter the payment amount.') ?>
73 |
74 |
75 | = $form->field($model, 'amount', [
76 | 'template' => "
79 | = Yii::t('merchant', 'Enter the amount of the replenishment in {currency}. For example: 8.79', [
80 | 'currency' => $primaryCurrency->code,
81 | ]) ?>
82 |
83 |
84 |
85 | = Html::submitButton(Yii::t('merchant', 'Proceed'), ['class' => 'btn btn-primary']) ?>
86 | end() ?>
87 |