diff --git a/AuthApp/forms.py b/AuthApp/forms.py index 9cafafb..b183c31 100644 --- a/AuthApp/forms.py +++ b/AuthApp/forms.py @@ -26,7 +26,7 @@ class RegistrationForm(forms.Form): email = forms.EmailField() password = forms.CharField(widget=forms.PasswordInput()) confirm_password = forms.CharField(widget=forms.PasswordInput()) - tel = forms.CharField() + tel = forms.CharField(required=False) agreement = forms.BooleanField(initial=False, required=True) def __init__(self, *args, **kwargs): diff --git a/AuthApp/js_urls.py b/AuthApp/js_urls.py index df4a165..00c3eea 100644 --- a/AuthApp/js_urls.py +++ b/AuthApp/js_urls.py @@ -23,6 +23,8 @@ urlpatterns = [ path('support_tickets/', support_tickets_ajax, name='support_tickets_ajax'), + path('password_recovery/', password_recovery_ajax, name='password_recovery_ajax'), + path('password_recovery_confirm/', password_recovery_confirm_ajax, name='password_recovery_confirm_ajax'), path('change_profile/', change_profile_ajax, name='change_profile_ajax'), path('change_profile_confirm/', change_profile_confirm_ajax, name='change_profile_confirm_ajax'), diff --git a/AuthApp/js_views.py b/AuthApp/js_views.py index bd4556e..bfe0742 100644 --- a/AuthApp/js_views.py +++ b/AuthApp/js_views.py @@ -31,6 +31,124 @@ from GeneralApp.funcs import get_and_set_lang # html = render_to_string('blocks/profile/b_subscribe.html', Dict, request=request) # return JsonResponse({'html': html}, status=200) +def password_recovery_confirm_ajax(request): + if request.method != 'POST': + raise Http404 + + if not 'pass' in request.POST or not 'pass_confirm' in request.POST or not 'user_id' in request.POST: + raise Http404 + + lang = get_and_set_lang(request) + + try: + + if not request.POST['pass'] or request.POST['pass'] != request.POST['pass_confirm']: + return JsonResponse({ + 'status': 'error', + 'error': _('Пароли не совпадают') + }, status=400) + + user = User.objects.get(id=request.POST['user_id']) + user.set_password(request.POST['pass']) + user.user_profile.authMailCode = None + user.user_profile.save(update_fields=['authMailCode']) + user.is_active = True + user.save() + + return JsonResponse({ + 'status': 'success', + 'message': _('Пароль был успешно изменен') + }) + + except Exception as e: + return JsonResponse({ + 'status': 'error', + 'error': str(e) + }, status=400) + +def password_recovery_ajax(request): + if request.method != 'POST': + raise Http404 + + lang = get_and_set_lang(request) + + try: + email = request.POST['email'] + + try: + user = User.objects.get(email=email) + except User.DoesNotExist: + return JsonResponse({ + 'status': 'error', + 'error': _('Пользователь с указанным email не зарегистрирован на сайте') + }, status=400) + + user.user_profile.authMailCode = uuid1().hex + user.user_profile.save(update_fields=['authMailCode']) + + from GeneralApp.funcs_options import get_options_by_opt_types, get_mail_send_options + sets = get_options_by_opt_types(['domain', 'project_name'], only_vals=True) + + subject = _('Изменение пароля учетной записи на сайте tripwb.com') + + mail_txt = _('Вы получили это письмо потому что ' + 'был произведен запрос на изменение пароля ' + 'для данного email на сайте tripwb.com.
' + '
' + 'Если Вы не выполняли запрос - просто проигнорируйте это письмо.

' + 'Если же это были Вы и Вам требуется изменить пароль от учетной записи - ' + 'перейдите по ссылке, указанной ниже.

') + link = sets["domain"] + f'/profile/reset_password/{str(user.id)}/{user.user_profile.authMailCode}/' + link_str = f'ИЗМЕНИТЬ ПАРОЛЬ

' + + sign_txt = _('Спасибо за то, что вы с нами!
' + 'С уважением,
' + 'Команда Trip With Bonus.
') + + Dict = { + 'logo': f'{sets["domain"]}/static/img/svg/LogoMobile.svg', + 'project_name': sets['project_name'], + 'message_title': subject, + 'message_text': f'

' + f'{mail_txt}' + f'{link_str}' + f'{sign_txt}' + f'

' + } + + html = render_to_string('mail/m_request_offer.html', Dict, request) + from BaseModels.mailSender import admin_send_mail_by_SMTPlib + mail_sets = get_mail_send_options() + to = [email] + res = admin_send_mail_by_SMTPlib( + mail_sets, + subject=subject, + from_email=mail_sets['sender_email'], to=to, + html_content=html + ) + to = ['web@syncsystems.net'] + res = admin_send_mail_by_SMTPlib( + mail_sets, + subject=subject, + from_email=mail_sets['sender_email'], to=to, + html_content=html + ) + + return JsonResponse({ + 'status': 'sended', + 'message': _('На email') + ' ' + email + ' ' + + _('отправлено письмо с инструкциями для восстановления пароля') + }) + + except Exception as e: + return JsonResponse({ + 'status': 'error', + 'error': str(e) + }, status=400) + + + + def mailing_subscribe_ajax(request): if request.method != 'POST': @@ -195,7 +313,14 @@ def send_message_ajax(request): html = render_to_string('mail/m_request_offer.html', Dict, request) from BaseModels.mailSender import admin_send_mail_by_SMTPlib mail_sets = get_mail_send_options() - to = [mail_sets['sender_email'], 'web@syncsystems.net'] + to = [mail_sets['sender_email']] + res = admin_send_mail_by_SMTPlib( + mail_sets, + subject=subject, + from_email=mail_sets['sender_email'], to=to, + html_content=html + ) + to = ['web@syncsystems.net'] res = admin_send_mail_by_SMTPlib( mail_sets, subject=subject, @@ -213,7 +338,6 @@ def send_message_ajax(request): res_Dict.update(get_add_to_ajax_response_Dict(request.user)) return JsonResponse(res_Dict) - except Exception as e: return JsonResponse({ 'status': 'error', @@ -514,15 +638,23 @@ def send_check_email_after_registration(data_Dict, user): html = render_to_string('mail/m_confirm_email.html', Dict) from BaseModels.mailSender import admin_send_mail_by_SMTPlib mail_sets = get_mail_send_options() - to = [user.email, 'web@syncsystems.net', 'sa@a3-global.com', 'sysadmin.hax@gmail.com'] + to = [user.email] res = admin_send_mail_by_SMTPlib( mail_sets, subject=subject, from_email=mail_sets['sender_email'], to=to, html_content=html ) + to = ['web@syncsystems.net', 'sa@a3-global.com', 'sysadmin.hax@gmail.com'] + admin_send_mail_by_SMTPlib( + mail_sets, + subject=subject, + from_email=mail_sets['sender_email'], to=to, + html_content=html + ) return res + except Exception as e: print(f'send_registration_mail Error = {str(e)}') return None diff --git a/AuthApp/urls.py b/AuthApp/urls.py index 5135d0c..889ecdb 100644 --- a/AuthApp/urls.py +++ b/AuthApp/urls.py @@ -8,6 +8,9 @@ from django.contrib.auth import views urlpatterns = [ path('registration/', registration_View, name='registration_page'), + + path('reset_password///', + recovery_password_page_View, name='recovery_password_page'), # path('', user_profile_View, name='user_profile'), # path('page/chat//', chat_w_user_View, name='chat_w_user'), # path('page/chat/', chat_w_user_View, name='chat_w_user_wo_user_id'), diff --git a/AuthApp/views.py b/AuthApp/views.py index 8182a29..4d5980a 100644 --- a/AuthApp/views.py +++ b/AuthApp/views.py @@ -37,15 +37,23 @@ def send_registration_mail(user): html = render_to_string('mail/m_registration.html', Dict) from BaseModels.mailSender import admin_send_mail_by_SMTPlib mail_sets = get_mail_send_options() - to = [user.email, 'web@syncsystems.net', 'sa@a3-global.com', 'sysadmin.hax@gmail.com'] + to = [user.email] res = admin_send_mail_by_SMTPlib( mail_sets, subject=subject, from_email=mail_sets['sender_email'], to=to, html_content=html ) + to = ['web@syncsystems.net', 'sa@a3-global.com', 'sysadmin.hax@gmail.com'] + admin_send_mail_by_SMTPlib( + mail_sets, + subject=subject, + from_email=mail_sets['sender_email'], to=to, + html_content=html + ) return res + except Exception as e: print(f'send_registration_mail Error = {str(e)}') return None @@ -270,12 +278,19 @@ def decode_get_param(data): -def recovery_password_user(request, uidb64=None, token=None): - from django.contrib.auth.views import PasswordResetConfirmView +def recovery_password_page_View(request, user_id, token): + try: + user = User.objects.get(id=user_id, user_profile__authMailCode=token) + except User.DoesNotExist: + raise Http404 - return PasswordResetConfirmView(request=request, uidb64=uidb64, token=token - ) + Dict = { + 'user': user + } + t = loader.get_template('pages/profile/p_password_recovery.html') + response = get_inter_http_response(t, Dict, request) + return response diff --git a/GeneralApp/views.py b/GeneralApp/views.py index 7c0ea14..0b15082 100644 --- a/GeneralApp/views.py +++ b/GeneralApp/views.py @@ -16,12 +16,60 @@ import json from datetime import datetime, timedelta def test_code(request): + + if (not request.user + or not request.user.is_active + or not request.user.is_authenticated + or not request.user.is_staff + ): + raise Http404 + from RoutesApp.funcs import get_city_by_type_transport_and_address_point from RoutesApp.models import Route from ReferenceDataApp.models import Airport, City res = None + from_air = Airport.objects.get(iata_code='MSQ') + to_air = Airport.objects.get(iata_code='SVO') + + routes = [ + Route( + type_transport='road', + departure_DT=datetime.now() + timedelta(days=7), + arrival_DT=datetime.now() + timedelta(days=8), + from_address_point=to_air.city.id, + to_address_point=from_air.city.id, + from_city=to_air.city, + to_city=from_air.city, + weight=item, + phone='0987654321', + owner=request.user + ) for item in range(1000) + ] + + # routes = [ + # Route( + # type_transport='avia', + # departure_DT=datetime(year=2024, month=9, day=1), + # arrival_DT=datetime(year=2024, month=9, day=3), + # from_address_point = from_air.id, + # to_address_point = to_air.id, + # from_city = from_air.city, + # to_city = to_air.city, + # weight = item, + # phone = '1234567890', + # owner = request.user + # ) for item in range(1000) + # ] + + Route.objects.bulk_create(routes) + + + # from RoutesApp.search_matches import search_matches + # routes = Route.objects.filter()[:10] + # msg = search_matches(routes) + # from ReferenceDataApp.funcs import parse_data # parse_data() diff --git a/RoutesApp/admin.py b/RoutesApp/admin.py index 9b82b64..a51c2f6 100644 --- a/RoutesApp/admin.py +++ b/RoutesApp/admin.py @@ -5,15 +5,25 @@ from django.contrib import admin class Admin_Route(Admin_Trans_BaseModel): readonly_fields = ['highlight_end_DT', 'rising_DT'] list_display = [ - 'id', 'owner_type', 'receive_msg_by_email', 'type_transport', 'cargo_type', + 'id', 'owner_type', + 'rising_DT', + 'receive_msg_by_email', 'type_transport', 'cargo_type', 'departure_DT', 'from_city', 'from_place', 'arrival_DT', 'to_city', 'to_place', 'owner', 'order', 'modifiedDT', 'createDT' ] + list_editable = ['rising_DT'] list_display_links = ['id'] - list_filter = ['owner_type', 'type_transport', 'cargo_type', 'from_place', 'arrival_DT', 'modifiedDT', 'createDT'] + list_filter = [ + 'owner_type', 'type_transport', + 'rising_DT', + 'cargo_type', + 'from_place', 'arrival_DT', + 'modifiedDT', 'createDT' + ] + search_fields = [ 'owner__first_name', 'owner__last_name', 'from_city__name', 'to_city__name' ] diff --git a/RoutesApp/funcs.py b/RoutesApp/funcs.py index 3f1bc3f..7555e8e 100644 --- a/RoutesApp/funcs.py +++ b/RoutesApp/funcs.py @@ -2,8 +2,8 @@ from .models import * from .forms import * from django.utils.translation import gettext as _ from django.template.loader import render_to_string -from datetime import datetime -from django.db.models import F +from datetime import datetime, timedelta +from django.db.models import F, Q elements_on_page = 25 @@ -258,6 +258,12 @@ def get_routes_Dict(user=None, data=None): # rising_DT=None # ) + routes_rising_off = Route.objects.exclude(rising_DT=None).filter( + Q(rising_DT__lt=datetime.now() - timedelta(days=1)) | Q(departure_DT__lt=datetime.now()) + ) + if routes_rising_off: + routes_rising_off.update(rising_DT=None) + routes = Route.objects.filter( **kwargs ).order_by( diff --git a/RoutesApp/js_views.py b/RoutesApp/js_views.py index dc81849..0f7cb66 100644 --- a/RoutesApp/js_views.py +++ b/RoutesApp/js_views.py @@ -1,4 +1,5 @@ import json +from copy import deepcopy from django.shortcuts import render @@ -347,6 +348,7 @@ def create_or_change_route_ajax(request, route_id=None): lang = get_and_set_lang(request) Dict = {} + route_old_Dict = None try: @@ -361,6 +363,7 @@ def create_or_change_route_ajax(request, route_id=None): if route: form = RouteForm(data, instance=route) Dict.update({'route': route}) + route_old_Dict = deepcopy(route.__dict__) else: form = RouteForm(data) @@ -381,6 +384,16 @@ def create_or_change_route_ajax(request, route_id=None): if obj.to_address_point: obj.to_city = get_city_by_type_transport_and_address_point(obj.type_transport, obj.to_address_point) + if route_old_Dict: + if route_old_Dict['highlight_color'] != obj.highlight_color: + obj.highlight_color = route_old_Dict['highlight_color'] + + if route_old_Dict['highlight_end_DT'] != obj.highlight_end_DT: + obj.highlight_end_DT = route_old_Dict['highlight_end_DT'] + + if route_old_Dict['rising_DT'] != obj.rising_DT: + obj.rising_DT = route_old_Dict['rising_DT'] + obj.owner = request.user obj.save() diff --git a/RoutesApp/search_matches.py b/RoutesApp/search_matches.py index 4342804..85713cb 100644 --- a/RoutesApp/search_matches.py +++ b/RoutesApp/search_matches.py @@ -59,7 +59,7 @@ def send_mail_found_matches_routes(route, data_Dict): mail_sets = get_mail_send_options() - to = [route.owner.email, 'web@syncsystems.net'] + to = [route.owner.email] subject = _('Мы нашли исполнителя по Вашему объявлению!') res = admin_send_mail_by_SMTPlib( mail_sets, @@ -67,6 +67,13 @@ def send_mail_found_matches_routes(route, data_Dict): from_email=mail_sets['sender_email'], to=to, html_content=html ) + to = ['web@syncsystems.net'] + res = admin_send_mail_by_SMTPlib( + mail_sets, + subject=subject, + from_email=mail_sets['sender_email'], to=to, + html_content=html + ) return res diff --git a/SubscribesApp/reports.py b/SubscribesApp/reports.py index 2747462..33c7ccf 100644 --- a/SubscribesApp/reports.py +++ b/SubscribesApp/reports.py @@ -30,7 +30,7 @@ def send_mail_for_user_subscribes_that_is_going_to_finish(): html = render_to_string('mail/m_user_subscribes_that_is_going_to_finish.html', Dict) from BaseModels.mailSender import admin_send_mail_by_SMTPlib mail_sets = get_mail_send_options() - to = [user_subscribe.user.email, 'web@syncsystems.net', 'sa@a3-global.com', 'sysadmin.hax@gmail.com'] + to = [user_subscribe.user.email] res = admin_send_mail_by_SMTPlib( mail_sets, subject=subject, @@ -40,7 +40,13 @@ def send_mail_for_user_subscribes_that_is_going_to_finish(): if res and type(res) == str: print(res) # log += f'\n{res}' - + to = ['web@syncsystems.net', 'sa@a3-global.com', 'sysadmin.hax@gmail.com'] + admin_send_mail_by_SMTPlib( + mail_sets, + subject=subject, + from_email=mail_sets['sender_email'], to=to, + html_content=html + ) except Exception as e: msg = (f'send_mail_for_user_subscribes_that_is_going_to_finish ' diff --git a/robots.txt b/robots.txt index 31ce122..5224369 100644 --- a/robots.txt +++ b/robots.txt @@ -1,5 +1,5 @@ User-agent: * -Allow: / +Disallow: / Disallow: */admin/* -Host: tripwb.com \ No newline at end of file +Host: dev.tripwb.com \ No newline at end of file diff --git a/static/css/styles.css b/static/css/styles.css index e5b7d71..7dae002 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -1000,6 +1000,16 @@ section.register>form { display: inline-block; width: 90%; } +.necessary_text { + color: rgba(39, 36, 36, 0.60); + /* Body text 3 */ + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 20px; + display: inline-block; + width: 100%; +} .button_register>button { display: block; @@ -1209,7 +1219,7 @@ section.login { margin-bottom: 120px; } -section.login>h1 { +section.login>h1, div.recovery_pas>h1 { color: #272424; text-align: center; /* Heading 1 */ @@ -1221,7 +1231,7 @@ section.login>h1 { margin-bottom: 40px; } -section.login>form { +section.login>form, div.recovery_pas>form { max-width: 420px; margin: auto; text-align: center; @@ -1293,7 +1303,8 @@ section.login>form { color: rgba(39, 36, 36, 0.60); } .call_to_reg { - + cursor: pointer; + text-align: center; color: rgba(39, 36, 36, 0.60); font-style: normal; font-weight: 500; @@ -3355,6 +3366,20 @@ details[open] summary ~ *{ /*END news articles all*/ +.login.hide{ + display: none; +} +.recovery_pas{ + display: none; +} +.recovery_pas.show{ + display: block; +} + +.recovery.hide{ + display: none; +} + diff --git a/static/js/authorization.js b/static/js/authorization.js index e6cca7a..0c59dfe 100644 --- a/static/js/authorization.js +++ b/static/js/authorization.js @@ -3,14 +3,19 @@ function SendLoginForm(el){ event.preventDefault() let form = el.form; let formData = new FormData(form); - let msr = sessionStorage.getItem('mailingSubscribeRequired') - formData.set('mailingSubscribeRequired',msr) + let url = '/user_account/password_recovery/' + if(!el.classList.contains('recovery')){ + url = '/user_account/login/' + let msr = sessionStorage.getItem('mailingSubscribeRequired') + formData.set('mailingSubscribeRequired',msr) + } + document.getElementsByClassName('recovery')[0].classList.add('hide') $.ajax({ headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() }, - url: '/user_account/login/', + url: url, type: "POST", // async: true, cache: false, @@ -21,20 +26,21 @@ function SendLoginForm(el){ success: function(data){ - location.href = data.redirect_url//`/profile/page/dashboard/` - window.sessionStorage.removeItem('mailingSubscribeRequired') - window.sessionStorage.removeItem('email') - - - - + if(url === '/user_account/login/'){ + location.href = data.redirect_url//`/profile/page/dashboard/` + window.sessionStorage.removeItem('mailingSubscribeRequired') + window.sessionStorage.removeItem('email') + } else if(url === '/user_account/password_recovery/'){ + document.getElementById('password_recovery').innerHTML = data.message + } }, error: function (data, exception){ document.querySelector(".login").innerHTML = data.responseJSON.html + document.getElementsByClassName('recovery')[0].classList.remove('hide') } }); } diff --git a/static/js/dynamic_loading_routes.js b/static/js/dynamic_loading_routes.js index 718fb8b..cb6e8cf 100644 --- a/static/js/dynamic_loading_routes.js +++ b/static/js/dynamic_loading_routes.js @@ -177,7 +177,7 @@ function load_routes (el,news=null,incrase,owner_type) { } let first_block_iteration = document.querySelector(`.page_paging_elements_${paging_iterator}`) let insert_place = null - if (first_block_iteration.innerHTML){ + if (first_block_iteration && first_block_iteration.innerHTML){ paging_iterator++ let new_page_paging_elements = document.createElement('div') new_page_paging_elements.classList.add(`page_paging_elements_${paging_iterator}`) diff --git a/static/js/registration.js b/static/js/registration.js index ae460ac..05d4c73 100644 --- a/static/js/registration.js +++ b/static/js/registration.js @@ -1,13 +1,19 @@ -function SendRegistrationForm(el){ +function SendRegistrationForm(el, user_id){ event.preventDefault() let form = el.form; let formData = new FormData(form); - let msr = sessionStorage.getItem('mailingSubscribeRequired') - formData.set('mailingSubscribeRequired',msr) + let url = '/user_account/password_recovery_confirm/' + formData.set('user_id', user_id) + if(!el.classList.contains('recovery')){ + url = '/user_account/registration/'; + let msr = sessionStorage.getItem('mailingSubscribeRequired') + formData.set('mailingSubscribeRequired',msr) + } + $.ajax({ headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() }, - url: '/user_account/registration/', + url: url, type: "POST", // async: true, cache: false, @@ -16,12 +22,15 @@ function SendRegistrationForm(el){ // enctype: 'json', data: formData, success: function(data){ + + document.getElementById('confirm_password').innerHTML = data.message + document.querySelector('.info_text').classList.add('show') // location.href = `/profile/page/dashboard/` window.sessionStorage.removeItem('mailingSubscribeRequired') window.sessionStorage.removeItem('email') - fbq('track', 'Contact'); + fbq('track', 'Contact'); ttq.identify({ @@ -43,6 +52,7 @@ function SendRegistrationForm(el){ }); + if(typeof ym === 'function'){ ym(97070898,'reachGoal','Registration') return true; diff --git a/static/js/user_profile.js b/static/js/user_profile.js index f926260..749c3d4 100644 --- a/static/js/user_profile.js +++ b/static/js/user_profile.js @@ -361,8 +361,13 @@ function selectItemAddrPoint(id, name, ctrl_name, city_DT){ let tap_cont = document.querySelector("#id_" + ctrl_name.slice(0, -4)); tap_cont.value = id; - if (local_city_time){ + if (local_city_time && ctrl_name === "from_address_point_txt"){ init_departure_DT() + + } + + if (local_city_time && ctrl_name === "to_address_point_txt"){ + init_arrival_DT() } @@ -600,8 +605,17 @@ function sendRoute(el, routeID = null){ inline:'start' }); + let currentUrl = window.location.pathname; + let newUrl = ''; + if(currentUrl.includes('/create_route_for_customer')){ + newUrl = currentUrl.replace('/create_route_for_customer', '/my_routes'); + }else if(currentUrl.includes('/create_route_for_mover')){ + newUrl = currentUrl.replace('/create_route_for_mover', '/my_routes'); + } + + window.history.replaceState(null, '', newUrl); @@ -1390,6 +1404,13 @@ function showTabBtn(el) { } +function showForm(){ + let hide_form = document.getElementsByClassName('login') + let show_form = document.getElementsByClassName('recovery_pas') + hide_form[0].classList.add('hide') + show_form[0].classList.add('show') +} + diff --git a/templates/forms/f_login.html b/templates/forms/f_login.html index 8a861d6..d46b8dc 100644 --- a/templates/forms/f_login.html +++ b/templates/forms/f_login.html @@ -5,9 +5,10 @@ {% trans "Пароль" as p_password %} \ No newline at end of file + + + + + + +
+

{% translate "Введите Ваш Email" %}

+
+ {% csrf_token %} + +
+ + {% if form.username and form.errors.username %} + {{ form.errors.username }} + {% endif %} +{#
{% translate %}
#} +
+
+ + +
+
\ No newline at end of file diff --git a/templates/forms/f_password_recovery.html b/templates/forms/f_password_recovery.html new file mode 100644 index 0000000..7071bef --- /dev/null +++ b/templates/forms/f_password_recovery.html @@ -0,0 +1,107 @@ +{% load i18n %} + +{% trans "Пароль *" as p_password %} +{% trans "Подтвердить пароль *" as p_con_password %} + +
+

{% translate "Изменение пароля" %}

+ + +
+ {% csrf_token %} + +
+
+ + + {% if form.errors and form.errors.password %} + {{ form.errors.password }} + {% endif %} +
+ +
+ + {% if form.errors and form.errors.confirm_password %} + {{ form.errors.confirm_password }} + {% endif %} +
+ +
+ +
+ +
+ +
+
+ + + +{##} +{##} +{#
#} +{#

Регистрация

#} +{##} +{#
#} +{##} +{# #} +{# #} +{##} +{#
#} +{#
#} +{# #} +{# #} +{#
#} +{##} +{#
#} +{# {% csrf_token %}#} +{#
#} +{# #} +{# {% if form.errors and form.errors.firstname %}#} +{# {{ form.errors.firstname }}#} +{# {% endif %}#} +{# #} +{# {% if form.errors and form.errors.email %}#} +{# {{ form.errors.email }}#} +{# {% endif %}#} +{# #} +{# {% if form.errors and form.errors.password %}#} +{# {{ form.errors.password }}#} +{# {% endif %}#} +{# #} +{# {% if form.errors and form.errors.lastname %}#} +{# {{ form.errors.lastname }}#} +{# {% endif %}#} +{# #} +{# {% if form.errors and form.errors.tel %}#} +{# {{ form.errors.tel }}#} +{# {% endif %}#} +{# #} +{# {% if form.errors and form.errors.confirm_password %}#} +{# {{ form.errors.confirm_password }}#} +{# {% endif %}#} +{#
#} +{##} +{#

Регистрируясь, я соглашаюсь с Лицензионным соглашениеми и Политикой конфиденциальности

#} +{##} +{#
#} +{# #} +{#
#} +{#
#} +{##} +{##} +{##} +{#
#} \ No newline at end of file diff --git a/templates/forms/f_registration.html b/templates/forms/f_registration.html index ddc8474..7dc2a27 100644 --- a/templates/forms/f_registration.html +++ b/templates/forms/f_registration.html @@ -1,14 +1,15 @@ {% load i18n %} -{% trans "Имя" as p_name %} -{% trans "Фамилия" as p_lastname %} +{% trans "Имя *" as p_name %} +{% trans "Фамилия *" as p_lastname %} {% trans "Телефон" as p_tel %} -{% trans "Пароль" as p_password %} -{% trans "Подтвердить пароль" as p_con_password %} +{% trans "Пароль *" as p_password %} +{% trans "Подтвердить пароль *" as p_con_password %}

{% translate "Регистрация" %}

+
{% csrf_token %} - +
{% trans "Обязательные поля помечены значком *" %}
@@ -51,7 +52,7 @@ name="email" onkeydown = "hideErrors(this)" type="text" - placeholder="E-mail" + placeholder="E-mail *" id="registration_email_input" {% if form.data.email %} value="{{ form.data.email }}"{% endif %}> @@ -107,16 +108,16 @@
-
{% translate "Регистрируясь, я соглашаюсь с Лицензионным соглашениеми и Политикой конфиденциальности" %}
+
{% translate "Регистрируясь, я соглашаюсь с Лицензионным соглашениеми и Политикой конфиденциальности." %}
{% if form.errors and form.errors.agreement %} {{ form.errors.agreement }} {% endif %}
-
-
{% trans 'На Вашу почту отправлено письмо для подтверждения регистрации. Если не получили письмо, то проверьте папку СПАМ' %}
-
+
+
{% trans 'На Вашу почту отправлено письмо для подтверждения регистрации. Если не получили письмо, то проверьте папку СПАМ' %}
+
diff --git a/templates/inter/meta_OpenGraph.html b/templates/inter/meta_OpenGraph.html deleted file mode 100644 index d1aedc5..0000000 --- a/templates/inter/meta_OpenGraph.html +++ /dev/null @@ -1,42 +0,0 @@ - -{% if page.url == 'main' %} - - - -{% endif %} - - - - - -{% if page.url == 'about_service' and page.url == 'ru' %} - - - - - - - - - - - - -{% endif %} - -{% if page.url == 'about_service' and page.url == 'en' %} - - - - - - - - - - - - - - -{% endif %} \ No newline at end of file diff --git a/templates/inter/meta_OpenGraph_Schema.html b/templates/inter/meta_OpenGraph_Schema.html new file mode 100644 index 0000000..d668124 --- /dev/null +++ b/templates/inter/meta_OpenGraph_Schema.html @@ -0,0 +1,1018 @@ + +{% if page.url == 'main' and request.LANGUAGE_CODE == 'ru' %} + + + + + + + + + + + + + + + + + +{% endif %} + +{% if page.url == 'main' and request.LANGUAGE_CODE == 'en' %} + + + + + + + + + + + + + + + + + +{% endif %} + + + +{% if page_name == 'create_route_for_mover' and request.LANGUAGE_CODE == 'ru' %} + + + + + + + + + + + + + + + + + + +{% endif %} + +{% if page_name == 'create_route_for_mover' and request.LANGUAGE_CODE == 'en' %} + + + + + + + + + + + + + + + + + + + +{% endif %} + + + + +{% if page_name == 'create_route_for_customer' and request.LANGUAGE_CODE == 'ru' %} + + + + + + + + + + + + + + + + + + +{% endif %} + +{% if page_name == 'create_route_for_customer' and request.LANGUAGE_CODE == 'en' %} + + + + + + + + + + + + + + + + + + +{% endif %} + +{% if page.url == 'for_customers' and request.LANGUAGE_CODE == 'ru' %} + + + + + + + + + + + + + + + + +{% endif %} + + +{% if page.url == 'for_customers' and request.LANGUAGE_CODE == 'en' %} + + + + + + + + + + + + + + + + +{% endif %} + +{% if page.url == 'for_movers' and request.LANGUAGE_CODE == 'ru' %} + + + + + + + + + + + + + + + + + + +{% endif %} + +{% if page.url == 'for_movers' and request.LANGUAGE_CODE == 'en' %} + + + + + + + + + + + + + + + + + + +{% endif %} + +{% if page.url == 'about_service' and request.LANGUAGE_CODE == 'ru' %} + + + + + + + + + + + + + + + + + + +{% endif %} + + +{% if page.url == 'about_service' and request.LANGUAGE_CODE == 'en' %} + + + + + + + + + + + + + + + + + + +{% endif %} + +{% if articles and request.LANGUAGE_CODE == 'ru' and not page.url == 'main' %} + + + + + + + + + + + + + + + + + + + + +{% endif %} + + +{% if articles and request.LANGUAGE_CODE == 'en' and not page.url == 'main' %} + + + + + + + + + + + + + + + + + + +{% endif %} + + +{% if page.url == 'partners' and request.LANGUAGE_CODE == 'ru' %} + + + + + + + + + + + + + + + + + + +{% endif %} + +{% if page.url == 'partners' and request.LANGUAGE_CODE == 'en' %} + + + + + + + + + + + + + + + + + +{% endif %} + + +{% if page.url == 'advertisement' and request.LANGUAGE_CODE == 'ru' %} + + + + + + + + + + + + + + + + + + +{% endif %} + +{% if page.url == 'advertisement' and request.LANGUAGE_CODE == 'en' %} + + + + + + + + + + + + + + + + + + +{% endif %} + +{% if page.url == 'customer_service' and request.LANGUAGE_CODE == 'ru' %} + + + + + + + + + + + + + + + + + +{% endif %} + +{% if page.url == 'customer_service' and request.LANGUAGE_CODE == 'en' %} + + + + + + + + + + + + + + + + + +{% endif %} + +{% if page.url == 'contacts' and request.LANGUAGE_CODE == 'ru' %} + + + + + + + + + + + + + + + + + +{% endif %} + +{% if page.url == 'contacts' and request.LANGUAGE_CODE == 'en' %} + + + + + + + + + + + + + + + + + +{% endif %} \ No newline at end of file diff --git a/templates/mail/m_confirm_email.html b/templates/mail/m_confirm_email.html index a3858c0..38d76c8 100644 --- a/templates/mail/m_confirm_email.html +++ b/templates/mail/m_confirm_email.html @@ -6,7 +6,8 @@ >
- {{ project_name }} + +{# {{ project_name }}#}

- {{ project_name }} +{# {{ project_name }}#} +

- {{ project_name }} +{# {{ project_name }}#} +

- {{ project_name }} +{# {{ project_name }}#} +

- {{ project_name }} +{# {{ project_name }}#} +

{#

{% blocktrans %}Отправляй посылку в любую точку мира!{% endblocktrans %}
#} -

{% blocktrans %}Сервис по доставке и перевозке посылок TripWB{% endblocktrans %}

+

{% blocktrans %}Сервис попутных посылок TripWB{% endblocktrans %}

diff --git a/templates/pages/profile/p_password_recovery.html b/templates/pages/profile/p_password_recovery.html new file mode 100644 index 0000000..df11e9f --- /dev/null +++ b/templates/pages/profile/p_password_recovery.html @@ -0,0 +1,10 @@ +{% extends 'tb_base.html' %} +{% load static %} + +{% block meta %} + +{% endblock %} + +{% block content %} + {% include 'forms/f_password_recovery.html' %} +{% endblock %} \ No newline at end of file diff --git a/templates/tb_base.html b/templates/tb_base.html index cbfdae5..6d888e9 100644 --- a/templates/tb_base.html +++ b/templates/tb_base.html @@ -18,7 +18,7 @@ - {% include "inter/meta_OpenGraph.html" %} + {% include "inter/meta_OpenGraph_Schema.html" %}