Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#26 added redirect to logIn page feature #28

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 16 additions & 11 deletions templates/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,24 @@

{% block body %}

{% if error != None and error == "Account created successfully" %}
<div id="noti" class="error" style="display: flex; background-color: green;">
<p>{{ error }}</p>
<img id='dismiss'src="/static/images/reject.png" alt="Reject">
</div>
{% else %}
{% if error != None %}
{% if error %}
<div id="noti" class="error" style="display: flex; background-color: red;">
<p>{{ error }}</p>
<img id='dismiss'src="/static/images/reject.png" alt="Reject">
</div>
{% endif %}
{% endif %}

{% if success_message %}
<div id="noti" class="success" style="display: flex; background-color: green;">
<p>{{ success_message }}</p>
<img id='dismiss'src="/static/images/reject.png" alt="Reject">
</div>
<script>
setTimeout(function() {
window.location.href = "{% url 'login' %}";
}, 3000);
</script>
{% else %}
<section class="signupcontainer">
<h1 class="bigheading">TaskMate</h1>
<div class="signupbox">
Expand All @@ -29,18 +34,18 @@ <h2>Register Here</h2>
<label for="username">Username</label>
<input id="username" type="text" name="username" placeholder="Username" required maxlength="30">


<label for="email">Email</label>
<input id="email" type="email" name="email" placeholder="Email" required>


<label for="password">Password</label>
<input id="password" type="password" name="password" placeholder="Password" required maxlength="30" minlength="6">

<label for="confirmpassword">Confirm Password</label>
<input id="confirmpassword" type="password" name="confirmpassword" placeholder="Confirm Password" required maxlength="30" minlength="6">
<button type="submit">SignUp</button>
<p class="info">Already have an account? <a href="{% url 'login' %}" class="active">Login</a></p>
</form>
</div>
</section>
{% endblock body %}
{% endif %}
{% endblock body %}