adapt new csrf mechanism on newsletter page, fix design (bug 653474)

This commit is contained in:
James Long 2011-04-28 13:26:24 -04:00
Родитель 3db6569f73
Коммит 3c94670544
3 изменённых файлов: 8 добавлений и 22 удалений

Просмотреть файл

@ -1,18 +1,9 @@
{% extends "devhub/base.html" %}
{% block content %}
<h2>{{ _('about:addons Newsletter') }}</h2>
<p>
{% trans %}
about:addons is our monthly newsletter highlighting noteworthy
information and events in the world of add-ons. Take a look through
our archives below and sign up!
{% endtrans %}
</p>
<div class="newsletter-signup">
<h3>{{ _('Subscribe to Quarterly News') }}</h3>
<h2>{{ _('about:addons Newsletter') }}</h2>
<p>
{% trans %}
Enter your email address to subscribe to
@ -30,8 +21,8 @@
</ul>
<p>{{ newsletter_form.email }}</p>
<p>{{ _('Country') }} {{ newsletter_form.region }}</p>
<p>{{ _('Email format') }} {{ newsletter_form.format }}</p>
<p>{{ _('Country') }}:<br /> {{ newsletter_form.region }}</p>
<p>{{ _('Email format') }}: {{ newsletter_form.format }}</p>
<p>
{{ newsletter_form.policy }}
{% trans url='http://www.mozilla.com/privacy-policy' %}

Просмотреть файл

@ -22,6 +22,7 @@ import commonware.log
import jingo
import jinja2
from tower import ugettext_lazy as _lazy, ugettext as _
from session_csrf import anonymous_csrf
import amo
import amo.utils
@ -1109,6 +1110,7 @@ def admin(request, addon):
# Newsletter details & signup
@anonymous_csrf
def newsletter(request):
regions = get_regions(getattr(request, 'LANG', settings.LANGUAGE_CODE))
form = forms.NewsletterForm(request.POST or None,

Просмотреть файл

@ -1793,7 +1793,7 @@ form.select-review .errorlist {
content: "\00a0";
display: block;
position: absolute;
background: #040204 url("../../img/zamboni/loading.gif") no-repeat center center;;
background: #040204 url("../../img/zamboni/loading.gif") no-repeat center center;
opacity: .4;
margin: 0;
padding: 0;
@ -1811,16 +1811,9 @@ form.select-review .errorlist {
}
/* newsletter signup */
.newsletter-signup {
width: 240px;
padding: 15px 20px;
float: right;
background-color: #C8E8F3;
}
.newsletter-signup input[type="email"],
.newsletter-signup select {
width: 95%;
width: 30%;
}
.newsletter-signup input[type="submit"] {