aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorBobby <[email protected]>2022-08-29 13:53:27 -0400
committerBobby <[email protected]>2022-08-29 13:53:27 -0400
commitb3a2ca962b88bf007e2e9040212b471e29c00a7a (patch)
treee9700a15cce0e06a4297597fff17e8e0c63d1642 /templates
parent043693f0825285ffd130e4e9cdfd396e741852ff (diff)
downloadthatcomputerscientist-b3a2ca962b88bf007e2e9040212b471e29c00a7a.tar.xz
thatcomputerscientist-b3a2ca962b88bf007e2e9040212b471e29c00a7a.zip
basic registration page with disabled registration
Diffstat (limited to 'templates')
-rw-r--r--templates/blog/partials/sidebar.html18
-rw-r--r--templates/blog/register.html49
2 files changed, 59 insertions, 8 deletions
diff --git a/templates/blog/partials/sidebar.html b/templates/blog/partials/sidebar.html
index 63fb8dde..82a0b62f 100644
--- a/templates/blog/partials/sidebar.html
+++ b/templates/blog/partials/sidebar.html
@@ -22,14 +22,16 @@
<input type="submit" value="Login">
</form>
{% for message in messages %}
- {% if message.message == "EVERR" %}
- <form method="post" action="{% url 'users:sendverificationemail' %}" >
- <p class="{{message.tags}}">
- Your email is unverified. Please check your inbox for a verification email or to request a new verification email by clicking{% csrf_token %}<input type="hidden" name="username"><input style="display: inline; background: none; border: none; color: blue; text-decoration: underline; cursor: pointer; margin: 0;" type="submit" value="here.">
- </p>
- </form>
- {% else %}
- <p class="{{message.tags}}">{{message.message}}</p>
+ {% if 'loginError' in message.tags %}
+ {% if message.message == "EVERR" %}
+ <form method="post" action="{% url 'users:sendverificationemail' %}" >
+ <p class="{{message.tags}}">
+ Your email is unverified. Please check your inbox for a verification email or to request a new verification email by clicking{% csrf_token %}<input type="hidden" name="username"><input style="display: inline; background: none; border: none; color: blue; text-decoration: underline; cursor: pointer; margin: 0;" type="submit" value="here.">
+ </p>
+ </form>
+ {% else %}
+ <p class="{{message.tags}}">{{message.message}}</p>
+ {% endif %}
{% endif %}
{% endfor %}
</fieldset>
diff --git a/templates/blog/register.html b/templates/blog/register.html
new file mode 100644
index 00000000..aa0600da
--- /dev/null
+++ b/templates/blog/register.html
@@ -0,0 +1,49 @@
+{% extends 'blog/partials/base.html' %} {% block content %}
+<div class="main">
+ <section>
+ <h1>Register for an account</h1>
+ <p>Register for an account to post your thoughts and get feedback from other users.</p>
+ <form action="{% url 'users:register' %}" method="post" autocomplete="off">
+ {% csrf_token %}
+ <div>
+ <label for="username">Username</label>
+ <input type="text" name="username" id="username" class="form-control" placeholder="Username" required>
+ {% for message in messages %}
+ {% if 'usernameError' in message.tags %}
+ <small class="error" style="display:block;">{{ message.message }}</small>
+ {% endif %}
+ {% endfor %}
+ </div>
+ <div>
+ <label for="email">Email</label>
+ <input type="email" name="email" id="email" class="form-control" placeholder="Email" required>
+ {% for message in messages %}
+ {% if 'emailError' in message.tags %}
+ <small class="error" style="display:block;">{{ message.message }}</small>
+ {% endif %}
+ {% endfor %}
+ </div>
+ <div>
+ <label for="password">Password</label>
+ <input type="password" name="password" id="password" class="form-control" placeholder="Password" required>
+ {% for message in messages %}
+ {% if 'passwordError' in message.tags %}
+ <small class="error" style="display:block;">{{ message.message }}</small>
+ {% endif %}
+ {% endfor %}
+ </div>
+ <div>
+ <label for="password2">Confirm Password</label>
+ <input type="password" name="password2" id="password2" class="form-control" placeholder="Confirm Password" required>
+ {% for message in messages %}
+ {% if 'password2Error' in message.tags %}
+ <small class="error" style="display:block;">{{ message.message }}</small>
+ {% endif %}
+ {% endfor %}
+ </div>
+ <div>
+ <button type="submit" class="btn btn-primary" style="margin-top:10px">Register</button>
+ </div>
+ </section>
+</div>
+{% endblock %}