Created reset password email, Added forgot password view, Added forgot password form, Added set new password form, Added set new password view, fixed signup response issue, fixed main menu ungleich button redirect to django-hosting

This commit is contained in:
Levi 2016-06-21 00:10:38 -05:00
commit 104fc37bde
13 changed files with 235 additions and 20 deletions

View file

@ -0,0 +1,13 @@
{% load i18n %}{% autoescape off %}
{% blocktrans %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endblocktrans %}
{% trans "Please go to the following page and choose a new password:" %}
{% block reset_link %}
{{ base_url }}{% url 'hosting:reset_password_confirm' uidb64=uid token=token %}
{% endblock %}
{% trans "Thanks for using our site!" %}
{% blocktrans %}The {{ site_name }} team{% endblocktrans %}
{% endautoescape %}

View file

@ -0,0 +1,13 @@
{% load i18n %}{% autoescape off %}
{% blocktrans %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endblocktrans %}
{% trans "Please go to the following page and choose a new password:" %}
{% block reset_link %}
{{ base_url }}{% url 'hosting:reset_password_confirm' uidb64=uid token=token %}
{% endblock %}
{% trans "Thanks for using our site!" %}
{% blocktrans %}The {{ site_name }} team{% endblocktrans %}
{% endautoescape %}

View file

@ -53,7 +53,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand topnav" href="{% url 'ungleich_page:landing' %}"><img src="{% static 'hosting/img/logo_black.svg' %}"></a>
<a class="navbar-brand topnav" href="{{ request.session.hosting_url}}"><img src="{% static 'hosting/img/logo_black.svg' %}"></a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">

View file

@ -0,0 +1,38 @@
{% extends "hosting/base_short.html" %}
{% load staticfiles bootstrap3%}
{% block content %}
<div class="intro-auth intro-reset-password">
<div class="container">
<div class="col-md-4">&nbsp;</div>
<div class="col-md-4">
<div class="intro-message">
{% if messages %}
<ul class="list-unstyled">
{% for message in messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
<h2 class="section-heading">Set your new password</h2>
<form action="" method="post" class="form" novalidate>
{% csrf_token %}
{% for field in form %}
{% bootstrap_field field show_label=False %}
{% endfor %}
{% buttons %}
<button type="submit" class="btn btn-default">
Reset
</button>
{% endbuttons %}
</form>
<span>Already have an account ? <a class="unlink" href="{% url 'hosting:login' %}">Log in</a></span>
<ul class="list-inline intro-social-buttons">
</ul>
</div>
</div>
</div>
</div>
{% endblock %}

View file

@ -6,6 +6,14 @@
<div class="container">
<div class="col-md-4 col-md-offset-4">
{% if messages %}
<ul class="list-unstyled">
{% for message in messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
{% block messages %}
{% if request.GET.logged_out %}
<div class="alert"> <!-- singular -->
@ -31,6 +39,8 @@
{% endbuttons %}
</form>
<span>Don't have an account yet ? <a class="unlink" href="{% url 'hosting:signup' %}">Sign up</a></span>
<br/>
<span> <a class="unlink" href="{% url 'hosting:reset_password' %}">Forgot your password ?</a></span>
<ul class="list-inline intro-social-buttons">

View file

@ -0,0 +1,29 @@
{% extends "hosting/base_short.html" %}
{% load staticfiles bootstrap3%}
{% block content %}
<div class="intro-auth intro-reset-password">
<div class="container">
<div class="col-md-4">&nbsp;</div>
<div class="col-md-4">
<div class="intro-message">
<h2 class="section-heading">Reset your password</h2>
<form action="{% url 'hosting:reset_password' %}" method="post" class="form" novalidate>
{% csrf_token %}
{% for field in form %}
{% bootstrap_field field show_label=False %}
{% endfor %}
{% buttons %}
<button type="submit" class="btn btn-default">
Reset
</button>
{% endbuttons %}
</form>
<span>Already have an account ? <a class="unlink" href="{% url 'hosting:login' %}">Log in</a></span>
<ul class="list-inline intro-social-buttons">
</ul>
</div>
</div>
</div>
</div>
{% endblock %}

View file

@ -3,8 +3,8 @@
{% block content %}
<div class="intro-auth intro-signup">
<div class="container">
<div class="col-md-4">&nbsp;</div>
<div class="col-md-4">
<div class="col-md-4 col-sm-4 col-xs-4">&nbsp;</div>
<div class="col-md-4 col-sm-6 col-xs-6">
<div class="intro-message">
<h2 class="section-heading">Sign up</h2>