improve dropdown
This commit is contained in:
parent
ab30417a80
commit
1e577f4520
|
@ -5,4 +5,13 @@ from currencies.models import ExchangeRate_name
|
||||||
class CurrenciesForm(forms.Form):
|
class CurrenciesForm(forms.Form):
|
||||||
currencies = forms.ModelChoiceField(
|
currencies = forms.ModelChoiceField(
|
||||||
queryset=ExchangeRate_name.objects.all(),
|
queryset=ExchangeRate_name.objects.all(),
|
||||||
required=False, empty_label='CHF')
|
required=False,
|
||||||
|
empty_label='CHF',
|
||||||
|
label='CURENCIES',
|
||||||
|
widget=forms.Select(
|
||||||
|
attrs={
|
||||||
|
'onchange': 'currency.submit();',
|
||||||
|
'class': 'btn-primary dropdown-toggle'
|
||||||
|
}
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
|
@ -13,11 +13,10 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
<li><a href="{% url 'login' %}">LOGIN</a></li>
|
<li><a href="{% url 'login' %}">LOGIN</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<li class="dropdown">
|
<li>
|
||||||
{% if article_view %}
|
{% if article_view %}
|
||||||
<form id="currency" action="" method="POST" novalidate>
|
<form id="currency" action="" method="POST" novalidate>
|
||||||
{{ currencies_form.as_ul }}
|
{{ currencies_form.as_ul }}
|
||||||
<li><input type="submit" value="Select"></li>
|
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue