css tweaks

This commit is contained in:
Ludovic Stephan 2017-02-12 02:03:41 -02:00
parent 15d79aff2d
commit db899a891b
2 changed files with 15 additions and 7 deletions

View file

@ -471,12 +471,15 @@ class InventoryArticleForm(forms.Form):
# Order forms # Order forms
# ----- # -----
class OrderArticleForm(forms.Form): class OrderArticleForm(forms.Form):
article = forms.ModelChoiceField( article = forms.ModelChoiceField(
queryset = Article.objects.all(), queryset=Article.objects.all(),
widget = forms.HiddenInput(), widget=forms.HiddenInput(),
) )
quantity_ordered = forms.IntegerField(required = False) quantity_ordered = forms.IntegerField(
required=False,
widget=forms.NumberInput(attrs={'class': 'form-control'}))
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super(OrderArticleForm, self).__init__(*args, **kwargs) super(OrderArticleForm, self).__init__(*args, **kwargs)

View file

@ -5,9 +5,11 @@
{% block content %} {% block content %}
<div class="content-right-block">
<div>
<form action="" method="post"> <form action="" method="post">
{% csrf_token %} {% csrf_token %}
<table class="table table-hover table-condensed text-center"> <table class="table table-condensed text-center">
<thead> <thead>
<tr> <tr>
<td rowspan="2">Article</td> <td rowspan="2">Article</td>
@ -40,13 +42,14 @@
<tbody> <tbody>
{% for form in formset %} {% for form in formset %}
{% ifchanged form.category %} {% ifchanged form.category %}
<tr> <tr class='section'>
<td> {{ form.category_name }}</td> <td> {{ form.category_name }}</td>
<td colspan="11"></td>
</tr> </tr>
{% endifchanged %} {% endifchanged %}
<tr> <tr>
{{ form.article }} {{ form.article }}
<td class='text-left'>{{ form.name }}</td> <td>{{ form.name }}</td>
<td>{{ form.v_s1 }}</td> <td>{{ form.v_s1 }}</td>
<td>{{ form.v_s2 }}</td> <td>{{ form.v_s2 }}</td>
<td>{{ form.v_s3 }}</td> <td>{{ form.v_s3 }}</td>
@ -66,8 +69,10 @@
<input type="password" name="KFETPASSWORD"> <input type="password" name="KFETPASSWORD">
{% endif %} {% endif %}
{{ formset.management_form }} {{ formset.management_form }}
<input type="submit" class="btn btn-primary btn-lg" value="Envoyer"> <input type="submit" class="btn btn-primary btn-lg btn-block" value="Envoyer">
</form> </form>
</div>
</div>
<script type='text/javascript'> <script type='text/javascript'>
$(document).ready(function () { $(document).ready(function () {