Update login (and ajax login), and registration pages
authorrougeronj
Wed, 10 Dec 2014 11:34:54 +0100
changeset 384 83adb3fd0efd
parent 380 58bc48201d0e
child 385 b9fa11411e13
Update login (and ajax login), and registration pages
src/hdalab/static/hdalab/css/login.css
src/hdalab/templates/ajax_identification/ajax_login.html
src/hdalab/templates/registration/activate.html
src/hdalab/templates/registration/activation_complete.html
src/hdalab/templates/registration/login.html
src/hdalab/templates/registration/password_change_done.html
src/hdalab/templates/registration/password_change_form.html
src/hdalab/templates/registration/password_reset_complete.html
src/hdalab/templates/registration/password_reset_confirm.html
src/hdalab/templates/registration/password_reset_done.html
src/hdalab/templates/registration/password_reset_form.html
src/hdalab/templates/registration/registration_complete.html
src/hdalab/templates/registration/registration_form.html
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/hdalab/static/hdalab/css/login.css	Wed Dec 10 11:34:54 2014 +0100
@@ -0,0 +1,94 @@
+.register{
+  width: 500px;
+  padding: 10px;
+  background-color: rgb(230, 230, 230);
+  border-radius: 2px;
+  margin: auto;
+}
+.register p {
+  color: #4f5451;
+  font-size: 14px;
+  font-size: 1.4rem;
+  margin: 10px 30px;
+  clear: right;
+}
+.register label{
+  font-size: 14px;
+  font-size: 1.4rem;
+  line-height: 3.4;	
+}
+.register .error input, .register .error select {
+    border: 2px red solid;
+}
+.register input[type="text"],
+.register input[type="password"],
+.register input[type="email"] {
+/*   background-color: rgba(255, 255, 255, 0.90); */
+  border:0;
+  box-sizing: border-box;
+  color: #4f5451;
+  font-size: 12px;
+  font-size: 1.2rem;
+  font-weight: 300;
+  height: 50px;
+  padding: 0 20px;
+  width: 100%;
+  border-radius: 2px;
+}
+.register input[type="text"]:focus,
+.register input[type="password"]:focus,
+.register input[type="email"]:focus {
+	background-color: rgba(255, 255, 255, 1);
+	border:1px solid #7cb0bd;
+}
+.register input[type="submit"] {
+  content: " ";
+  height: 30px;
+  border: 0;
+  color: #fff;
+  font-size: 14px;
+  font-size: 1.4rem;
+  font-weight: 300;
+  background-color: #7cb0bd;
+  border-radius: 2px;
+  transition: background-color 0.3s ease;
+  cursor:pointer;
+  margin: 10px 0;
+/*   float: right; */
+}
+.register input[type="submit"]:hover {
+  background-color: #4f5451;
+}
+
+.register h1:before{
+	content: "/ ";
+}
+
+.register h1{
+	margin: 10px 19px;
+}
+
+.register .btn-submit{
+	text-align: right;
+}
+
+.btn-previous{
+	margin-right:10px;
+}
+
+/* MODAL POPUP */
+
+.ui-dialog {
+	border:none;
+	border-radius:0px;
+	box-shadow: 5px 5px 5px 0px rgba(0,0,0,0.5);
+}
+
+.ui-dialog-titlebar-close,
+.ui-dialog-titlebar{
+	display:none;
+}
+
+.ui-dialog .ui-dialog-content {
+	padding:0;
+}
\ No newline at end of file
--- a/src/hdalab/templates/ajax_identification/ajax_login.html	Mon Dec 01 10:34:53 2014 +0100
+++ b/src/hdalab/templates/ajax_identification/ajax_login.html	Wed Dec 10 11:34:54 2014 +0100
@@ -1,16 +1,28 @@
+{% load static %}
 {% load i18n %}
+
+<link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/login.css' %}" />
+
 <div class="register">
-    {% if form.errors %}
-    <p class="error">{% trans "Sorry, that's not a valid username or password." %}</p>
-    {% endif %}
-    <form action="{% url 'ajax_login' %}" method='post' id="login-form">
-        {% csrf_token %}
-        <input type="hidden" name="next" value="{% url 'ajax_login_ok' %}" />
-        {{form.as_p}}
-        <button class="button" type="submit" value="login">{% trans "login" %}</button>
-    </form>
-    <p>&nbsp;</p>
-    <p><a target="_blank" href="{% url 'registration_register' %}">{% trans "Still not a user ? Create an account" %}</a>
-    <p><a target="_blank" href="{% url 'auth_password_reset' %}">{% trans "Forgot password ?" %}</a>
+	<h1>{% trans "Identifiants" %}</h1>
+	{% if form.errors %}
+		<p class="error">{% trans "Sorry, that's not a valid username or password." %}</p>
+	{% endif %}
+	<form action="{% url 'ajax_login' %}" method='post' id="login-form">
+		{% csrf_token %}
+		<input type="hidden" name="next" value="{% url 'ajax_login_ok' %}" />
+		<p>
+			<label for="username">{% trans "Nom d'utilisateur" %}</label>
+			{{form.username}}
+		</p>
+		<p>
+            <label for="password">{% trans "Mot de passe" %}</label>
+            {{form.password}}
+        </p>
+        <div class="btn-submit">
+        	<p><a id="login-popup-close" class="btn-previous" href="#">{% trans "Cancel" %}</a><input type="submit" value="{% trans 'Login' %}" /></p>
+	  	</div>
+	</form>
+	<p class="champs"><a href="{% url 'auth_password_reset' %}" target="_blank">{% trans "Forgot password ?" %}</a></p>
+	<p class="champs"><a href="{% url 'registration_register' %}" target="_blank">{% trans "Still not a user ? Create an account" %}</a></p>
 </div>
-
--- a/src/hdalab/templates/registration/activate.html	Mon Dec 01 10:34:53 2014 +0100
+++ b/src/hdalab/templates/registration/activate.html	Wed Dec 10 11:34:54 2014 +0100
@@ -1,6 +1,14 @@
 {% extends "base.html" %}
+{% load static %}
 {% load i18n %}
 
+{% block title %}{% trans "Registration - Activated" %}{% endblock %}
+
+{% block css_import %}
+{{block.super}}
+        <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/login.css' %}" />
+{% endblock %}
+
 {% block main_content %}
 <div class="register">
 	{% if account %}
--- a/src/hdalab/templates/registration/activation_complete.html	Mon Dec 01 10:34:53 2014 +0100
+++ b/src/hdalab/templates/registration/activation_complete.html	Wed Dec 10 11:34:54 2014 +0100
@@ -1,6 +1,14 @@
 {% extends "base.html" %}
+{% load static %}
 {% load i18n %}
 
+{% block title %}{% trans "Registration - Complete" %}{% endblock %}
+
+{% block css_import %}
+{{block.super}}
+        <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/login.css' %}" />
+{% endblock %}
+
 {% block main_content %}
 <div class="register">
     <p>{% trans "Your account is now activated." %}</p>
--- a/src/hdalab/templates/registration/login.html	Mon Dec 01 10:34:53 2014 +0100
+++ b/src/hdalab/templates/registration/login.html	Wed Dec 10 11:34:54 2014 +0100
@@ -4,22 +4,35 @@
 
 {% block title %}{% trans "Login" %}{% endblock %}
 
+{% block css_import %}
+{{block.super}}
+        <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/login.css' %}" />
+{% endblock %}
+
+{% block login_actif %}actif{% endblock %}
+
 {% block main_content %}
     <div class="register">
+    	<h1>{% trans "Identifiants" %}</h1>
         {% if form.errors %}
         <p class="error">{% trans "Sorry, that's not a valid username or password." %}</p>
         {% endif %}
         <form action="" method='post' id="login-form">
             {% csrf_token %}
             <input type="hidden" name="next" value="{% if next %}{{ next }}{% else %}{% url 'home' %}{% endif %}" />
-            {{form.as_p}}
-            <button class="button" type="submit" value="login">{% trans "login" %}</button>
+            <p>
+	            <label for="username">{% trans "Nom d'utilisateur" %}</label>
+	            {{form.username}}
+	        </p>
+	        <p>
+	            <label for="password">{% trans "Mot de passe" %}</label>
+	            {{form.password}}
+	        </p>
+	        <div class="btn-submit">
+	        	<p><input type="submit" value="{% trans 'Login' %}" /></p>
+		  	</div>
         </form>
-        <p>&nbsp;</p>
-        <p><a href="{% url 'registration_register' %}">{% trans "Still not a user ? Create an account" %}</a>
-        <p><a href="{% url 'auth_password_reset' %}">{% trans "Forgot password ?" %}</a>
-    </div>
+        <p class="champs"><a href="{% url 'auth_password_reset' %}">{% trans "Forgot password ?" %}</a></p>
+        <p class="champs"><a href="{% url 'registration_register' %}">{% trans "Still not a user ? Create an account" %}</a></p>
+	</div>
 {% endblock %}
-
-
-
--- a/src/hdalab/templates/registration/password_change_done.html	Mon Dec 01 10:34:53 2014 +0100
+++ b/src/hdalab/templates/registration/password_change_done.html	Wed Dec 10 11:34:54 2014 +0100
@@ -1,6 +1,14 @@
 {% extends "base.html" %}
+{% load static %}
 {% load i18n %}
 
+{% block title %}{% trans "Password change - Done" %}{% endblock %}
+
+{% block css_import %}
+{{block.super}}
+        <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/login.css' %}" />
+{% endblock %}
+
 {% block main_content %}
 <div class="register">
     <p>{% trans "Password changed" %}</p>
--- a/src/hdalab/templates/registration/password_change_form.html	Mon Dec 01 10:34:53 2014 +0100
+++ b/src/hdalab/templates/registration/password_change_form.html	Wed Dec 10 11:34:54 2014 +0100
@@ -1,12 +1,30 @@
 {% extends "base.html" %}
+{% load static %}
 {% load i18n %}
 
+{% block title %}{% trans "Password change" %}{% endblock %}
+
+{% block css_import %}
+{{block.super}}
+        <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/login.css' %}" />
+{% endblock %}
+
 {% block main_content %}
 <div class="register">
+	<h1>{% trans "Changer le mot de passe" %}</h1>
 	<form method="post" action=".">
-	  {% csrf_token %} 
-	  {{ form.as_p }}
-	  <input type="submit" value="{% trans 'Submit' %}" />
+		{% csrf_token %}
+		<p>
+			<label for="password1">{% trans "Nouveau mot de passe" %}</label>
+			{{form.password1}}
+		</p>
+		<p>
+			<label for="password2">{% trans "Nouveau mot de passe (Verification)" %}</label>
+			{{form.password2}}
+		</p>
+	  	<div class="btn-submit">
+	        	<p><a class="btn-previous" href="{% url 'login' %}">{% trans "Precedent" %}</a><input type="submit" value="{% trans 'Submit' %}" /></p>
+		</div>
 	</form>
 </div>
 {% endblock %}
--- a/src/hdalab/templates/registration/password_reset_complete.html	Mon Dec 01 10:34:53 2014 +0100
+++ b/src/hdalab/templates/registration/password_reset_complete.html	Wed Dec 10 11:34:54 2014 +0100
@@ -1,6 +1,14 @@
 {% extends "base.html" %}
+{% load static %}
 {% load i18n %}
 
+{% block title %}{% trans "Password Reset - Complete" %}{% endblock %}
+
+{% block css_import %}
+{{block.super}}
+        <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/login.css' %}" />
+{% endblock %}
+
 {% block main_content %}
 <div class="register">
 	<p>{% trans "Password reset successfully" %}</p>
--- a/src/hdalab/templates/registration/password_reset_confirm.html	Mon Dec 01 10:34:53 2014 +0100
+++ b/src/hdalab/templates/registration/password_reset_confirm.html	Wed Dec 10 11:34:54 2014 +0100
@@ -1,13 +1,23 @@
 {% extends "base.html" %}
+{% load static %}
 {% load i18n %}
 
+{% block title %}{% trans "Password reset - Confirm" %}{% endblock %}
+
+{% block css_import %}
+{{block.super}}
+        <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/login.css' %}" />
+{% endblock %}
+
 {% block main_content %}
 <div class="register">
 	{% if validlink %}
 	<form method="post" action=".">
 	  {% csrf_token %} 
 	  {{ form.as_p }}
-	  <input type="submit" value="{% trans 'Submit' %}" />
+	 	<div class="btn-submit">
+	        	<p><input type="submit" value="{% trans 'Submit' %}" /></p>
+		</div>
 	</form>
 	{% else %}
 	<p>{% trans "Password reset failed" %}</p>
--- a/src/hdalab/templates/registration/password_reset_done.html	Mon Dec 01 10:34:53 2014 +0100
+++ b/src/hdalab/templates/registration/password_reset_done.html	Wed Dec 10 11:34:54 2014 +0100
@@ -1,6 +1,14 @@
 {% extends "base.html" %}
+{% load static %}
 {% load i18n %}
 
+{% block title %}{% trans "Password reset - Done" %}{% endblock %}
+
+{% block css_import %}
+{{block.super}}
+        <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/login.css' %}" />
+{% endblock %}
+
 {% block main_content %}
 <div class="register">
     <p>{% trans "Email with password reset instructions has been sent." %}</p>
--- a/src/hdalab/templates/registration/password_reset_form.html	Mon Dec 01 10:34:53 2014 +0100
+++ b/src/hdalab/templates/registration/password_reset_form.html	Wed Dec 10 11:34:54 2014 +0100
@@ -1,12 +1,34 @@
 {% extends "base.html" %}
+{% load static %}
 {% load i18n %}
 
+{% block title %}{% trans "Password reset" %}{% endblock %}
+
+{% block css_import %}
+{{block.super}}
+        <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/login.css' %}" />
+{% endblock %}
+
+{% block login_actif %}actif{% endblock %}
+
 {% block main_content %}
-<div class="register">
-	<form method="post" action=".">
-	  {% csrf_token %} 
-	  {{ form.as_p }}
-	  <input type="submit" value="{% trans 'Submit' %}" />
-	</form>
-</div>
+	<div class="register">
+		<h1>{% trans "Recuperation du Mot de Passe" %}</h1>
+		{% if form.errors %}
+        	<p class="error">{% trans "Sorry, that's not a valid username or password." %}</p>
+        {% endif %}
+		<form method="post" action="">
+	  		{% csrf_token %} 
+	  		<p>
+	            <label for="email">{% trans "Email du compte:" %}</label>
+	            {{form.email}}
+	        </p>
+	        <div class="btn-submit">
+	        	<p><a class="btn-previous" href="{% url 'login' %}">{% trans "Precedent" %}</a><input type="submit" value="{% trans 'Submit' %}" /></p>
+		  	</div>
+		</form>
+	</div>
 {% endblock %}
+
+
+
--- a/src/hdalab/templates/registration/registration_complete.html	Mon Dec 01 10:34:53 2014 +0100
+++ b/src/hdalab/templates/registration/registration_complete.html	Wed Dec 10 11:34:54 2014 +0100
@@ -1,6 +1,14 @@
 {% extends "base.html" %}
+{% load static %}
 {% load i18n %}
 
+{% block title %}{% trans "Registration - Complete" %}{% endblock %}
+
+{% block css_import %}
+{{block.super}}
+        <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/login.css' %}" />
+{% endblock %}
+
 {% block main_content %}
 <div class="register">
     <p>{% trans "You are now registered. Activation email sent." %}</p>
--- a/src/hdalab/templates/registration/registration_form.html	Mon Dec 01 10:34:53 2014 +0100
+++ b/src/hdalab/templates/registration/registration_form.html	Wed Dec 10 11:34:54 2014 +0100
@@ -1,12 +1,47 @@
 {% extends "base.html" %}
+{% load static %}
 {% load i18n %}
 
+{% block title %}{% trans "Registration" %}{% endblock %}
+
+{% block css_import %}
+{{block.super}}
+        <link rel="stylesheet" type="text/css" href="{% static 'hdalab/css/login.css' %}" />
+{% endblock %}
+
+{% block login_actif %}actif{% endblock %}
+
 {% block main_content %}
 <div class="register">
-	<form method="post" action=".">
-	  {% csrf_token %}
-	  {{ form.as_p }}
-	  <input type="submit" value="{% trans 'Submit' %}" />
+	<h1>{% trans "Nouvel Utilisateur" %}</h1>
+	{% if form.errors %}
+		<p class="error">{% trans "Oups ! Il y a un problème dans les données du nouvel utilisateur" %}</p>
+	{% endif %}
+	<form action="" method='post'>
+		{% csrf_token %}
+		<input type="hidden" name="next" value="{% if next %}{{ next }}{% else %}{% url 'home' %}{% endif %}" />
+		<p>
+			<label for="username">{% trans "Nom d'utilisateur" %}</label>
+			{{form.username}}
+		</p>
+		<p>
+			<label for="email">{% trans "E-mail" %}</label>
+			{{form.email}}
+		</p>
+		<p>
+			<label for="password1">{% trans "Mot de passe" %}</label>
+			{{form.password1}}
+		</p>
+		<p>
+			<label for="password2">{% trans "Mot de passe (Verification)" %}</label>
+			{{form.password2}}
+		</p>
+		<div class="btn-submit">
+  	    	<p><a class="btn-previous" href="{% url 'login' %}">{% trans "Precedent" %}</a><input type="submit" value="{% trans 'Submit' %}" /></p>
+		</div>
 	</form>
 </div>
 {% endblock %}
+
+
+