Form errors
This commit is contained in:
parent
2de26f5ffc
commit
096390d533
4 changed files with 176 additions and 93 deletions
|
|
@ -37,13 +37,21 @@
|
|||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<form action="#" method="post">
|
||||
<form id="new_comment-form" action="#new_comment-form" method="post">
|
||||
{% if new_comment_errors %}
|
||||
<p>Whoops, the following error occurred:</p>
|
||||
<ul id="new_comment-errors" class="errors">
|
||||
{% for error in new_comment_errors %}
|
||||
<li class="error">{{ error | safe }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
<label for="new_comment-author">Your name:</label>
|
||||
<input type="text" id="new_comment-author" name="author" required max-length="{{ config.comment_author_max_len }}"/><br/>
|
||||
<input type="text" id="new_comment-author" name="author" required maxlenth="{{ config.comment_author_max_len }}"/><br/>
|
||||
<label for="new_comment-email">Your e-mail:</label>
|
||||
<input type="email" id="new_comment-email" name="email" max-length="{{ config.comment_email_max_len }}"/><br/>
|
||||
<input type="email" id="new_comment-email" name="email" maxlength="{{ config.comment_email_max_len }}"/><br/>
|
||||
<label for="new_comment-text">Your comment:</label><br/>
|
||||
<textarea id="new_comment-text" name="text" max-length="{{ config.comment_text_max_len }}"></textarea><br/>
|
||||
<textarea id="new_comment-text" name="text" maxlength="{{ config.comment_text_max_len }}"></textarea><br/>
|
||||
<button type="submit" name="a" value="new_comment">Post comment</button>
|
||||
</form>
|
||||
</body>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue