initial login view work/template work (shmevhub) (bug 727546)

This commit is contained in:
Matt Claypotch 2012-02-17 12:31:10 -08:00
Родитель 8903f08dfd
Коммит 8ef230eca2
6 изменённых файлов: 53 добавлений и 2 удалений

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

@ -55,3 +55,4 @@
</section>
</div>
{% endblock content %}

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

@ -16,12 +16,14 @@
data-profile-form-url="{{ url('users.complete_profile_form') }}">
{{ loc('Log in / Register') }}
</a>
&nbsp;<a href="http://support.mozilla.org/en-US/kb/how-do-i-manage-my-browserid-account#w_how-do-i-reset-my-browserid-password">
{{ loc('forgot your password?') }}
</a>
<div class="user-message">
{% trans %}
Are you an <a href="#" id="show-normal-login">admin or editor</a>?
{% endtrans %}
</div>
</fieldset>
{% endif %}
<div class="login-option grid prettyform">

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

@ -0,0 +1,36 @@
{% extends 'developers/skeleton_impala.html' %}
{% block title %}{{ page_title(_('User Login')) }}{% endblock %}
{% block bodyclass %}login{% endblock %}
{% block js %}
{% if form.recaptcha %}
{% include("amo/recaptcha_js.html") %}
{% endif %}
{% endblock %}
{% block content %}
<div class="primary">
<section class="island hero primary grid {{ 'browserid' if waffle.switch('browserid-login') else 'prettyform' }}">
<h1>{{ _('Log In') }}</h1>
{# TODO(apps): Finalize copy. #}
<strong>Welcome to the Apps Developer Preview!</strong>
{% if registration_closed %}
<p>This is a demonstration of our app submission process, but <strong>we're currently at our maximum number of testers
and are not accepting any new registrations</strong>. To be notified of our progress, including any future tester openings,
subscribe to our Apps newsletter in our <a href="https://developer.mozilla.org/en-US/apps">documentation area</a>. Thanks for your interest!</p>
{% else %}
<p>If you'd like to try a demo of our app submission process, log in or register below with your <a href="https://browserid.org">BrowserID</a>
account. We're only accepting a limited number of registrations for this preview, but we encourage everyone interested in apps to
<a href="https://developer.mozilla.org/en-US/apps">read our documentation</a>.</p>
{% endif %}
<p><strong>Important</strong>: All submissions from this preview will be discarded before launch, and we expect final designs and flows to differ
significantly. We'd love to hear your <a href="http://groups.google.com/group/mozilla-apps">feedback</a>.</p>
{% include "users/login_form.html" %}
</section>
</div>
{% endblock content %}

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

@ -175,6 +175,9 @@ packager_patterns = patterns('',
urlpatterns = decorate(write, patterns('',
url('^$', views.index, name='mkt.developers.index'),
# Developer Registration Login.
url('^login/$', views.login, name='mkt.developers.login'),
# Redirect people who have /addons/ instead of /addon/.
('^addons/\d+/.*',
lambda r: redirect(r.path.replace('addons', 'addon', 1))),

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

@ -28,7 +28,8 @@ from applications.models import Application, AppVersion
import amo
import amo.utils
from amo import messages
from amo.decorators import json_view, login_required, post_required, write
from amo.decorators import (json_view, login_required, no_login_required,
post_required, write)
from amo.helpers import loc
from amo.utils import escape_all, HttpResponseSendFile
from amo.urlresolvers import reverse
@ -52,6 +53,7 @@ from search.views import BaseAjaxSearch
from stats.models import Contribution
from translations.models import delete_translation
from users.models import UserProfile
from users.views import _login
from versions.models import Version
from webapps.models import Webapp
from zadmin.models import ValidationResult
@ -93,6 +95,12 @@ def addon_listing(request, default='name', webapp=False):
return filter.qs, filter
@anonymous_csrf
@no_login_required
def login(request, template=None):
return _login(request, template='developers/login.html')
def index(request):
return jingo.render(request, 'developers/index.html')

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

@ -197,6 +197,7 @@ MINIFY_BUNDLES['js'].update({
'js/impala/forms.js',
# Login.
'js/zamboni/browserid_support.js',
'js/impala/login.js',
# Fix-up outgoing links.