mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-25 03:30:30 +02:00
Use custom inputs for date picker and amounts
This commit is contained in:
11
templates/note/amount_input.html
Normal file
11
templates/note/amount_input.html
Normal file
@ -0,0 +1,11 @@
|
||||
<div class="input-group">
|
||||
<input class="form-control mx-auto d-block" type="number" min="0" step="0.01"
|
||||
{% if widget.value != None and widget.value != "" %}value="{{ widget.value }}"{% endif %}
|
||||
name="{{ widget.name }}"
|
||||
{% for name, value in widget.attrs.items %}
|
||||
{% ifnotequal value False %}{{ name }}{% ifnotequal value True %}="{{ value|stringformat:'s' }}"{% endifnotequal %}{% endifnotequal %}
|
||||
{% endfor %}>
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">€</span>
|
||||
</div>
|
||||
</div>
|
@ -126,12 +126,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="amount">{% trans "Amount" %} :</label>
|
||||
<div class="input-group">
|
||||
<input class="form-control mx-auto d-block" type="number" min="0" step="0.01" id="amount" />
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">€</span>
|
||||
</div>
|
||||
</div>
|
||||
{% include "note/amount_input.html" with widget=amount_widget %}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
|
Reference in New Issue
Block a user