mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-15 16:12:51 +11:00
Better visual error display. Fixes issue #13
This commit is contained in:
parent
2996bb9a3b
commit
16b4f0fc0a
1 changed files with 11 additions and 3 deletions
|
@ -5,17 +5,25 @@
|
||||||
{{ snippet_form.non_field_errors }}
|
{{ snippet_form.non_field_errors }}
|
||||||
<div style="display: none;">{{ snippet_form.title }}</div>
|
<div style="display: none;">{{ snippet_form.title }}</div>
|
||||||
|
|
||||||
<div class="control-group form-content {% if is_new %}autofocus{% endif %}">
|
<div class="
|
||||||
|
control-group
|
||||||
|
form-content
|
||||||
|
{% if is_new %}autofocus{% endif %}
|
||||||
|
{% if snippet_form.content.errors %}error{% endif %}
|
||||||
|
">
|
||||||
{{ snippet_form.content }}
|
{{ snippet_form.content }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="control-group form-options">
|
<div class="control-group form-options">
|
||||||
<div class="form-options-lexer">
|
<div class="form-options-lexer
|
||||||
{{ snippet_form.lexer.errors }}
|
{% if snippet_form.lexer.errors %}control-group error{% endif %}">
|
||||||
<div class="input-append">
|
<div class="input-append">
|
||||||
{{ snippet_form.lexer }}
|
{{ snippet_form.lexer }}
|
||||||
<button class="btn" id="guess_lexer_btn" type="button">{% trans "Guess lexer" %}</button>
|
<button class="btn" id="guess_lexer_btn" type="button">{% trans "Guess lexer" %}</button>
|
||||||
</div>
|
</div>
|
||||||
|
{% for error in snippet_form.lexer.errors %}
|
||||||
|
<span class="help-inline">{{ error }}</span>
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<div class="form-options-expire">
|
<div class="form-options-expire">
|
||||||
{{ snippet_form.expire_options.errors }}
|
{{ snippet_form.expire_options.errors }}
|
||||||
|
|
Loading…
Reference in a new issue