diff --git a/common/templatetags/common_tags.py b/common/templatetags/common_tags.py index 5347785..28e7f56 100644 --- a/common/templatetags/common_tags.py +++ b/common/templatetags/common_tags.py @@ -42,6 +42,11 @@ def interact(**kwargs): import code; code.interact(local=dict(kwargs, **dict(globals(), **locals()))) +@register.simple_tag +def random_ident(*args, **kwargs): + return util.random_ident(*args, **kwargs) + + @register.filter('int') def to_int(val): return int(val) diff --git a/projects/templates/customer_project_create.html b/projects/templates/customer_project_create.html index 70a72a4..508d25f 100644 --- a/projects/templates/customer_project_create.html +++ b/projects/templates/customer_project_create.html @@ -31,12 +31,12 @@ {% endif %}
-

Название заказа {{ form.name.errors.as_text }}

+

Название заказа {{ form.name.errors.as_text }}

-

Подробно опишите задание {{ form.text.errors.as_text }}

+

Подробно опишите задание {{ form.text.errors.as_text }}

@@ -58,7 +58,7 @@ -

Тип работы {{ form.work_type.errors.as_text }}

+

Тип работы {{ form.work_type.errors.as_text }}

{% for id, text in form.work_type.field.choices %}
@@ -84,7 +84,7 @@
-
Специализация проекта {{ form.specialization.errors.as_text }}
+
Специализация проекта {{ form.specialization.errors.as_text }}
@@ -109,7 +109,7 @@
-
Бюджет {{ form.budget.errors.as_text }}
+
Бюджет {{ form.budget.errors.as_text }}
@@ -146,7 +146,7 @@

Сделать для исполнителей обязательным для заполнения поля цена и срок

-
Способ оплаты {{ form.deal_type.errors.as_text }}
+
Способ оплаты {{ form.deal_type.errors.as_text }}
@@ -209,10 +209,10 @@
-
Выбор объекта
{{ form.realty.errors.as_text }}
-
Наименование
{{ realty_form.name.errors.as_text }}
-
Классификация здания
{{ realty_form.building_classification.errors.as_text }}
-
Вид строительства
{{ realty_form.construction_type.errors.as_text }}
+
Выбор объекта
{{ form.realty.errors.as_text }}
+
Наименование
{{ realty_form.name.errors.as_text }}
+
Классификация здания
{{ realty_form.building_classification.errors.as_text }}
+
Вид строительства
{{ realty_form.construction_type.errors.as_text }}
@@ -258,7 +258,7 @@
-
Местоположение {{ realty_form.location.errors.as_text }}
+
Местоположение {{ realty_form.location.errors.as_text }}
@@ -334,5 +334,17 @@ }) }) }()) + + + + // Scroll to first form validation error ------------------------------ + + + ;(function() { + var hash = $('.-validation-error').filter(function(i, el) {return $(el).text()}).first().attr('id') + + if (hash) + window.location.hash = hash + }()) {% endblock %} diff --git a/projects/templates/customer_project_edit.html b/projects/templates/customer_project_edit.html index 4720f27..5df41ac 100644 --- a/projects/templates/customer_project_edit.html +++ b/projects/templates/customer_project_edit.html @@ -32,12 +32,12 @@ {% endif %}
-

Название заказа {{ form.name.errors.as_text }}

+

Название заказа {{ form.name.errors.as_text }}

-

Подробно опишите задание {{ form.text.errors.as_text }}

+

Подробно опишите задание {{ form.text.errors.as_text }}

@@ -68,7 +68,7 @@
-

Тип работы {{ form.work_type.errors.as_text }}

+

Тип работы {{ form.work_type.errors.as_text }}

{% for id, text in form.work_type.field.choices %}
@@ -94,7 +94,7 @@
-
Специализация проекта {{ form.specialization.errors.as_text }}
+
Специализация проекта {{ form.specialization.errors.as_text }}
@@ -119,7 +119,7 @@
-
Бюджет {{ form.budget.errors.as_text }}
+
Бюджет {{ form.budget.errors.as_text }}
@@ -156,7 +156,7 @@

Сделать для исполнителей обязательным для заполнения поля цена и срок

-
Способ оплаты {{ form.deal_type.errors.as_text }}
+
Способ оплаты {{ form.deal_type.errors.as_text }}
@@ -218,10 +218,10 @@
-
Выбор объекта
{{ form.realty.errors.as_text }}
-
Наименование
{{ realty_form.name.errors.as_text }}
-
Классификация здания
{{ realty_form.building_classification.errors.as_text }}
-
Вид строительства
{{ realty_form.construction_type.errors.as_text }}
+
Выбор объекта
{{ form.realty.errors.as_text }}
+
Наименование
{{ realty_form.name.errors.as_text }}
+
Классификация здания
{{ realty_form.building_classification.errors.as_text }}
+
Вид строительства
{{ realty_form.construction_type.errors.as_text }}
@@ -267,7 +267,7 @@
-
Местоположение {{ realty_form.location.errors.as_text }}
+
Местоположение {{ realty_form.location.errors.as_text }}
@@ -348,5 +348,17 @@ }) }) }()) + + + + // Scroll to first form validation error ------------------------------ + + + ;(function() { + var hash = $('.-validation-error').filter(function(i, el) {return $(el).text()}).first().attr('id') + + if (hash) + window.location.hash = hash + }()) {% endblock %}