Use widget_tweaks
This commit is contained in:
parent
6ac1241bd3
commit
530aafad19
2 changed files with 3 additions and 8 deletions
|
@ -457,13 +457,7 @@ class InventoryArticleForm(forms.Form):
|
|||
queryset = Article.objects.all(),
|
||||
widget = forms.HiddenInput(),
|
||||
)
|
||||
stock_new = forms.IntegerField(
|
||||
required=False,
|
||||
widget=forms.NumberInput(
|
||||
attrs={'class': 'form-control',
|
||||
'readonly': '',}
|
||||
)
|
||||
)
|
||||
stock_new = forms.IntegerField(required=False)
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(InventoryArticleForm, self).__init__(*args, **kwargs)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{% extends 'kfet/base.html' %}
|
||||
{% load staticfiles %}
|
||||
{% load widget_tweaks %}
|
||||
|
||||
{% block extra_head %}
|
||||
<script type="text/javascript" src="{% static 'kfet/js/reconnecting-websocket.js' %}"></script>
|
||||
|
@ -54,7 +55,7 @@
|
|||
<div class='col-md-offset-2 col-md-8'><input type='number' class='form-control' step='1'></div>
|
||||
</td>
|
||||
<td class='stock_new'>
|
||||
<div class='col-md-offset-2 col-md-8'>{{ form.stock_new }}</div>
|
||||
<div class='col-md-offset-2 col-md-8'>{{ form.stock_new | attr:"readonly"| add_class:"form-control" }}</div>
|
||||
<div class='col-md-2 inventory_update'><button type='button' class='btn-sm btn-primary'>MàJ</button></div>
|
||||
</td>
|
||||
<td class='finished'><input type='checkbox' class='form_control'></td>
|
||||
|
|
Loading…
Reference in a new issue