diff --git a/RoutesApp/js_views.py b/RoutesApp/js_views.py index c926b8f..a4e226f 100644 --- a/RoutesApp/js_views.py +++ b/RoutesApp/js_views.py @@ -377,7 +377,10 @@ def create_or_change_route_ajax(request, route_id=None): if not form.is_valid(): form.initial = form.cleaned_data - Dict.update({'form': form}) + Dict.update({ + 'form': form, + 'owner_type': data['owner_type'], + }) html = render_to_string('blocks/profile/b_create_form_poster.html', Dict, request=request) return JsonResponse({'html': html}, status=400) diff --git a/templates/blocks/profile/b_create_form_poster.html b/templates/blocks/profile/b_create_form_poster.html index eaf8a96..928f753 100644 --- a/templates/blocks/profile/b_create_form_poster.html +++ b/templates/blocks/profile/b_create_form_poster.html @@ -119,13 +119,14 @@ - {#
#} - {# Венгрия#} - {# BY#} - {#
#} + +
+ {{ form.initial.from_city.country.name }} + {{ form.initial.from_city.country.short_code }} +
{% if not errors_off and form.errors and form.errors.from_address_point %} @@ -251,7 +252,7 @@ id="arrival_DT" name="arrival_DT" placeholder="{% translate "Выберите дату" %}" - required +{# required#} {% if route.arrival_DT %} value="{{ route.from_city.get_current_datetime }}" {% elif form.initial.arrival_DT %} diff --git a/templates/widgets/w_ac_input_address_point.html b/templates/widgets/w_ac_input_address_point.html index 535400a..4745f01 100644 --- a/templates/widgets/w_ac_input_address_point.html +++ b/templates/widgets/w_ac_input_address_point.html @@ -4,6 +4,6 @@
{{ country__name }} - BY{# {{ TODO нужны правильные значения }} #} + {{ country__short_code }} {{ name }}/{{ country__name }}