From 7b41841653bb6569d45064682396e4d99678add9 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Sun, 21 Aug 2016 22:06:28 +0300 Subject: [PATCH] Add temporary login and register pages Closes #1316 --- tests/functional/test_templates.py | 2 ++ warehouse/static/sass/base/_forms.scss | 4 ++++ warehouse/templates/accounts/login.html | 5 ++++- warehouse/templates/accounts/macros.html | 18 ++++++++++++++++++ warehouse/templates/accounts/register.html | 5 ++++- 5 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 warehouse/templates/accounts/macros.html diff --git a/tests/functional/test_templates.py b/tests/functional/test_templates.py index 95406da905c3..a2bc12d6c327 100644 --- a/tests/functional/test_templates.py +++ b/tests/functional/test_templates.py @@ -50,6 +50,8 @@ def test_templates_for_empty_titles(): continue for file_name in files: + if file_name == "macros.html": + continue if file_name.endswith(".html"): rel_dir = os.path.relpath(dir_, dir_name) rel_file = os.path.join(rel_dir, file_name) diff --git a/warehouse/static/sass/base/_forms.scss b/warehouse/static/sass/base/_forms.scss index 60e9deb7e325..e1fc5eb82d51 100644 --- a/warehouse/static/sass/base/_forms.scss +++ b/warehouse/static/sass/base/_forms.scss @@ -26,3 +26,7 @@ select:active { label { vertical-align: middle; } + +.hidden { + display: none; +} diff --git a/warehouse/templates/accounts/login.html b/warehouse/templates/accounts/login.html index f04f1efcb973..b09461bd57be 100644 --- a/warehouse/templates/accounts/login.html +++ b/warehouse/templates/accounts/login.html @@ -1,9 +1,12 @@ {% extends "base.html" %} +{% import "accounts/macros.html" as macros %} + {% block title %}Sign in{% endblock %} {% block content %} -
+ {{ macros.legacy_pypi_message("login_form") }} + {% if redirect.data %} diff --git a/warehouse/templates/accounts/macros.html b/warehouse/templates/accounts/macros.html new file mode 100644 index 000000000000..12d3367ca495 --- /dev/null +++ b/warehouse/templates/accounts/macros.html @@ -0,0 +1,18 @@ +{% macro legacy_pypi_message(action) -%} + {% set current_title = "Sign in" if action == "login_form" else "Register" %} +
+
+

{{ current_title }}

+

+ We're currently working on making the logged in pages on PyPI better. + If you'd like to see this happen sooner, please consider + contributing to Warehouse, + or making a donation (or asking + your company to make a donation) towards the ongoing development of the Warehouse project. +

+

+ {{current_title}} at pypi.python.org +

+
+
+{%- endmacro %} diff --git a/warehouse/templates/accounts/register.html b/warehouse/templates/accounts/register.html index 247fb9803d79..df283974c180 100644 --- a/warehouse/templates/accounts/register.html +++ b/warehouse/templates/accounts/register.html @@ -1,11 +1,14 @@ {% extends "base.html" %} +{% import "accounts/macros.html" as macros %} + {% block title %}Register{% endblock %} {%- from "warehouse:templates/includes/input-recaptcha.html" import recaptcha_html, recaptcha_src %} {% block content %} - + {{ macros.legacy_pypi_message("register_form") }} + {% include "warehouse:templates/includes/input-credentials.html" %}