From be8eb4ac28902430e7786ee0ba8f2370287051a6 Mon Sep 17 00:00:00 2001 From: Ludovic Stephan Date: Sun, 12 Feb 2017 00:01:22 -0200 Subject: [PATCH 1/6] add (temporary) better presentation --- kfet/templates/kfet/order_create.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kfet/templates/kfet/order_create.html b/kfet/templates/kfet/order_create.html index efd316a6..511e2177 100644 --- a/kfet/templates/kfet/order_create.html +++ b/kfet/templates/kfet/order_create.html @@ -7,7 +7,7 @@
{% csrf_token %} - +
@@ -31,7 +31,7 @@ {% for form in formset %} {% ifchanged form.category %} - + {% endifchanged %} From 15d79aff2d50d304ca711d0dcdf1e47f5b9d29f0 Mon Sep 17 00:00:00 2001 From: Ludovic Stephan Date: Sun, 12 Feb 2017 00:48:24 -0200 Subject: [PATCH 2/6] add help tooltips --- kfet/static/kfet/css/index.css | 5 +++++ kfet/templates/kfet/order_create.html | 32 ++++++++++++++++++++------- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/kfet/static/kfet/css/index.css b/kfet/static/kfet/css/index.css index f3e9bf8c..37e04bf6 100644 --- a/kfet/static/kfet/css/index.css +++ b/kfet/static/kfet/css/index.css @@ -341,3 +341,8 @@ textarea { .help h4 { margin:15px 0; } + +/* Tooltips */ +thead .tooltip { + font-size:13px; +} diff --git a/kfet/templates/kfet/order_create.html b/kfet/templates/kfet/order_create.html index 511e2177..fdab4282 100644 --- a/kfet/templates/kfet/order_create.html +++ b/kfet/templates/kfet/order_create.html @@ -7,17 +7,27 @@ {% csrf_token %} -
Article
{{ form.category_name }} {{ form.category_name }}
+
- - - - + + + + - - + + @@ -36,7 +46,7 @@ {% endifchanged %} {{ form.article }} - + @@ -59,4 +69,10 @@ + + {% endblock %} From db899a891b41232428a46208d5e6bbe32c852bbd Mon Sep 17 00:00:00 2001 From: Ludovic Stephan Date: Sun, 12 Feb 2017 02:03:41 -0200 Subject: [PATCH 3/6] css tweaks --- kfet/forms.py | 9 ++++++--- kfet/templates/kfet/order_create.html | 13 +++++++++---- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/kfet/forms.py b/kfet/forms.py index fe2e4a9c..a9cb0950 100644 --- a/kfet/forms.py +++ b/kfet/forms.py @@ -471,12 +471,15 @@ class InventoryArticleForm(forms.Form): # Order forms # ----- + class OrderArticleForm(forms.Form): article = forms.ModelChoiceField( - queryset = Article.objects.all(), - widget = forms.HiddenInput(), + queryset=Article.objects.all(), + 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): super(OrderArticleForm, self).__init__(*args, **kwargs) diff --git a/kfet/templates/kfet/order_create.html b/kfet/templates/kfet/order_create.html index fdab4282..4ea76466 100644 --- a/kfet/templates/kfet/order_create.html +++ b/kfet/templates/kfet/order_create.html @@ -5,9 +5,11 @@ {% block content %} +
+
{% csrf_token %} -
ArticleVentesV. moy.E.T.Prév.Ventes + + V. moy. + + E.T. + + Prév. + + StockRec.Com.Rec. + + Commande
S1
{{ form.name }}{{ form.name }} {{ form.v_s1 }} {{ form.v_s2 }} {{ form.v_s3 }}
+
@@ -40,13 +42,14 @@ {% for form in formset %} {% ifchanged form.category %} - + + {% endifchanged %} {{ form.article }} - + @@ -66,8 +69,10 @@ {% endif %} {{ formset.management_form }} - + + +
Article
{{ form.category_name }}
{{ form.name }}{{ form.name }} {{ form.v_s1 }} {{ form.v_s2 }} {{ form.v_s3 }}