Merge branch 'stage6' of bitbucket.org:Bonus_05/expomap into stage6

remotes/origin/stage6
ya_dim4ik 9 years ago
commit a06d85ca61
  1. 3
      accounts/views.py
  2. 24
      emencia/django/newsletter/models.py
  3. 4
      expobanner/admin.py
  4. 10
      fabfile.py
  5. 30
      functions/pipeline.py
  6. 30
      proj/forms.py
  7. 4
      proj/middleware.py
  8. 2
      registration/backends/default/views.py
  9. 7
      requirements.txt
  10. 1
      support/dev/settings.py
  11. 1
      support/prod/settings.py
  12. 45
      templates/c_admin/service/order_list.html
  13. 30
      templates/client/accounts/mailing_settings.html
  14. 10
      templates/client/accounts/settings.html
  15. 2
      templates/client/base_catalog.html
  16. 2
      templates/client/conference/conference_by.html
  17. 2
      templates/client/exposition/exposition_by.html
  18. 5
      templates/client/includes/header.html
  19. 2
      templates/client/includes/reverseorder_warning.html
  20. 19
      templates/client/includes/side_popular.html
  21. 6
      templates/client/popups/register.html
  22. 28
      templates/client/popups/unsubscribed.html
  23. 23
      templates/registration/acquire_email.html

@ -158,8 +158,7 @@ class MailingSettingsUnsubscribe(GetUserMixin, RedirectView):
if contact is None: if contact is None:
return HttpResponseForbidden() return HttpResponseForbidden()
if contact.subscriber: if contact.subscriber:
contact.subscriber = False contact.unsubscribe()
contact.save()
return super(MailingSettingsUnsubscribe, self).get(request, *args, **kwargs) return super(MailingSettingsUnsubscribe, self).get(request, *args, **kwargs)

@ -161,7 +161,7 @@ class Contact(models.Model):
periodic = models.PositiveSmallIntegerField(_(u'Периодичность отправки'), periodic = models.PositiveSmallIntegerField(_(u'Периодичность отправки'),
choices=PERIODIC_CHOICES, default=PERIODIC_CHOICES.WEEK) choices=PERIODIC_CHOICES, default=PERIODIC_CHOICES.WEEK)
periodic_day = models.PositiveSmallIntegerField(_(u'День отправки'), periodic_day = models.PositiveSmallIntegerField(_(u'День отправки'),
choices=PERIODIC_DAY_CHOICES, default=PERIODIC_DAY_CHOICES.MON) choices=PERIODIC_DAY_CHOICES, default=PERIODIC_DAY_CHOICES.WED)
content_news = models.BooleanField(_(u'Новости событий'), blank=True, default=True) content_news = models.BooleanField(_(u'Новости событий'), blank=True, default=True)
content_overview = models.BooleanField(_(u'Обзоры'), blank=True, default=True) content_overview = models.BooleanField(_(u'Обзоры'), blank=True, default=True)
content_articles = models.BooleanField(_(u'Статьи из блога по участию в вывставках'), blank=True, default=True) content_articles = models.BooleanField(_(u'Статьи из блога по участию в вывставках'), blank=True, default=True)
@ -178,6 +178,20 @@ class Contact(models.Model):
objects = ContactManager() objects = ContactManager()
def unsubscribe(self):
self.subscriber = False
self.moscow = False
self.russia = False
self.foreign = False
self.content_news = False
self.content_overview = False
self.content_articles = False
self.tags.clear()
self.themes.clear()
self.f_countries.clear()
self.r_cities.clear()
self.save()
def subscriptions(self): def subscriptions(self):
"""Return the user subscriptions""" """Return the user subscriptions"""
return MailingList.objects.filter(subscribers=self) return MailingList.objects.filter(subscribers=self)
@ -265,9 +279,11 @@ class Contact(models.Model):
if self.russia: if self.russia:
r_cities = set(self.r_cities.values_list('pk', flat=True)) r_cities = set(self.r_cities.values_list('pk', flat=True))
r_date = date + relativedelta.relativedelta(months=1) r_date = date + relativedelta.relativedelta(months=1)
russia_sqs = SearchQuerySet().models(Exposition, Conference)\ russia_sqs = SearchQuerySet().models(Exposition, Conference) \
.filter(country_id=Exact(settings.RUSSIA_PK), data_begin__gte=r_date)\ .filter(country_id=Exact(settings.RUSSIA_PK), data_begin__gte=r_date) \
.exclude(city_id=Exact(settings.MOSCOW_PK)) # .exclude(city_id=Exact(settings.MOSCOW_PK))
if r_cities or self.moscow:
russia_sqs = russia_sqs.exclude(city_id=Exact(settings.MOSCOW_PK))
if r_cities: if r_cities:
russia_sqs = russia_sqs.filter(city_id__in=r_cities) russia_sqs = russia_sqs.filter(city_id__in=r_cities)
if th_tg_filter is not None: if th_tg_filter is not None:

@ -4,6 +4,7 @@ from itertools import chain
from django.conf import settings from django.conf import settings
from django.core.urlresolvers import reverse_lazy from django.core.urlresolvers import reverse_lazy
from django.contrib import admin
from django.db.models import Q, Sum from django.db.models import Q, Sum
from django.http import HttpResponseRedirect from django.http import HttpResponseRedirect
from django.shortcuts import get_object_or_404 from django.shortcuts import get_object_or_404
@ -50,6 +51,9 @@ from settings.forms import CommentForm, HtmlForm, ParticipationCommentForm
from settings.models import Html, LandingComment, ParticipationComment from settings.models import Html, LandingComment, ParticipationComment
admin.site.register(BannerGroup)
class BannersControl(TemplateView): class BannersControl(TemplateView):
template_name = 'c_admin/expobanner/banners_control.html' template_name = 'c_admin/expobanner/banners_control.html'

10
fabfile.py vendored

@ -15,7 +15,7 @@ env.passwords = {
} }
REMOTE_HOME_DIR = '/home/www/expomap/' REMOTE_HOME_DIR = '/home/www/expomap/'
LOCAL_HOME_DIR = '/home/alexander/projects/expomap/' LOCAL_HOME_DIR = '/home/as/PycharmProjects/expomap/'
nginx_conf_tech = '/etc/nginx/sites-available/tech_work_hit.expomap.ru' nginx_conf_tech = '/etc/nginx/sites-available/tech_work_hit.expomap.ru'
nginx_conf = '/etc/nginx/sites-available/hit.expomap.ru' nginx_conf = '/etc/nginx/sites-available/hit.expomap.ru'
@ -86,14 +86,14 @@ def get_configs():
def put_configs(): def put_configs():
localdir = join(LOCAL_HOME_DIR, 'support/', env.role) localdir = join(LOCAL_HOME_DIR, 'support/', env.role)
# nginx # nginx
put(join(localdir, basename(nginx_conf)), # put(join(localdir, basename(nginx_conf)),
nginx_conf) # nginx_conf)
# # apache2 # # apache2
# put(join(localdir, basename(apache2_conf)), # put(join(localdir, basename(apache2_conf)),
# apache2_conf) # apache2_conf)
# settings # settings
# put(join(localdir, basename(settings_conf)), put(join(localdir, basename(settings_conf)),
# settings_conf) settings_conf)
def newsletters_media(): def newsletters_media():

@ -9,10 +9,11 @@ from django.contrib.sites.models import RequestSite, Site
from django.core import signing from django.core import signing
from django.core.mail import EmailMultiAlternatives from django.core.mail import EmailMultiAlternatives
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from django.shortcuts import redirect from django.shortcuts import redirect, render
from registration import signals from registration import signals
from registration.models import RegistrationProfile from registration.models import RegistrationProfile
from social.pipeline.partial import partial from social.pipeline.partial import partial
from proj.forms import EmailForm, AssociateForm
def random_pass(): def random_pass():
@ -60,18 +61,21 @@ def create_user(strategy, details, response, uid, user=None, *args, **kwargs):
def require_email(strategy, details, user=None, is_new=False, *args, **kwargs): def require_email(strategy, details, user=None, is_new=False, *args, **kwargs):
if user and user.email: if user and user.email:
return return
elif is_new and not details.get('email'): email = details.get('email')
email = strategy.request_data().get('email') if is_new and not email:
import pdb; pdb.set_trace() form = EmailForm(strategy.request.POST or None)
if not email: if strategy.request.method == "POST" and form.is_valid():
strategy.request.session['new_email'] = True email = form.cleaned_data.get('email')
return redirect('acquire_email') if not User.objects.filter(email=email).exists():
elif email and not User.objects.filter(email=email).exists(): details['email'] = email
details['email'] = email return {'email': email}
else: else:
strategy.request.session['new_email'] = True form = AssociateForm(strategy.request.POST or None)
strategy.request.session['new_email_invalid'] = True if form.is_valid() and form.user:
return redirect('acquire_email') details['email'] = email
return {'email': email, 'user': form.user}
return render(strategy.request, "registration/acquire_email.html", {'form': form})
return
def SendVerificationEmail(strategy, backend, code): def SendVerificationEmail(strategy, backend, code):

@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
from django import forms
from django.utils.translation import ugettext as _
from accounts.models import User
class EmailForm(forms.Form):
email = forms.EmailField(label=_(u'Email address'))
class AssociateForm(EmailForm):
_errors = {
'required': _(u'Данный email уже зарегистрирован. Авторизируйтесь чтобы привязать аккаунт.'),
'invalid': _(u'Неправильный логин или пароль.')
}
password = forms.CharField(label=_(u'Пароль'), widget=forms.PasswordInput(), error_messages=_errors)
def clean_password(self):
self.user = None
pw = self.cleaned_data.get('password')
if pw:
try:
self.user = User.objects.get(email=self.cleaned_data.get('email'))
except:
self.user = None
if self.user and not self.user.check_password(pw):
self.user = None
raise forms.ValidationError(self.fields['password'].error_messages['invalid'])
return pw

@ -66,8 +66,8 @@ class Referer(object):
request.session[attr2] = val request.session[attr2] = val
if userlog is not None: if userlog is not None:
setattr(userlog, attr2, val) setattr(userlog, attr2, val)
if not getattr(userlog, attr1): if not getattr(userlog, attr1):
setattr(userlog, attr1, val) setattr(userlog, attr1, val)
if not request.session.get(attr1): if not request.session.get(attr1):
request.session[attr1] = val request.session[attr1] = val
if userlog is not None: if userlog is not None:

@ -248,7 +248,7 @@ def LoginView(request):
return HttpResponse(json.dumps(response), content_type='application/json') return HttpResponse(json.dumps(response), content_type='application/json')
else: else:
HttpResponseRedirect('/') return HttpResponseRedirect('/')
def complete_registration(request): def complete_registration(request):

@ -51,3 +51,10 @@ vobject==0.8.2
wstools==0.4.3 wstools==0.4.3
xlrd==0.9.2 xlrd==0.9.2
xlwt==0.7.5 xlwt==0.7.5
rosetta
scipy
numpy
nltk
pandas
django-modeltranslation
suds

@ -332,6 +332,7 @@ INSTALLED_APPS = (
'emencia.django.newsletter', 'emencia.django.newsletter',
'accounts', 'accounts',
'article', 'article',
'comments',
'city', 'city',
'company', 'company',
'conference', 'conference',

@ -332,6 +332,7 @@ INSTALLED_APPS = (
'emencia.django.newsletter', 'emencia.django.newsletter',
'accounts', 'accounts',
'article', 'article',
'comments',
'city', 'city',
'company', 'company',
'conference', 'conference',

@ -1,4 +1,5 @@
{% extends 'base.html' %} {% extends 'base.html' %}
{% load i18n %}
{% block body %} {% block body %}
@ -18,17 +19,53 @@
</thead> </thead>
<tbody> <tbody>
{% for item in object_list %} {% for item in object_list %}
<tr> <tr>
<td>{{ item.id }}</td> <td>{{ item.id }}</td>
<td>{{ item.person_inf }}</td> <td>{{ item.person_inf }}</td>
<td>{{ item.phone }}</td> <td>{{ item.phone }}</td>
<td>{{ item.created }}</td> <td>{{ item.created }}</td>
</tr> </tr>
<tr style="display: none" class="addition">
<td>
{% trans "Первый переход" %}
<br>{% trans "Последний переход" %}
<br>{% trans "utm_source1" %}
<br>{% trans "utm_medium1" %}
<br>{% trans "utm_campaign1" %}
<br>{% trans "utm_source2" %}
<br>{% trans "utm_medium2" %}
<br>{% trans "utm_campaign2" %}
<br>{% trans "search1" %}
<br>{% trans "search2" %}
<br>{% trans "search3" %}
</td>
<td colspan="3">
{{ item.referer1 }}
<br>{{ item.referer2 }}
<br>{{ item.utm_source1 }}
<br>{{ item.utm_medium1 }}
<br>{{ item.utm_campaign1 }}
<br>{{ item.utm_source2 }}
<br>{{ item.utm_medium2 }}
<br>{{ item.utm_campaign2 }}
<br>{{ item.search1 }}
<br>{{ item.search2 }}
<br>{{ item.search3 }}
</td>
</tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
</div> </div>
<script type="application/javascript">
$(document).ready(function () {
$('div.box-content table tr:not(.addition)').click(function () {
$(this).next().toggle();
})
});
</script>
{% include 'c_admin/includes/admin_pagination.html' with page_obj=page_obj %} {% include 'c_admin/includes/admin_pagination.html' with page_obj=page_obj %}
</div> </div>
{# pagination #} {# pagination #}

@ -10,6 +10,7 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/malihu-custom-scrollbar-plugin/3.1.5/jquery.mCustomScrollbar.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/malihu-custom-scrollbar-plugin/3.1.5/jquery.mCustomScrollbar.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
<link rel="stylesheet" href="{% static 'mailing_settings/css/main.css' %}"> <link rel="stylesheet" href="{% static 'mailing_settings/css/main.css' %}">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js" defer></script>
</head> </head>
<body> <body>
@ -17,23 +18,17 @@
<div class="container"> <div class="container">
<div class="logo_block"> <div class="logo_block">
<a href="/"><img src="{% static 'mailing_settings/images/logo.png' %}" alt="Expomap"></a> <a href="/"><img src="{% static 'mailing_settings/images/logo.png' %}" alt="Expomap"></a>
<a href="#" class="back_to_site">expomap.ru <span>&#8250;</span></a> <a href="/" class="back_to_site">expomap.ru <span>&#8250;</span></a>
</div> </div>
<h1>{% trans 'Настройте рассылку от Expomap' %}</h1> <h1>{% trans 'Настройте рассылку от Expomap' %}</h1>
</div> </div>
</header> </header>
{% if not object.subscriber %}
<div class="reversed" style="border-left: 5px solid #ff9900; padding: 8px 12px; background-color: #fff; font-size:17px; text-align: justify; margin-bottom: 10px">
{% trans "Вы не являетесь подписчиком. Чтобы подписаться, выберите интересующие Вас данные." %}
</div>
{% endif %}
<form action="." method="post" id="mailing_settings_form"> <form action="." method="post" id="mailing_settings_form">
{% csrf_token %} {% csrf_token %}
<div class="themes_block"> <div class="themes_block">
<div class="container"> <div class="container">
<h2>{% trans 'Какие письма вы хотите получать от нас?' %}</h2> <h2>{% trans 'Какие события включать в Ваше письмо?' %}</h2>
<div class="columns"> <div class="columns">
<div class="column"> <div class="column">
@ -107,16 +102,19 @@
<div class="column"> <div class="column">
{{ form.content_news }} {{ form.content_news }}
{{ form.content_news.label_tag }} {{ form.content_news.label_tag }}
<br>{% trans "Получайте новости выставок и конференций по выбранным тематикам" %}
</div> </div>
<div class="column"> <div class="column">
{{ form.content_overview }} {{ form.content_overview }}
{{ form.content_overview.label_tag }} {{ form.content_overview.label_tag }}
<br>{% trans "Практические материалы, интервью, кейсы, которые помогут эффективно участвовать в выставках" %}
</div> </div>
<div class="column"> <div class="column">
{{ form.content_articles }} {{ form.content_articles }}
{{ form.content_articles.label_tag }} {{ form.content_articles.label_tag }}
<br>{% trans "Блог о том, как создавать и продвигать крутые event`ы" %}
</div> </div>
</div> </div>
</div> </div>
@ -179,9 +177,12 @@
<div id="countries_modal"> <div id="countries_modal">
{% include 'client/popups/mailing_settings_countries.html' %} {% include 'client/popups/mailing_settings_countries.html' %}
</div> </div>
<div id="unsibscribed_modal">
{% include 'client/popups/unsubscribed.html' %}
</div>
</div> </div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.4/jquery.fancybox.pack.min.js" defer></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.4/jquery.fancybox.pack.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/malihu-custom-scrollbar-plugin/3.1.5/jquery.mCustomScrollbar.min.js" defer></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/malihu-custom-scrollbar-plugin/3.1.5/jquery.mCustomScrollbar.min.js" defer></script>
<script type="application/javascript"> <script type="application/javascript">
@ -213,6 +214,17 @@
// }; // };
</script> </script>
<script src="{% static 'mailing_settings/js/main.js' %}" defer></script> <script src="{% static 'mailing_settings/js/main.js' %}" defer></script>
{% if not object.subscriber %}
<script>
$(document).ready(function() {
var popupUnsibscribed = $('#unsibscribed');
$.fancybox(popupUnsibscribed, fbPopupOptions);
});
</script>
{# <div class="reversed" style="border-left: 5px solid #ff9900; padding: 8px 12px; background-color: #fff; font-size:17px; text-align: justify; margin-bottom: 10px">#}
{# {% trans "Вы не являетесь подписчиком. Чтобы подписаться, выберите интересующие Вас данные." %}#}
{# </div>#}
{% endif %}
</body> </body>
</html> </html>

@ -112,10 +112,10 @@
</div> </div>
</div> </div>
--> -->
<div class="set-sect subscribe"> {# <div class="set-sect subscribe">#}
<header>{% trans 'настройка подписки' %}</header> {# <header>{% trans 'настройка подписки' %}</header>#}
<a href="{% url 'accounts-mailing_settings' %}" >{% trans 'Перейти к настройке' %}</a> {# <a href="{% url 'accounts-mailing_settings' %}" >{% trans 'Перейти к настройке' %}</a>#}
<span><img style="margin-right: -2px; margin-bottom: 4px;" src="{% static 'img/announce-letter.png' %}"></span> {# <span><img style="margin-right: -2px; margin-bottom: 4px;" src="{% static 'img/announce-letter.png' %}"></span>#}
{% comment %} {% comment %}
<div class="set-sect-body"> <div class="set-sect-body">
<form action="." method="post"> <form action="." method="post">
@ -194,7 +194,7 @@
</div> </div>
{% endcomment %} {% endcomment %}
</div> {# </div>#}
{% block scripts %} {% block scripts %}
<script> <script>

@ -36,7 +36,7 @@
{% include 'client/includes/announces.html' %} {% include 'client/includes/announces.html' %}
{% include 'client/includes/side_popular.html' %} {# {% include 'client/includes/side_popular.html' %}#}
{% include 'client/includes/side_confs.html' %} {% include 'client/includes/side_confs.html' %}

@ -23,6 +23,8 @@
{% endblock %} {% endblock %}
{% block content_list %} {% block content_list %}
{% include 'client/includes/side_popular.html' %}
{% for obj in object_list %} {% for obj in object_list %}
{% set cur_word = obj.name %} {% set cur_word = obj.name %}
{% if cur_word|slice:":1"|lower != prev_word|slice:":1"|lower and forloop.counter != 1 %} {% if cur_word|slice:":1"|lower != prev_word|slice:":1"|lower and forloop.counter != 1 %}

@ -23,6 +23,8 @@
{% endblock %} {% endblock %}
{% block content_list %} {% block content_list %}
{% include 'client/includes/side_popular.html' %}
{% with objects=object_list %} {% with objects=object_list %}
{% for obj in objects %} {% for obj in objects %}
{% set cur_word = obj.name %} {% set cur_word = obj.name %}

@ -78,7 +78,10 @@
<a class="cl-btn icon-cal" href="{% url 'account_calendar' %}">{% trans 'календарь' %}</a> <a class="cl-btn icon-cal" href="{% url 'account_calendar' %}">{% trans 'календарь' %}</a>
<a class="cl-btn icon-doc" href="/profile/feed/">{% trans 'документы' %}</a> <a class="cl-btn icon-doc" href="/profile/feed/">{% trans 'документы' %}</a>
</div> </div>
<div class="clb-messages"><a class="icon-msg" href="/profile/messages/">{% if messages_inbox_count %} {{ messages_inbox_count }} {% endif %}</a></div> <div class="clb-messages">
<a class="icon-msg" style="float: left;" href="/profile/messages/">{% if messages_inbox_count %} {{ messages_inbox_count }} {% endif %}</a>
<a href="{% url 'accounts-mailing_settings' %}" style="font-size: 18px" target="_blank">@</a>
</div>
<div class="clb-settings"> <div class="clb-settings">
<a class="cl-btn icon-gear" href="/profile/settings/">{% trans 'настройки' %}</a> <a class="cl-btn icon-gear" href="/profile/settings/">{% trans 'настройки' %}</a>
</div> </div>

@ -1,5 +1,5 @@
{% load i18n %} {% load i18n %}
<div class="reversed" style="border-left: 5px solid #ff9900; padding: 8px 12px; background-color: #fff; font-size:17px; text-align: justify; margin-bottom: 10px">{% trans "Выставки по указанным параметрам не найдены. Попробуйте упростить параметры или расширить временные рамки. Также Вы можете посмотреть уже прошедшие события и проверить самостоятельно, будут ли они проходить в будущем." %}</div> <div class="reversed" style="border-left: 5px solid #ff9900; padding: 8px 12px; background-color: #fff; font-size:17px; text-align: justify; margin-bottom: 10px">{% trans "Выставки по указанным параметрам не найдены. Попробуйте упростить параметры или расширить временные рамки. Также, вы можете посмотреть уже прошедшие события и проверить самостоятельно, будут ли они проходить в будущем." %}</div>
<div class="page-title"> <div class="page-title">
<h2 style="font-size:30px;">{% trans "Прошедшие события" %}</h2> <h2 style="font-size:30px;">{% trans "Прошедшие события" %}</h2>
</div> </div>

@ -1,14 +1,15 @@
{% load i18n %} {% load i18n %}
{% if side_popular %} {% if side_popular %}
<div class="mps-sect"> {# <div class="mps-sect">#}
<header style="font-size: 23px;">{% trans 'Самые популярные' %}</header> {# <header style="font-size: 23px;">{% trans 'Самые популярные' %}</header>#}
<nav> {# <nav>#}
<ul> <ul class="leter-list">
{% for obj in side_popular %} <li class="leter" style="font-size: 24px">{% trans 'Самые популярные' %}</li>
<li><a href="{{ obj.url }}">{{ obj.name }}</a></li> {% for obj in side_popular %}
{% endfor %} <li><a href="{{ obj.url }}">{{ obj.name }}</a></li>
{% endfor %}
</ul> </ul>
</nav> {# </nav>#}
</div> {# </div>#}
{% endif %} {% endif %}

@ -42,9 +42,9 @@
<div class="pwf-msg"><div class="msg-help">{% trans 'пароль должен иметь не меньше 6 символов' %}</div></div> <div class="pwf-msg"><div class="msg-help">{% trans 'пароль должен иметь не меньше 6 символов' %}</div></div>
</div> </div>
<div class="pwf-buttons-line pwf-line"> <a href="{% url 'termsofuse' %}" style="color:#a2a2a2;">{% trans "Пользовательское соглашение" %}</a>
<div class="pwf-field"> <div class="pwf-buttons-line pwf-line" style="margin-top: 12px;">
<a href="{% url 'termsofuse' %}" style="color:#a2a2a2;">{% trans "Пользовательское соглашение" %}</a> <div class="pwf-field">
<button type="submit" class="icon-check">{% trans 'Зарегистрироваться' %}</button> <button type="submit" class="icon-check">{% trans 'Зарегистрироваться' %}</button>
</div> </div>
<div class="pwf-msg err-message-box pd-top-14 red"> {% trans "Ошибка" %}</div> <div class="pwf-msg err-message-box pd-top-14 red"> {% trans "Ошибка" %}</div>

@ -0,0 +1,28 @@
{% load static %}
{% load i18n %}
{% load template_filters %}
<div id="unsibscribed" class="popup-window unsibscribed">
<header>
<div class="title">{% trans 'Вы отписались от нашей рассылки' %}</div>
</header>
<div class="body">
<div class="themes_wrapper">
<div class="scroll-container">
<div class="scroll-content">
<div class="topics-list">
{% trans "Мы расстроены, но отписали Вас от всех писем. Надеемся, в скором времени вы снова захотите быть в курсе событий своей отрасли." %}
</div>
</div>
</div>
<div class="wait-ajax"></div>
</div>
{# <div class="buttons_block">#}
{# <button class="modal-approve" type="button">{% trans 'Выбрать' %}</button>#}
{# <button class="modal-clear" type="button">{% trans 'Очистить' %}</button>#}
{# </div>#}
</div>
</div>

@ -6,21 +6,22 @@
{% block page_body %} {% block page_body %}
<h1>{% trans "Enter your email" %}</h1> <h1>{% trans "Enter your email" %}</h1>
<div cl>
</div>
{% if form.errors %} {% if form.errors %}
<p class="error">{% trans "Please correct the errors below:" %}</p> <p class="error">{% trans "Please correct the errors below:" %}</p>
{% endif %} {% endif %}
<form class="form-inline" action="{% url "social:complete" backend=backend %}" method="post" role="form">{% csrf_token %} {# {% url "social:complete" backend=backend %}#}
<div class="form-group"> <form class="form-inline" action="." method="post" role="form">{% csrf_token %}
<div class="input-group"> {% for field in form %}
<label class="control-label" for="id_email">{% trans "Email address:" %}</label> <div class="control-group {% if field.errors %}error{% endif %}">
<input class="form-control" id="id_email" type="email" name="email" placeholder="E-mail"/> <label class="control-label"><b>{{ field.label }}:</b></label>
{# <input type="hidden" name="valid" value="no">#} <div class="controls">{{ field }}
{% if invalid %} <span class="help-inline">{{ field.errors }}</span>
{% trans "Такой Email уже существует." %} </div>
{% endif %}
</div> </div>
</div> {% endfor %}
<button class="btn btn-default" type="submit">{% trans "Submit" %}</button> <button class="btn btn-default" type="submit">{% trans "Submit" %}</button>
</form> </form>

Loading…
Cancel
Save