From 8a539a2868430978994b09ec2799e8f3e421d26a Mon Sep 17 00:00:00 2001 From: ArtemB Date: Tue, 20 Aug 2024 12:18:52 +0300 Subject: [PATCH 01/45] 1.2.2 limitation of color selection for 24 hours TRI-228 --- templates/widgets/routes/w_my_route.html | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/templates/widgets/routes/w_my_route.html b/templates/widgets/routes/w_my_route.html index d121ffb..87c5122 100644 --- a/templates/widgets/routes/w_my_route.html +++ b/templates/widgets/routes/w_my_route.html @@ -1,15 +1,16 @@ {% load static %} {% load i18n %} - {% if route.departure_DT %} {% with current_datetime=route.from_city.get_current_datetime %} {% with departure_datetime=route.departure_DT %} - {% if current_datetime|date:"Y-m-d H:i:s" > departure_datetime|date:"Y-m-d H:i:s" %} -
- {% else %} -
- {% endif %} + {% with highlight_end_DT=route.highlight_end_DT %} + {% if current_datetime|date:"Y-m-d H:i:s" > departure_datetime|date:"Y-m-d H:i:s" %} +
+ {% else %} +
current_datetime|date:"Y-m-d H:i:s" %} highlight-color {% endif %}" data-number-of-route="{{ route.id }}"> + {% endif %} + {% endwith %} {% endwith %} {% endwith %} {% endif %} -- 2.20.1 From 83aeab93414e29b5be10727e82a898a428a978a8 Mon Sep 17 00:00:00 2001 From: ArtemB Date: Tue, 20 Aug 2024 13:27:29 +0300 Subject: [PATCH 02/45] 1.2.4 upd meta_OpenGraph_Schema.html TRI-200 --- static/js/dynamic_loading_routes.js | 2 +- templates/inter/meta_OpenGraph.html | 42 - templates/inter/meta_OpenGraph_Schema.html | 1018 ++++++++++++++++++++ templates/tb_base.html | 2 +- 4 files changed, 1020 insertions(+), 44 deletions(-) delete mode 100644 templates/inter/meta_OpenGraph.html create mode 100644 templates/inter/meta_OpenGraph_Schema.html 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/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/tb_base.html b/templates/tb_base.html index 8aacbdf..73ae945 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" %} +{% endblock %} + +{% block content %} + {% include 'forms/f_password_recovery.html' %} +{% endblock %} \ No newline at end of file -- 2.20.1 From acee0ccec5d2bbba286e71357783bc3c0292742b Mon Sep 17 00:00:00 2001 From: SDE Date: Fri, 20 Sep 2024 18:32:18 +0300 Subject: [PATCH 26/45] 1.7.1 password recovery --- AuthApp/js_views.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/AuthApp/js_views.py b/AuthApp/js_views.py index 58e5547..841797a 100644 --- a/AuthApp/js_views.py +++ b/AuthApp/js_views.py @@ -35,14 +35,14 @@ def password_recovery_confirm_ajax(request): if request.method != 'POST': raise Http404 - if not request.POST['pass'] or not request.POST['pass_confirm'] or not request.POST['user_id']: + 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 request.POST['pass'] != request.POST['pass_confirm']: + if not request.POST['pass'] or request.POST['pass'] != request.POST['pass_confirm']: return JsonResponse({ 'status': 'error', 'error': _('Пароли не совпадают') @@ -85,16 +85,17 @@ def password_recovery_ajax(request): 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') + subject = _('Изменение пароля учетной записи на сайте tripwb.com') mail_txt = _('Вы получили это письмо потому что ' - 'был произведен запрос на восстановление пароля ' + 'был произведен запрос на изменение пароля ' 'для данного email на сайте tripwb.com.
' '
' 'Если Вы не выполняли запрос - просто проигнорируйте это письмо.

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

') - link = sets["domain"] + f'reset_password/{str(user.id)}/{user.user_profile.authMailCode}/

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

' sign_txt = _('Спасибо за то, что вы с нами!
' 'С уважением,
' @@ -107,7 +108,7 @@ def password_recovery_ajax(request): 'message_text': f'

{_("ДАННЫЕ ЗАПРОСА")}

' f'

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

' } -- 2.20.1 From eaf94f0ceb578a1c2eca4b54778705fc41b9bb83 Mon Sep 17 00:00:00 2001 From: SDE Date: Fri, 20 Sep 2024 18:43:37 +0300 Subject: [PATCH 27/45] 1.7.2 password recovery --- AuthApp/js_views.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/AuthApp/js_views.py b/AuthApp/js_views.py index 841797a..541436a 100644 --- a/AuthApp/js_views.py +++ b/AuthApp/js_views.py @@ -50,6 +50,8 @@ def password_recovery_confirm_ajax(request): user = User.objects.get(id=request.POST['user_id']) user.set_password(request.POST['pass']) + user.user_profile.authMailCode = None + user.save() return JsonResponse({ 'status': 'success', @@ -94,7 +96,7 @@ def password_recovery_ajax(request): 'Если Вы не выполняли запрос - просто проигнорируйте это письмо.

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

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

' sign_txt = _('Спасибо за то, что вы с нами!
' @@ -105,8 +107,7 @@ def password_recovery_ajax(request): 'logo': f'{sets["domain"]}/static/img/svg/LogoMobile.svg', 'project_name': sets['project_name'], 'message_title': subject, - 'message_text': f'

{_("ДАННЫЕ ЗАПРОСА")}

' - f'

' + 'message_text': f'

' f'{mail_txt}' f'{link_str}' f'{sign_txt}' -- 2.20.1 From 92ad985355d4b4e541fd4fa1daad5efafa18306e Mon Sep 17 00:00:00 2001 From: SDE Date: Fri, 20 Sep 2024 18:51:53 +0300 Subject: [PATCH 28/45] 1.7.3 password recovery --- AuthApp/js_views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/AuthApp/js_views.py b/AuthApp/js_views.py index 541436a..f603030 100644 --- a/AuthApp/js_views.py +++ b/AuthApp/js_views.py @@ -51,6 +51,7 @@ def password_recovery_confirm_ajax(request): 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.save() return JsonResponse({ -- 2.20.1 From 86d78fdd06e9d4e7114f885f5aaf62c578cd1f98 Mon Sep 17 00:00:00 2001 From: SDE Date: Fri, 20 Sep 2024 20:41:42 +0300 Subject: [PATCH 29/45] 1.7.4 password recovery --- AuthApp/js_views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/AuthApp/js_views.py b/AuthApp/js_views.py index f603030..bfe0742 100644 --- a/AuthApp/js_views.py +++ b/AuthApp/js_views.py @@ -52,6 +52,7 @@ def password_recovery_confirm_ajax(request): 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({ -- 2.20.1 From b4beac26a71e7229323a172b5bc6625938839e0a Mon Sep 17 00:00:00 2001 From: ArtemB Date: Mon, 23 Sep 2024 16:02:27 +0300 Subject: [PATCH 30/45] 1.2.6 password recovery TRI-108 --- static/css/styles.css | 14 +++++++++----- static/js/authorization.js | 16 +++++++++------- static/js/user_profile.js | 4 ++-- templates/forms/f_login.html | 17 ++++++++++++----- templates/forms/f_password_recovery.html | 2 +- 5 files changed, 33 insertions(+), 20 deletions(-) diff --git a/static/css/styles.css b/static/css/styles.css index f1a5a3b..7dae002 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -1219,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 */ @@ -1231,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; @@ -3366,16 +3366,20 @@ details[open] summary ~ *{ /*END news articles all*/ -.login_form.hide{ +.login.hide{ display: none; } -.password_recovery{ +.recovery_pas{ display: none; } -.password_recovery.show{ +.recovery_pas.show{ display: block; } +.recovery.hide{ + display: none; +} + diff --git a/static/js/authorization.js b/static/js/authorization.js index da0a6c3..0c59dfe 100644 --- a/static/js/authorization.js +++ b/static/js/authorization.js @@ -9,6 +9,7 @@ function SendLoginForm(el){ let msr = sessionStorage.getItem('mailingSubscribeRequired') formData.set('mailingSubscribeRequired',msr) } + document.getElementsByClassName('recovery')[0].classList.add('hide') @@ -25,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/user_profile.js b/static/js/user_profile.js index 02fcba0..037a976 100644 --- a/static/js/user_profile.js +++ b/static/js/user_profile.js @@ -1396,8 +1396,8 @@ function showTabBtn(el) { } function showForm(){ - let hide_form = document.getElementsByClassName('login_form') - let show_form = document.getElementsByClassName('password_recovery') + 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 f035b5f..d46b8dc 100644 --- a/templates/forms/f_login.html +++ b/templates/forms/f_login.html @@ -5,9 +5,10 @@ {% trans "Пароль" as p_password %}

+ +
+

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

+ {% csrf_token %}
{% if form.username and form.errors.username %} {{ form.errors.username }} {% endif %} +{#
{% translate %}
#}
-
+
- \ No newline at end of file +
\ No newline at end of file diff --git a/templates/forms/f_password_recovery.html b/templates/forms/f_password_recovery.html index 6e19556..7071bef 100644 --- a/templates/forms/f_password_recovery.html +++ b/templates/forms/f_password_recovery.html @@ -4,7 +4,7 @@ {% trans "Подтвердить пароль *" as p_con_password %}
-

{% translate "Восстановление пароля" %}

+

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

Date: Mon, 23 Sep 2024 23:03:01 +0300 Subject: [PATCH 31/45] TRI-258 Replace logo in email templates --- templates/mail/m_confirm_email.html | 3 ++- templates/mail/m_found_matched_routes.html | 3 ++- templates/mail/m_registration.html | 3 ++- templates/mail/m_request_offer.html | 3 ++- templates/mail/m_user_subscribes_that_is_going_to_finish.html | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/templates/mail/m_confirm_email.html b/templates/mail/m_confirm_email.html index a3858c0..77f7086 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 }}#} +

{# {{ project_name }}#} - +

{# {{ project_name }}#} - +

{# {{ project_name }}#} - +

{# {{ project_name }}#} - +

{# {{ project_name }}#} - +

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

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

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

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

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

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

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

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

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

- + {# {{ project_name }}#}
-- 2.20.1 From 454f4711f3204c3ac3f60271b198202e6befe657 Mon Sep 17 00:00:00 2001 From: sysadminix Date: Mon, 23 Sep 2024 23:31:52 +0300 Subject: [PATCH 39/45] TRI-258 Replace logo in email templates --- templates/mail/m_confirm_email.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/mail/m_confirm_email.html b/templates/mail/m_confirm_email.html index 9805efb..128a418 100644 --- a/templates/mail/m_confirm_email.html +++ b/templates/mail/m_confirm_email.html @@ -6,8 +6,8 @@ >
- - + + {# {{ project_name }}#}
-- 2.20.1 From 44523987734d07a6d935db537e38a7b121d66d56 Mon Sep 17 00:00:00 2001 From: sysadminix Date: Mon, 23 Sep 2024 23:34:03 +0300 Subject: [PATCH 40/45] TRI-258 Replace logo in email templates --- templates/mail/m_confirm_email.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/templates/mail/m_confirm_email.html b/templates/mail/m_confirm_email.html index 128a418..38d76c8 100644 --- a/templates/mail/m_confirm_email.html +++ b/templates/mail/m_confirm_email.html @@ -6,9 +6,7 @@ >
- - {# {{ project_name }}#}

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

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

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

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

-

-
{% trans 'На Вашу почту отправлено письмо для подтверждения регистрации. Если не получили письмо, то проверьте папку СПАМ' %}
-
+
+
{% trans 'На Вашу почту отправлено письмо для подтверждения регистрации. Если не получили письмо, то проверьте папку СПАМ' %}
+
-- 2.20.1 From 393f16509598eafd33198a6eee60cf36010c89cd Mon Sep 17 00:00:00 2001 From: ArtemB Date: Tue, 24 Sep 2024 15:05:01 +0300 Subject: [PATCH 43/45] 1.3.0 get_routes in my_routes TRI-251 --- static/js/user_profile.js | 9 ++++++ templates/tb_base.html | 62 +++++++++++++++++++-------------------- 2 files changed, 40 insertions(+), 31 deletions(-) diff --git a/static/js/user_profile.js b/static/js/user_profile.js index 037a976..749c3d4 100644 --- a/static/js/user_profile.js +++ b/static/js/user_profile.js @@ -605,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); diff --git a/templates/tb_base.html b/templates/tb_base.html index 73ae945..ecdda0e 100644 --- a/templates/tb_base.html +++ b/templates/tb_base.html @@ -148,37 +148,37 @@ function gtag_report_conversion(url) { - +{# #}