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):
|
||||
currencies = forms.ModelChoiceField(
|
||||
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 %}
|
||||
<li><a href="{% url 'login' %}">LOGIN</a></li>
|
||||
{% endif %}
|
||||
<li class="dropdown">
|
||||
<li>
|
||||
{% if article_view %}
|
||||
<form id="currency" action="" method="POST" novalidate>
|
||||
{{ currencies_form.as_ul }}
|
||||
<li><input type="submit" value="Select"></li>
|
||||
{% csrf_token %}
|
||||
</form>
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue