mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 11:59:23 +00:00
Swag dropdown on user account + autofocus for refillings on counters
This commit is contained in:
@ -51,7 +51,7 @@
|
||||
<form method="post" action="{{ url('counter:click', counter_id=counter.id, user_id=customer.user.id) }}">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="action" value="code">
|
||||
<input type="input" name="code" value="" autofocus id="code_field"/>
|
||||
<input type="input" name="code" value="" autofocus class="focus" id="code_field"/>
|
||||
<input type="submit" value="{% trans %}Go{% endtrans %}" />
|
||||
</form>
|
||||
<p>{% trans %}Basket: {% endtrans %}</p>
|
||||
@ -174,6 +174,9 @@ $( function() {
|
||||
$( function() {
|
||||
$("#bar_ui").accordion({
|
||||
heightStyle: "content",
|
||||
activate: function(event, ui){
|
||||
$(".focus").focus();
|
||||
}
|
||||
});
|
||||
$("#products").tabs();
|
||||
});
|
||||
|
@ -63,6 +63,9 @@ class RefillForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Refilling
|
||||
fields = ['amount', 'payment_method', 'bank']
|
||||
widgets = {
|
||||
'amount': forms.NumberInput(attrs={'class':'focus'},)
|
||||
}
|
||||
|
||||
class CounterTabsMixin(TabedViewMixin):
|
||||
def get_tabs_title(self):
|
||||
|
Reference in New Issue
Block a user