diff --git a/asuzr/forms.py b/asuzr/forms.py index 3947c56..b4cfd94 100644 --- a/asuzr/forms.py +++ b/asuzr/forms.py @@ -47,7 +47,8 @@ class OrderForm(ModelForm): class Meta: model = Order fields = ['product', 'price', 'paid', 'address', 'designer', 'deadline', 'delivery', 'lifting'] - + + submit_text = "Добавить заказ" product = forms.ModelChoiceField( required=False, queryset = Product.objects.all(), @@ -60,6 +61,7 @@ class ProdTableForm(ModelForm): model = OrderCosts fields = ['cost_item', 'value'] + submit_text = "Добавить" cost_item = forms.ModelChoiceField( required=False, queryset = CostItem.objects.all(), diff --git a/templates/asuzr/base.html b/templates/asuzr/base.html index 2b6db80..9f30bb0 100644 --- a/templates/asuzr/base.html +++ b/templates/asuzr/base.html @@ -57,6 +57,9 @@ margin-left: 12px; margin-top: 6px; } + table.paleblue td.align-right { + text-align: right; + } body { background: #F5F5F5 } diff --git a/templates/asuzr/table_with_form.html b/templates/asuzr/table_with_form.html index 0aed476..96c3656 100644 --- a/templates/asuzr/table_with_form.html +++ b/templates/asuzr/table_with_form.html @@ -20,21 +20,21 @@ {% endif %} {% endfor %} {% if add_form %} - {% if params %} -
- {% else %} - - {% endif %} + {% if params %} + + {% else %} + + {% endif %} {% csrf_token %} - {% for field in add_form %} - {{field}} - {% endfor %} + {% for field in add_form %} + {{field}} + {% endfor %} - +
{% endif %} -{% endblock table.tbody %} \ No newline at end of file +{% endblock table.tbody %}