initial login view work/template work (shmevhub) (bug 727546)
This commit is contained in:
Родитель
8903f08dfd
Коммит
8ef230eca2
|
@ -55,3 +55,4 @@
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|
||||||
|
|
|
@ -16,12 +16,14 @@
|
||||||
data-profile-form-url="{{ url('users.complete_profile_form') }}">
|
data-profile-form-url="{{ url('users.complete_profile_form') }}">
|
||||||
{{ loc('Log in / Register') }}
|
{{ loc('Log in / Register') }}
|
||||||
</a>
|
</a>
|
||||||
|
<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">
|
<div class="user-message">
|
||||||
{% trans %}
|
{% trans %}
|
||||||
Are you an <a href="#" id="show-normal-login">admin or editor</a>?
|
Are you an <a href="#" id="show-normal-login">admin or editor</a>?
|
||||||
{% endtrans %}
|
{% endtrans %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="login-option grid prettyform">
|
<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('',
|
urlpatterns = decorate(write, patterns('',
|
||||||
url('^$', views.index, name='mkt.developers.index'),
|
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/.
|
# Redirect people who have /addons/ instead of /addon/.
|
||||||
('^addons/\d+/.*',
|
('^addons/\d+/.*',
|
||||||
lambda r: redirect(r.path.replace('addons', 'addon', 1))),
|
lambda r: redirect(r.path.replace('addons', 'addon', 1))),
|
||||||
|
|
|
@ -28,7 +28,8 @@ from applications.models import Application, AppVersion
|
||||||
import amo
|
import amo
|
||||||
import amo.utils
|
import amo.utils
|
||||||
from amo import messages
|
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.helpers import loc
|
||||||
from amo.utils import escape_all, HttpResponseSendFile
|
from amo.utils import escape_all, HttpResponseSendFile
|
||||||
from amo.urlresolvers import reverse
|
from amo.urlresolvers import reverse
|
||||||
|
@ -52,6 +53,7 @@ from search.views import BaseAjaxSearch
|
||||||
from stats.models import Contribution
|
from stats.models import Contribution
|
||||||
from translations.models import delete_translation
|
from translations.models import delete_translation
|
||||||
from users.models import UserProfile
|
from users.models import UserProfile
|
||||||
|
from users.views import _login
|
||||||
from versions.models import Version
|
from versions.models import Version
|
||||||
from webapps.models import Webapp
|
from webapps.models import Webapp
|
||||||
from zadmin.models import ValidationResult
|
from zadmin.models import ValidationResult
|
||||||
|
@ -93,6 +95,12 @@ def addon_listing(request, default='name', webapp=False):
|
||||||
return filter.qs, filter
|
return filter.qs, filter
|
||||||
|
|
||||||
|
|
||||||
|
@anonymous_csrf
|
||||||
|
@no_login_required
|
||||||
|
def login(request, template=None):
|
||||||
|
return _login(request, template='developers/login.html')
|
||||||
|
|
||||||
|
|
||||||
def index(request):
|
def index(request):
|
||||||
return jingo.render(request, 'developers/index.html')
|
return jingo.render(request, 'developers/index.html')
|
||||||
|
|
||||||
|
|
|
@ -197,6 +197,7 @@ MINIFY_BUNDLES['js'].update({
|
||||||
'js/impala/forms.js',
|
'js/impala/forms.js',
|
||||||
|
|
||||||
# Login.
|
# Login.
|
||||||
|
'js/zamboni/browserid_support.js',
|
||||||
'js/impala/login.js',
|
'js/impala/login.js',
|
||||||
|
|
||||||
# Fix-up outgoing links.
|
# Fix-up outgoing links.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче