2022-01-29 14:15:34 +01:00
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal"><span>×</span><span class="sr-only">{{ 'close'|_ }}</span>
|
|
|
|
</button>
|
|
|
|
<h4 class="modal-title">{{ trans('firefly.add_money_to_piggy_title', {name: piggyBank.name}) }}</h4>
|
|
|
|
</div>
|
2024-12-14 17:32:03 +01:00
|
|
|
{% if total > 0 %}
|
2022-01-29 14:15:34 +01:00
|
|
|
<form style="display: inline;" id="add" action="{{ route('piggy-banks.add', piggyBank.id) }}" method="POST">
|
|
|
|
<div class="modal-body">
|
|
|
|
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
|
2024-12-14 17:32:03 +01:00
|
|
|
{% for account in accounts %}
|
|
|
|
<strong>{{ account.account.name }} ({{ 'max_amount_add'|_ }}: {{ formatAmountByCurrency(piggyBank.transactionCurrency, account.max_amount) }})</strong>
|
2022-01-29 14:15:34 +01:00
|
|
|
<div class="input-group">
|
2024-12-14 17:32:03 +01:00
|
|
|
<div class="input-group-addon">{{ piggyBank.transactionCurrency.symbol|raw }}</div>
|
|
|
|
<input step="any" min="0" class="form-control" id="amount_{{ account.account.id }}" autocomplete="off" name="amount[{{ account.account.id }}]" max="{{ account.max_amount|round(piggyBank.transactionCurrency.decimal_places) }}" type="number"/>
|
2022-01-29 14:15:34 +01:00
|
|
|
</div>
|
2024-12-14 17:32:03 +01:00
|
|
|
{% endfor %}
|
2022-01-29 14:15:34 +01:00
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'close'|_ }}</button>
|
|
|
|
<button type="submit" class="btn btn-primary">{{ 'add'|_ }}</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
{% else %}
|
|
|
|
<div class="modal-body">
|
|
|
|
<p class="text-danger">{{ 'no_money_for_piggy'|_ }}</p>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'close'|_ }}</button>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|