Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -19,7 +19,7 @@ from django.utils.translation import gettext_lazy as _
|
|||||||
|
|
||||||
class UserPageModel(BaseModelViewPage):
|
class UserPageModel(BaseModelViewPage):
|
||||||
# pub_DT = models.DateTimeField(verbose_name=u'Дата и время публикации', auto_created=True)
|
# pub_DT = models.DateTimeField(verbose_name=u'Дата и время публикации', auto_created=True)
|
||||||
text = RichTextUploadingField(verbose_name=u'Текст')
|
text = RichTextUploadingField(verbose_name=_('Текст'))
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name=_("Пользовательская страница")
|
verbose_name=_("Пользовательская страница")
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class Admin_ProfileInline(admin.StackedInline):
|
|||||||
'comment', 'creator'
|
'comment', 'creator'
|
||||||
)
|
)
|
||||||
}),
|
}),
|
||||||
('Дополнительно', {
|
(_('Дополнительно'), {
|
||||||
'classes': ['wide'],
|
'classes': ['wide'],
|
||||||
'fields': (
|
'fields': (
|
||||||
('json_data',)
|
('json_data',)
|
||||||
|
|||||||
@@ -27,4 +27,7 @@ urlpatterns = [
|
|||||||
path('change_profile/', change_profile_ajax, name='change_profile_ajax'),
|
path('change_profile/', change_profile_ajax, name='change_profile_ajax'),
|
||||||
path('change_profile_confirm/', change_profile_confirm_ajax, name='change_profile_confirm_ajax'),
|
path('change_profile_confirm/', change_profile_confirm_ajax, name='change_profile_confirm_ajax'),
|
||||||
path('change_avatar_confirm/', change_avatar_confirm_ajax, name='change_avatar_confirm_ajax'),
|
path('change_avatar_confirm/', change_avatar_confirm_ajax, name='change_avatar_confirm_ajax'),
|
||||||
|
|
||||||
|
path('request_offer/', request_offer_ajax, name='request_offer_ajax')
|
||||||
|
|
||||||
]
|
]
|
||||||
@@ -29,6 +29,57 @@ import base64
|
|||||||
# html = render_to_string('blocks/profile/b_subscribe.html', Dict, request=request)
|
# html = render_to_string('blocks/profile/b_subscribe.html', Dict, request=request)
|
||||||
# return JsonResponse({'html': html}, status=200)
|
# return JsonResponse({'html': html}, status=200)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def request_offer_ajax(request):
|
||||||
|
if request.method != 'POST':
|
||||||
|
raise Http404
|
||||||
|
|
||||||
|
data = request.POST
|
||||||
|
if not data and request.body:
|
||||||
|
data = request.body
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
|
request_type = None
|
||||||
|
subject = _('Получен запрос')
|
||||||
|
if 'form_name' in data:
|
||||||
|
if data['form_name'] == 'msg_from_advertisement':
|
||||||
|
subject = _('Получен запрос на рекламу')
|
||||||
|
request_type = _('запрос на рекламу')
|
||||||
|
|
||||||
|
if request_type:
|
||||||
|
request_type_str = f'<b>{_("Тип запроса")}:</b> {request_type}<br>'
|
||||||
|
else:
|
||||||
|
request_type_str = ''
|
||||||
|
|
||||||
|
Dict = {
|
||||||
|
'logo': f'{request.scheme}://{sets["domain"]}/static/img/svg/LogoMobile.svg',
|
||||||
|
'project_name': sets['project_name'],
|
||||||
|
'message_title': subject,
|
||||||
|
'message_text': f'<p><b>{_("ДАННЫЕ ЗАПРОСА")}</b></p>'
|
||||||
|
f'<p style="padding-left: 20px; line-height: 30px;">'
|
||||||
|
f'{request_type_str}'
|
||||||
|
f'<b>{_("Имя")}:</b> {data["name"]}<br>'
|
||||||
|
f'<b>{_("Телефон")}:</b> {data["phone"]}'
|
||||||
|
f'</p>'
|
||||||
|
}
|
||||||
|
|
||||||
|
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']
|
||||||
|
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'})
|
||||||
|
|
||||||
|
|
||||||
@login_required(login_url='/profile/login/')
|
@login_required(login_url='/profile/login/')
|
||||||
def chats_ajax(request):
|
def chats_ajax(request):
|
||||||
if request.method != 'POST':
|
if request.method != 'POST':
|
||||||
|
|||||||
@@ -37,14 +37,14 @@ def get_base_fieldsets():
|
|||||||
)
|
)
|
||||||
}],
|
}],
|
||||||
|
|
||||||
(u'Описание и текст', {
|
(_('Описание и текст'), {
|
||||||
'classes': ['wide', 'collapse'],
|
'classes': ['wide', 'collapse'],
|
||||||
'fields': (
|
'fields': (
|
||||||
'description', 'text',
|
'description', 'text',
|
||||||
)
|
)
|
||||||
}),
|
}),
|
||||||
|
|
||||||
(u'Промо ФОН', {
|
(_('Промо ФОН'), {
|
||||||
'classes': ['wide', 'collapse'],
|
'classes': ['wide', 'collapse'],
|
||||||
'fields': (
|
'fields': (
|
||||||
'background_promo_show', 'background_promo_inherits',
|
'background_promo_show', 'background_promo_inherits',
|
||||||
@@ -64,7 +64,7 @@ def get_base_fieldsets():
|
|||||||
)
|
)
|
||||||
}),
|
}),
|
||||||
|
|
||||||
(u'Партнерские ссылки', {
|
(_('Партнерские ссылки'), {
|
||||||
'classes': ['wide', 'collapse'],
|
'classes': ['wide', 'collapse'],
|
||||||
'fields': (
|
'fields': (
|
||||||
'link_left_promo_show',
|
'link_left_promo_show',
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ def admin_send_mail_by_SMTPlib(sets, subject, from_email, to, html_content, atta
|
|||||||
smtp_port = sets['mail_server_smtp_port']
|
smtp_port = sets['mail_server_smtp_port']
|
||||||
smtp_password = sets['sender_mail_password']
|
smtp_password = sets['sender_mail_password']
|
||||||
smtp_login = sets['sender_mail_login']
|
smtp_login = sets['sender_mail_login']
|
||||||
res = send_mail_by_SMTPlib(subject, from_email, to, html_content, smtp_server, smtp_port, smtp_login,
|
res = send_mail_by_SMTPlib(sets, subject, from_email, to, html_content, smtp_server, smtp_port, smtp_login,
|
||||||
smtp_password, attachments)
|
smtp_password, attachments)
|
||||||
|
|
||||||
|
|
||||||
@@ -106,14 +106,14 @@ def admin_send_mail_by_SMTPlib(sets, subject, from_email, to, html_content, atta
|
|||||||
def send_mail_by_SMTPlib(sets, subject, from_email, to_init, html_content, smtp_server, smtp_port, smtp_login, smtp_password,
|
def send_mail_by_SMTPlib(sets, subject, from_email, to_init, html_content, smtp_server, smtp_port, smtp_login, smtp_password,
|
||||||
attachments=None):
|
attachments=None):
|
||||||
to = to_init
|
to = to_init
|
||||||
if not settings.prod_server:
|
# if not settings.prod_server:
|
||||||
to = 'web@syncsystems.net'
|
# to = 'web@syncsystems.net'
|
||||||
else:
|
# else:
|
||||||
to = to_init
|
# to = to_init
|
||||||
try:
|
# try:
|
||||||
from settings_local import DEBUG
|
# from settings_local import DEBUG
|
||||||
except:
|
# except:
|
||||||
print('get settings_local fail')
|
# print('get settings_local fail')
|
||||||
|
|
||||||
res = None
|
res = None
|
||||||
mail_lib = None
|
mail_lib = None
|
||||||
@@ -153,8 +153,8 @@ def send_mail_by_SMTPlib(sets, subject, from_email, to_init, html_content, smtp_
|
|||||||
else:
|
else:
|
||||||
to_str = to[0]
|
to_str = to[0]
|
||||||
else:
|
else:
|
||||||
if to == sets['sender_email']:
|
# if to == sets['sender_email']:
|
||||||
return None
|
# return None
|
||||||
to_str = to
|
to_str = to
|
||||||
to = []
|
to = []
|
||||||
to.append(to_str)
|
to.append(to_str)
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
from sets.admin import *
|
from sets.admin import *
|
||||||
from .models import *
|
from .models import *
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
|
from django.utils.translation import gettext as _
|
||||||
|
|
||||||
class Admin_StaticPage(Admin_Trans_BaseModelViewPage):
|
class Admin_StaticPage(Admin_Trans_BaseModelViewPage):
|
||||||
|
|
||||||
@@ -14,7 +15,7 @@ class Admin_StaticPage(Admin_Trans_BaseModelViewPage):
|
|||||||
'order',
|
'order',
|
||||||
)
|
)
|
||||||
}),
|
}),
|
||||||
('Настройки', {
|
(_('Настройки'), {
|
||||||
'classes': ['wide', 'collapse'],
|
'classes': ['wide', 'collapse'],
|
||||||
'fields': (
|
'fields': (
|
||||||
'FAQ_title',
|
'FAQ_title',
|
||||||
@@ -51,34 +52,35 @@ class Admin_StaticPage(Admin_Trans_BaseModelViewPage):
|
|||||||
|
|
||||||
admin.site.register(StaticPage,Admin_StaticPage)
|
admin.site.register(StaticPage,Admin_StaticPage)
|
||||||
|
|
||||||
class Admin_Block(Admin_BaseBlock):
|
class Admin_Block(Admin_Trans_BaseModel):
|
||||||
|
pass
|
||||||
|
|
||||||
def get_fieldsets(self, request, obj=None):
|
# def get_fieldsets(self, request, obj=None):
|
||||||
fieldsets = super(type(self), self).get_fieldsets(request, obj)
|
# fieldsets = super(type(self), self).get_fieldsets(request, obj)
|
||||||
if not request.user.is_superuser and obj.name and obj.name in ('About US', 'machines', 'works'):
|
# if not request.user.is_superuser and obj.name and obj.name in ('About US', 'machines', 'works'):
|
||||||
fieldsets[0][1]['fields'].pop(0)
|
# fieldsets[0][1]['fields'].pop(0)
|
||||||
fieldsets.insert(
|
# fieldsets.insert(
|
||||||
1, ('Контент', {
|
# 1, (_('Контент'), {
|
||||||
'classes': ['wide'],
|
# 'classes': ['wide'],
|
||||||
'fields': (
|
# 'fields': (
|
||||||
'title', 'description', 'text',
|
# 'title', 'description', 'text',
|
||||||
'picture',
|
# 'picture',
|
||||||
)
|
# )
|
||||||
|
#
|
||||||
})
|
# })
|
||||||
)
|
# )
|
||||||
return fieldsets
|
# return fieldsets
|
||||||
|
#
|
||||||
def has_delete_permission(self, request, obj=None):
|
# def has_delete_permission(self, request, obj=None):
|
||||||
if request.user.is_superuser:
|
# if request.user.is_superuser:
|
||||||
return True
|
# return True
|
||||||
|
#
|
||||||
if obj.name in ('About US', 'machines', 'works'):
|
# if obj.name in ('About US', 'machines', 'works'):
|
||||||
return False
|
# return False
|
||||||
|
|
||||||
admin.site.register(Block,Admin_Block)
|
admin.site.register(Block,Admin_Block)
|
||||||
|
|
||||||
class Admin_Option(Admin_BaseModel):
|
class Admin_Option(Admin_Trans_BaseModel):
|
||||||
|
|
||||||
# def get_fieldsets(self, request, obj=None):
|
# def get_fieldsets(self, request, obj=None):
|
||||||
# fieldsets = super(type(self), self).get_fieldsets(request, obj)
|
# fieldsets = super(type(self), self).get_fieldsets(request, obj)
|
||||||
@@ -95,7 +97,7 @@ class Admin_Option(Admin_BaseModel):
|
|||||||
|
|
||||||
|
|
||||||
fieldsets = [
|
fieldsets = [
|
||||||
('Контент', {
|
(_('Контент'), {
|
||||||
'classes': ['wide'],
|
'classes': ['wide'],
|
||||||
'fields': (
|
'fields': (
|
||||||
'name', 'opt_type', 'prefix', 'value', 'picture'
|
'name', 'opt_type', 'prefix', 'value', 'picture'
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ def get_options_by_opt_types(opt_types, only_vals=False):
|
|||||||
|
|
||||||
opts = Option.objects.filter(**kwargs)
|
opts = Option.objects.filter(**kwargs)
|
||||||
if opts and only_vals:
|
if opts and only_vals:
|
||||||
opts = opts.values('name', 'value')
|
opts = opts.values('opt_type', 'value')
|
||||||
opts = {item['name']: item['value'] for item in opts}
|
opts = {item['opt_type']: item['value'] for item in opts}
|
||||||
return opts
|
return opts
|
||||||
|
|
||||||
def get_first_option_value_by_opt_type(opt_type):
|
def get_first_option_value_by_opt_type(opt_type):
|
||||||
|
|||||||
@@ -1,49 +1,50 @@
|
|||||||
from .models import *
|
from .models import *
|
||||||
|
from django.utils.translation import gettext as _
|
||||||
|
|
||||||
|
|
||||||
required_options_Dict = {
|
required_options_Dict = {
|
||||||
'Адрес почтового сервера': {
|
'Адрес почтового сервера': {
|
||||||
'name': 'Адрес почтового сервера',
|
'name_ru': 'Адрес почтового сервера',
|
||||||
'opt_type': 'mail_server_url',
|
'opt_type': 'mail_server_url',
|
||||||
'value': '213.142.147.40',
|
'value': '213.142.147.40',
|
||||||
},
|
},
|
||||||
'SMTP порт почтового сервера': {
|
'SMTP порт почтового сервера': {
|
||||||
'name': 'SMTP порт почтового сервера',
|
'name_ru': 'SMTP порт почтового сервера',
|
||||||
'opt_type': 'mail_server_smtp_port',
|
'opt_type': 'mail_server_smtp_port',
|
||||||
'value': 587,
|
'value': 587,
|
||||||
},
|
},
|
||||||
'login для отправки писем с сайта': {
|
'login для отправки писем с сайта': {
|
||||||
'name': 'email для отправки писем с сайта',
|
'name_ru': 'email для отправки писем с сайта',
|
||||||
'opt_type': 'sender_mail_login',
|
'opt_type': 'sender_mail_login',
|
||||||
'value': 'admin@tripwb.com',
|
'value': 'admin@tripwb.com',
|
||||||
},
|
},
|
||||||
'email для отправки': {
|
'email для отправки': {
|
||||||
'name': 'email для отправки',
|
'name_ru': 'email для отправки',
|
||||||
'opt_type': 'sender_email',
|
'opt_type': 'sender_email',
|
||||||
'value': 'admin@tripwb.com',
|
'value': 'admin@tripwb.com',
|
||||||
},
|
},
|
||||||
'Пароль для отправки писем с сайта': {
|
'Пароль для отправки писем с сайта': {
|
||||||
'name': 'пароль для отправки писем с сайта',
|
'name_ru': 'пароль для отправки писем с сайта',
|
||||||
'opt_type': 'sender_mail_password',
|
'opt_type': 'sender_mail_password',
|
||||||
'value': 't5Fdcah^gdajY',
|
'value': 't5Fdcah^gdajY',
|
||||||
},
|
},
|
||||||
'Название проекта': {
|
'Название проекта': {
|
||||||
'name': 'Название проекта',
|
'name_ru': 'Название проекта',
|
||||||
'opt_type': 'project_name',
|
'opt_type': 'project_name',
|
||||||
'value': 'TWB',
|
'value': 'TWB',
|
||||||
},
|
},
|
||||||
'Адрес сайта': {
|
'Адрес сайта': {
|
||||||
'name': 'Адрес сайта',
|
'name_ru': 'Адрес сайта',
|
||||||
'opt_type': 'domain',
|
'opt_type': 'domain',
|
||||||
'value': 'tripwb.com',
|
'value': 'tripwb.com',
|
||||||
},
|
},
|
||||||
'email техподдержки': {
|
'email техподдержки': {
|
||||||
'name': 'email техподдержки',
|
'name_ru': 'email техподдержки',
|
||||||
'opt_type': 'support_email',
|
'opt_type': 'support_email',
|
||||||
'value': 'admin@tripwb.com',
|
'value': 'admin@tripwb.com',
|
||||||
},
|
},
|
||||||
'корпоративный email': {
|
'корпоративный email': {
|
||||||
'name': 'корпоративный email',
|
'name_ru': 'корпоративный email',
|
||||||
'opt_type': 'corp_email',
|
'opt_type': 'corp_email',
|
||||||
'value': 'admin@tripwb.com',
|
'value': 'admin@tripwb.com',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
# Generated by Django 4.2.2 on 2023-11-30 13:42
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('GeneralApp', '0004_alter_block_description_alter_block_description_en_and_more'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='option',
|
||||||
|
name='name_en',
|
||||||
|
field=models.TextField(blank=True, help_text='Название', null=True, verbose_name='Название'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='option',
|
||||||
|
name='name_ru',
|
||||||
|
field=models.TextField(blank=True, help_text='Название', null=True, verbose_name='Название'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='option',
|
||||||
|
name='prefix_en',
|
||||||
|
field=models.CharField(blank=True, max_length=250, null=True, verbose_name='Префикс'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='option',
|
||||||
|
name='prefix_ru',
|
||||||
|
field=models.CharField(blank=True, max_length=250, null=True, verbose_name='Префикс'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='option',
|
||||||
|
name='value_en',
|
||||||
|
field=models.CharField(max_length=250, null=True, verbose_name='Значение'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='option',
|
||||||
|
name='value_ru',
|
||||||
|
field=models.CharField(max_length=250, null=True, verbose_name='Значение'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -14,6 +14,12 @@ class Block_TranslationOptions(TranslationOptions):
|
|||||||
)
|
)
|
||||||
translator.register(Block, Block_TranslationOptions)
|
translator.register(Block, Block_TranslationOptions)
|
||||||
|
|
||||||
|
class Option_TranslationOptions(TranslationOptions):
|
||||||
|
fields = (
|
||||||
|
'name', 'value', 'prefix'
|
||||||
|
)
|
||||||
|
translator.register(Option, Option_TranslationOptions)
|
||||||
|
|
||||||
|
|
||||||
class FAQitem_TranslationOptions(TranslationOptions):
|
class FAQitem_TranslationOptions(TranslationOptions):
|
||||||
fields = (
|
fields = (
|
||||||
|
|||||||
@@ -143,8 +143,10 @@ def find_routes_ajax(request):
|
|||||||
if 'errors' in routes_Dict:
|
if 'errors' in routes_Dict:
|
||||||
return JsonResponse(routes_Dict, status=400)
|
return JsonResponse(routes_Dict, status=400)
|
||||||
|
|
||||||
|
if routes_Dict['routes']:
|
||||||
html = render_to_string('blocks/b_search_routes.html', routes_Dict, request=request)
|
html = render_to_string('blocks/b_search_routes.html', routes_Dict, request=request)
|
||||||
|
else:
|
||||||
|
html = render_to_string('templates_js_translate/not_found_find_routes.html', routes_Dict, request=request)
|
||||||
|
|
||||||
res_Dict = {
|
res_Dict = {
|
||||||
'html': html,
|
'html': html,
|
||||||
@@ -240,6 +242,8 @@ def create_or_change_route_ajax(request, route_id=None):
|
|||||||
obj.owner = request.user
|
obj.owner = request.user
|
||||||
obj.save()
|
obj.save()
|
||||||
|
|
||||||
|
route_id = obj.id
|
||||||
|
|
||||||
routes_Dict = get_routes_Dict(request.user)
|
routes_Dict = get_routes_Dict(request.user)
|
||||||
|
|
||||||
if 'errors' in routes_Dict:
|
if 'errors' in routes_Dict:
|
||||||
|
|||||||
@@ -75,14 +75,14 @@ class Route(BaseModel):
|
|||||||
ordering = ('name',)
|
ordering = ('name',)
|
||||||
|
|
||||||
def from_country_n_city_str(self):
|
def from_country_n_city_str(self):
|
||||||
res = 'Неизвестно'
|
res = _('Неизвестно')
|
||||||
if self.from_city:
|
if self.from_city:
|
||||||
res = self.from_city.get_country_n_city_str()
|
res = self.from_city.get_country_n_city_str()
|
||||||
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def to_country_n_city_str(self):
|
def to_country_n_city_str(self):
|
||||||
res = 'Неизвестно'
|
res = _('Неизвестно')
|
||||||
if self.to_city:
|
if self.to_city:
|
||||||
res = self.to_city.get_country_n_city_str()
|
res = self.to_city.get_country_n_city_str()
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# Generated by Django 4.2.2 on 2023-11-30 13:42
|
||||||
|
|
||||||
|
import colorfield.fields
|
||||||
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('SubscribesApp', '0002_alter_subscribeoption_options_subscribe_bg_color_and_more'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='subscribe',
|
||||||
|
name='bg_color',
|
||||||
|
field=colorfield.fields.ColorField(default='#FFFFFF', image_field=None, max_length=25, samples=None, verbose_name='Цвет фона'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='subscribe',
|
||||||
|
name='text_color',
|
||||||
|
field=colorfield.fields.ColorField(default='#000000', image_field=None, max_length=25, samples=None, verbose_name='Цвет текста'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -2817,4 +2817,31 @@
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 19px;
|
left: 19px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn_a_anchor{
|
||||||
|
border-radius: 10px;
|
||||||
|
background: #E6E6E6;
|
||||||
|
width: 20%;
|
||||||
|
height: 60px;
|
||||||
|
font-size: 18px;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 600;
|
||||||
|
line-height: 26px;
|
||||||
|
color: rgba(39, 36, 36, 0.60);
|
||||||
|
margin-left: 5px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn_a_anchor.partners{
|
||||||
|
background: #FF613A;
|
||||||
|
color: #FFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text_in_btn_a_anchor{
|
||||||
|
padding-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.anchor{
|
||||||
|
scroll-margin-top: 60px;
|
||||||
}
|
}
|
||||||
@@ -1964,8 +1964,8 @@ button#more_button{
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.12);
|
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.12);
|
||||||
margin: 0 auto;
|
margin-left: 0;
|
||||||
|
margin-right: 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2203,23 +2203,26 @@ figure{
|
|||||||
text-align: -moz-center;
|
text-align: -moz-center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 40px;
|
margin-top: 40px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
#how_it_work_b{
|
/*#how_it_work_b{*/
|
||||||
border-radius: 10px;
|
/* border-radius: 10px;*/
|
||||||
background: #E6E6E6;
|
/* background: #E6E6E6;*/
|
||||||
width: 20%;
|
/* width: 20%;*/
|
||||||
height: 60px;
|
/* height: 60px;*/
|
||||||
font-size: 18px;
|
/* font-size: 18px;*/
|
||||||
font-style: normal;
|
/* font-style: normal;*/
|
||||||
font-weight: 600;
|
/* font-weight: 600;*/
|
||||||
line-height: 26px;
|
/* line-height: 26px;*/
|
||||||
color: rgba(39, 36, 36, 0.60);
|
/* color: rgba(39, 36, 36, 0.60);*/
|
||||||
margin-left: 5px;
|
/* margin-left: 5px;*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
/*}*/
|
||||||
|
|
||||||
.benefit_img_item{
|
.benefit_img_item{
|
||||||
width: 30%;
|
width: 30%;
|
||||||
|
|||||||
@@ -114,17 +114,9 @@ function ajax_for_filter (data_d,get_url){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (data.html === "\n\n\n\n\n"){
|
if (data.html.includes("not_found_routes")){
|
||||||
// document.querySelector(".block-finded-routes").innerHTML = "<span style='color: #ff0000;font-weight: 800;font-size: 18px;padding: 10px;'>Нечего не найдено!</span>"
|
// document.querySelector(".block-finded-routes").innerHTML = "<span style='color: #ff0000;font-weight: 800;font-size: 18px;padding: 10px;'>Нечего не найдено!</span>"
|
||||||
document.querySelector(".block-finded-routes").innerHTML = "<div class=\"not_found_routes show\">\n" +
|
document.querySelector(".block-finded-routes").innerHTML = data.html
|
||||||
" <div class=\"text-align-center fw-700 font-large c-txt-b2 m-a w-80 m-t-8p\">\n" +
|
|
||||||
" Упс... <span class=\"orange-text\">Ничего не найдено</span>, попробуйте\n" +
|
|
||||||
" изменить параметры поиска или оставьте заявку\n" +
|
|
||||||
" на перевозку посылки\n" +
|
|
||||||
" </div>\n" +
|
|
||||||
" <img class=\"boxes_not_fond_routes left\" src=\"/static/img/boxes_for_not_found_routes/b_1.svg\"\">\n" +
|
|
||||||
" <img class=\"boxes_not_fond_routes right\" src=\"/static/img/boxes_for_not_found_routes/b_2.svg\"\">\n" +
|
|
||||||
" </div>"
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -5,31 +5,6 @@
|
|||||||
// window.onfocus = function () {
|
// window.onfocus = function () {
|
||||||
// getSocketState()
|
// getSocketState()
|
||||||
// }
|
// }
|
||||||
let map_of_words_en = new Map([
|
|
||||||
['закрыть'],['Close']
|
|
||||||
])
|
|
||||||
let map_of_words_ru = new Map([
|
|
||||||
['close'],['Закрыть']
|
|
||||||
])
|
|
||||||
function translate_words (word,lang){
|
|
||||||
let corr_word = word.toLowersCase()
|
|
||||||
let trans_word = null
|
|
||||||
if (lang === 'ru'){
|
|
||||||
trans_word = map_of_words_ru.get(`${corr_word}`)
|
|
||||||
|
|
||||||
} else if (lang === 'en') {
|
|
||||||
trans_word = map_of_words_en.get(`${corr_word}`)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function check_return_trans_word (str) {
|
|
||||||
if (!str === undefined && str === '' && str){
|
|
||||||
return str
|
|
||||||
} else {
|
|
||||||
console.log(`error! str = ${str}`)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
window.onload = function (){
|
window.onload = function (){
|
||||||
middleWareJS()
|
middleWareJS()
|
||||||
|
|||||||
@@ -332,7 +332,9 @@ function selectItemAddrPoint(id, name, ctrl_name,){
|
|||||||
tap_txt_cont.setAttribute('title',name)
|
tap_txt_cont.setAttribute('title',name)
|
||||||
let tap_cont = document.querySelector("#id_" + ctrl_name.slice(0, -4));
|
let tap_cont = document.querySelector("#id_" + ctrl_name.slice(0, -4));
|
||||||
tap_cont.value = id;
|
tap_cont.value = id;
|
||||||
changeWidthEL(tap_txt_cont)
|
if (!window.location.href.includes("profile")){
|
||||||
|
changeWidthEL(tap_txt_cont)
|
||||||
|
}
|
||||||
input_list.classList.remove('show');
|
input_list.classList.remove('show');
|
||||||
if (document.querySelector(".container_form_search_carrier")){
|
if (document.querySelector(".container_form_search_carrier")){
|
||||||
document.querySelector(".container_form_search_carrier").style.zIndex = 'unset'
|
document.querySelector(".container_form_search_carrier").style.zIndex = 'unset'
|
||||||
@@ -522,15 +524,21 @@ function sendRoute(el, routeID = null){
|
|||||||
data: JSON.stringify(obj_w_el_form),
|
data: JSON.stringify(obj_w_el_form),
|
||||||
success: function(data){
|
success: function(data){
|
||||||
|
|
||||||
|
let data_route_id = data.route_id
|
||||||
// location.href = '/profile'
|
// location.href = '/profile'
|
||||||
document.querySelector(".info_profile").innerHTML = data.html
|
document.querySelector(".info_profile").innerHTML = data.html
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let el_route = document.querySelector(`[data-number-of-route="${routeID}"]`);
|
let el_route = document.querySelector(`[data-number-of-route="${data_route_id}"]`);
|
||||||
|
if (routeID){
|
||||||
el_route.scrollIntoView(true);
|
el_route = document.querySelector(`[data-number-of-route="${routeID}"]`);
|
||||||
|
}
|
||||||
|
el_route.scrollIntoView({
|
||||||
|
behavior:"smooth",
|
||||||
|
block:'start',
|
||||||
|
inline:'start'
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
{% if profileForm.errors.tel %}<div class="error_form_profile">{{ profileForm.errors.tel }}</div>{% endif %}
|
{% if profileForm.errors.tel %}<div class="error_form_profile">{{ profileForm.errors.tel }}</div>{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div class="container_el_form_profile">
|
<div class="container_el_form_profile">
|
||||||
<label class="label_f_profile" for="id_email">{% if profileForm.fields.email.required %}<span class="orange-text">*</span>{% endif %} Е-mail</label>
|
<label class="label_f_profile" for="id_email">{% if profileForm.fields.email.required %}<span class="orange-text">*</span>{% endif %} E-mail</label>
|
||||||
<input class="input_f_profile" type="text" id="id_email" name="email" {% if profileForm.initial.email %}value="{{ profileForm.initial.email }}" {% endif %} {% if profileForm.initial.email %}data-initial-value="{{ profileForm.initial.email }}"{% else %}data-initial-value=""{% endif %}>
|
<input class="input_f_profile" type="text" id="id_email" name="email" {% if profileForm.initial.email %}value="{{ profileForm.initial.email }}" {% endif %} {% if profileForm.initial.email %}data-initial-value="{{ profileForm.initial.email }}"{% else %}data-initial-value=""{% endif %}>
|
||||||
{% if profileForm.errors.email %}<div class="error_form_profile">{{ profileForm.errors.email }}</div>{% endif %}
|
{% if profileForm.errors.email %}<div class="error_form_profile">{{ profileForm.errors.email }}</div>{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8,7 +8,9 @@
|
|||||||
<div>
|
<div>
|
||||||
|
|
||||||
<div class="state_subscribe">
|
<div class="state_subscribe">
|
||||||
{% translate "У вас" %} <a>{% translate "не оформлена подписка" %}</a>
|
{% blocktranslate %}
|
||||||
|
У вас <a>не оформлена подписка</a>
|
||||||
|
{% endblocktranslate %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="state_subscribe">
|
<div class="state_subscribe">
|
||||||
|
|||||||
@@ -8,9 +8,9 @@
|
|||||||
<h2 id=title_static>{{ page.title }}</h2>
|
<h2 id=title_static>{{ page.title }}</h2>
|
||||||
<span id="sub_title_static">{{ page.description }}</span>
|
<span id="sub_title_static">{{ page.description }}</span>
|
||||||
<div class="button_container">
|
<div class="button_container">
|
||||||
<button
|
<a class="btn_a_anchor partners" href="#scroll_to_form" id="how_it_work_b">
|
||||||
onclick="document.location='#scroll_to_form'"
|
<div class="text_in_btn_a_anchor">{% translate "Узнать подробнее" %}</div>
|
||||||
id="more_button">{% translate "Узнать подробнее" %}</button>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="bottom_block_static" id="scroll_to_form">
|
<div class="bottom_block_static anchor" id="scroll_to_form">
|
||||||
<h2 id=title_static>{% translate "Стоимость" %}</h2>
|
<h2 id=title_static>{% translate "Стоимость" %}</h2>
|
||||||
<span id="sub_title_static">{% translate "Оставьте заявку и получите персональное коммерческое предложение" %}</span>
|
<span id="sub_title_static">{% translate "Оставьте заявку и получите персональное коммерческое предложение" %}</span>
|
||||||
|
|
||||||
|
|||||||
@@ -26,10 +26,9 @@
|
|||||||
id="more_button">{% translate "Перевезти посылку" %}</button>
|
id="more_button">{% translate "Перевезти посылку" %}</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<button
|
<a class="btn_a_anchor" href="#anchor_how_it_work" id="how_it_work_b">
|
||||||
onclick= "document.location='#anchor_how_it_work'"
|
<div class="text_in_btn_a_anchor">{% translate "Как это работает?" %}</div>
|
||||||
id="how_it_work_b">{% translate "Как это работает?" %}
|
</a>
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -55,7 +54,7 @@
|
|||||||
|
|
||||||
{% include "blocks/static_pages_blocks/b_benefit_img_about_service.html" %}
|
{% include "blocks/static_pages_blocks/b_benefit_img_about_service.html" %}
|
||||||
|
|
||||||
<div id="anchor_how_it_work"></div>
|
<div id="anchor_how_it_work" class="anchor"></div>
|
||||||
|
|
||||||
<div id="title_static"
|
<div id="title_static"
|
||||||
|
|
||||||
@@ -151,7 +150,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="options_subscribe">
|
<div class="options_subscribe">
|
||||||
<div class="options_subscribe_title light" style="color: {{ subscribe.text_color }}">
|
<div class="options_subscribe_title light" style="color: {{ subscribe.text_color }}">
|
||||||
Опции:
|
{% trans "Опции" %}:
|
||||||
</div>
|
</div>
|
||||||
<div class="list_options_subscribe">
|
<div class="list_options_subscribe">
|
||||||
<ul class="option_list">
|
<ul class="option_list">
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
|
|
||||||
<span id="sub_title_static">{{ page.description }}</span>
|
<span id="sub_title_static">{{ page.description }}</span>
|
||||||
<div class="button_container">
|
<div class="button_container">
|
||||||
<button
|
<a class="btn_a_anchor partners" href="#scroll_to_div" id="how_it_work_b">
|
||||||
onclick="document.location= '#scroll_to_div'"
|
<div class="text_in_btn_a_anchor">{% translate "Узнать подробнее" %}</div>
|
||||||
id="more_button">{% translate "Узнать подробнее" %}</button>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="scroll_to_div" class="bottom_block_static">
|
<div id="scroll_to_div" class="bottom_block_static anchor">
|
||||||
<div id=title_static >{% translate "Стань нашим партнером" %}</div>
|
<div id=title_static >{% translate "Стань нашим партнером" %}</div>
|
||||||
<span id="sub_title_static">{% translate "Оставь заявку и получи пресональное предложение о партнерстве" %}</span>
|
<span id="sub_title_static">{% translate "Оставь заявку и получи пресональное предложение о партнерстве" %}</span>
|
||||||
<form data-name="msg_from_partners">
|
<form data-name="msg_from_partners">
|
||||||
|
|||||||
65
templates/mail/m_request_offer.html
Normal file
65
templates/mail/m_request_offer.html
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
|
||||||
|
<div style="font-family:Calibri,Candara,Segoe,'Segoe UI',Optima,Arial,sans-serif; padding:10px; background-color: #F8F8F8;">
|
||||||
|
<div style="line-height:1.0em;width: 660px">
|
||||||
|
<div style="padding:5px; text-align: center;">
|
||||||
|
<img src="{{ logo }}" alt="{{ project_name }}" style="margin:0;padding:0;">
|
||||||
|
</div>
|
||||||
|
<p style="font-weight:700;font-size:25px;text-align:center;padding:0;line-height:1em; text-transform: uppercase; color: #ff613a;">
|
||||||
|
{{ message_title|safe }}
|
||||||
|
</p>
|
||||||
|
<div style="line-height:1.0em;font-size:18px;margin-top: 5px; margin-left: 30px; box-shadow: -1px 4px 10px 0 rgba(198, 199, 203, 0.20), 0 -1px 10px 0 rgba(198, 199, 203, 0.20); padding: 30px; border-radius: 10px; background-color: #FFF;">
|
||||||
|
{# <p style="line-height:1.0em;font-size:18px;margin-top: 5px; margin-left: 80px">#}
|
||||||
|
{{ message_text|safe }}
|
||||||
|
{# </p>#}
|
||||||
|
</div>
|
||||||
|
{% for button in message_buttons %}
|
||||||
|
<div style="text-align:center;font-weight: 700;">
|
||||||
|
<a href="{{ button.url }}">
|
||||||
|
<div style="display:inline-block;text-align:center;font-size:18px;padding:5px 10px;margin:5px;border-radius:2px;background-color:#61aeb6;color:#fff;text-decoration:none;line-height:1.0em;cursor:pointer">
|
||||||
|
{{ button.caption }}
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
|
<div style="text-align:center;width: 660px;line-height:1.1em">
|
||||||
|
<div style="margin: 40px 10px 10px;">
|
||||||
|
<hr>
|
||||||
|
{# <nobr><b>Адрес кафе:</b> Минск, ул. Будславская, 2</nobr>#}
|
||||||
|
{# <br>#}
|
||||||
|
{# <nobr><b>График работы:</b> пн-вс 12:00 - 24:00</nobr>#}
|
||||||
|
{# <br>#}
|
||||||
|
{# <nobr><b>Телефоны кафе:</b> +375 44 77 321 77</nobr>#}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="text-align: center;margin-top:5px">
|
||||||
|
{# <a href="https://baldenini.by/event/dostavka-edy" style="text-decoration: none;">#}
|
||||||
|
{# <div style="color: #311A12;#}
|
||||||
|
{# padding: 10px;#}
|
||||||
|
{# margin: 5px 10px 0 10px;#}
|
||||||
|
{# border: 2px solid #311A12;#}
|
||||||
|
{# border-radius: 5px;#}
|
||||||
|
{# font-size: 20px;#}
|
||||||
|
{# display: inline-block;#}
|
||||||
|
{# font-weight: 700;#}
|
||||||
|
{# text-transform: uppercase;">О ДОСТАВКЕ#}
|
||||||
|
{# </div>#}
|
||||||
|
{# </a>#}
|
||||||
|
{# <a href="https://baldenini.by/page/baldenini-cafe-o-nas" style="text-decoration: none;">#}
|
||||||
|
{# <div style="color: #311A12;#}
|
||||||
|
{# padding: 10px;#}
|
||||||
|
{# margin: 5px 10px 0 10px;#}
|
||||||
|
{# border: 2px solid #311A12;#}
|
||||||
|
{# border-radius: 5px;#}
|
||||||
|
{# font-size: 20px;#}
|
||||||
|
{# display: inline-block;#}
|
||||||
|
{# font-weight: 700;#}
|
||||||
|
{# text-transform: uppercase;">О BALDENINI CAFE#}
|
||||||
|
{# </div>#}
|
||||||
|
{# </a>#}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
<div class="news_item_static">
|
<div class="news_item_static">
|
||||||
|
|
||||||
<div class="news_img"><img src="{{ MEDIA_URL }} {{ page.picture }}" /></div>
|
<div class="news_img"><img src="{{ MEDIA_URL }}{{ page.picture }}" /></div>
|
||||||
<div class="news_header">{{ page.name }}</div>
|
<div class="news_header">{{ page.name }}</div>
|
||||||
<div class="news_description">
|
<div class="news_description">
|
||||||
{{ page.description|truncatechars:100 }}
|
{{ page.description|truncatechars:100 }}
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
{% load static %}
|
||||||
|
<div class="not_found_routes show">
|
||||||
|
<div class="text-align-center fw-700 font-large c-txt-b2 m-a w-80 m-t-8p">
|
||||||
|
Упс... <span class="orange-text">Ничего не найдено</span>, попробуйте
|
||||||
|
изменить параметры поиска
|
||||||
|
</div>
|
||||||
|
<img class="boxes_not_fond_routes left" src="{% static "img/boxes_for_not_found_routes/b_1.svg" %}">
|
||||||
|
<img class="boxes_not_fond_routes right" src="{% static "img/boxes_for_not_found_routes/b_2.svg" %}">
|
||||||
|
</div>
|
||||||
Reference in New Issue
Block a user