Skip to content

Commit

Permalink
next on login fixed, closes #31
Browse files Browse the repository at this point in the history
  • Loading branch information
muremwa committed May 1, 2023
1 parent 32ffa77 commit a543d4e
Showing 1 changed file with 26 additions and 18 deletions.
44 changes: 26 additions & 18 deletions templates/registration/#.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{% block style %}{{ form.media.css }}{% endblock style %}

{% block content %}
<style type="text/css">
<style>
#login-form {
margin-top: 3em;
border: 0.4px solid rgb(230, 179, 170);
Expand All @@ -21,7 +21,7 @@
</style>

<div class="container col-sm-3">
<p class="lead">sign in and imporove your experience</p>
<p class="lead">Sign in and improve your experience</p>
</div>

<div class="container col-sm-3" id="login-form">
Expand All @@ -40,23 +40,31 @@
{% endif %}
<br />

{% comment %}login form{% endcomment %}
<form method="post" action="{% url 'base_account:login' %}">
{% csrf_token %}
<div class="form-group">
<label>{{ form.username.label_tag }}</label>
{{ form.username }}
{% if user.is_authenticated %}
<div class="text-center">
<p>You're signed in as @{{ user.username }}</p>
<a href="{% url 'base_account:logout' %}" class="btn">sign out</a>
</div>
<div class="form-group">
<label>{{ form.password.label_tag }}</label>
{{ form.password }}
</div>
<div class="col-sm-3 form-group">
<input type="submit" class="form-control" value="#">
</div>
<br />
<p>don't have an account? <a class="text-danger" href="{% url 'base_account:sign-up' %}">#</a></p>
</form>
{% else %}
{% comment %}login form{% endcomment %}
<form method="post" action="{% url 'base_account:login' %}">
{% csrf_token %}
<input type="hidden" name="next" value="{{ next }}">
<div class="form-group">
<label>{{ form.username.label_tag }}</label>
{{ form.username }}
</div>
<div class="form-group">
<label>{{ form.password.label_tag }}</label>
{{ form.password }}
</div>
<div class="col-sm-3 form-group">
<input type="submit" class="form-control" value="#">
</div>
<br />
<p>don't have an account? <a class="text-danger" href="{% url 'base_account:sign-up' %}">#</a></p>
</form>
{% endif %}
</div>

{% endblock content %}
Expand Down

0 comments on commit a543d4e

Please # to comment.