login/register/post
This commit is contained in:
parent
6f18890739
commit
6fc506df2f
6 changed files with 283 additions and 108 deletions
|
|
@ -5,31 +5,36 @@
|
|||
{% block main %}
|
||||
<div class="content">
|
||||
</div>
|
||||
<div class="add-comment" style="display: none">
|
||||
<form class="add-comment" style="display: none">
|
||||
<div class="comment-fields">
|
||||
{% csrf_token %}
|
||||
<textarea name="text" placeholder="your comment"></textarea>
|
||||
<textarea name="text" placeholder="your comment" required></textarea>
|
||||
<div class="user">
|
||||
{% if request.user.is_anonymous %}
|
||||
<input name="name" type="text" placeholder="your name"></input>
|
||||
<input name="email" type="email" placeholder="your email"></input>
|
||||
<br>
|
||||
<div class="buttons">
|
||||
<div class="user-info">
|
||||
<input name="name" type="text" placeholder="your name" required></input>
|
||||
<input name="email" type="email" placeholder="your email" required></input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="buttons guest active">
|
||||
<button id="add-comment">Add comment as guest</button>
|
||||
<button>Login</button>
|
||||
<button id="login">Login</button>
|
||||
</div>
|
||||
<div class="buttons login">
|
||||
<input name="username" type="text" placeholder="your username"></input>
|
||||
<input name="password" type="password" placeholder="your password"></input>
|
||||
<button>Login</button>
|
||||
<button>Register</button>
|
||||
<input name="username" type="text" placeholder="your username" required></input>
|
||||
<input name="password" type="password" placeholder="your password" required></input>
|
||||
<input name="email" type="email" placeholder="your email" style="display: none"></input>
|
||||
<button id="login">Login</button>
|
||||
<button id="register">Register</button>
|
||||
<div class="error"></div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="buttons">
|
||||
<div class="buttons active">
|
||||
<button id="add-comment">Add comment</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
{% block end %}
|
||||
<script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue