Skip to content

Commit

Permalink
Improve some form rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
dcramer committed Aug 26, 2012
1 parent 1ec9c90 commit 315a449
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/sentry/plugins/bases/issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def view(self, request, group, **kwargs):
request=request,
)
except forms.ValidationError, e:
form.errors['__all__'] = u'Error creating issue: %s' % e
form.errors['__all__'] = [u'Error creating issue: %s' % e]

if form.is_valid():
GroupMeta.objects.set_value(group, '%s:tid' % prefix, issue_id)
Expand Down
20 changes: 11 additions & 9 deletions src/sentry/templates/sentry/plugins/bases/issue/create_issue.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,24 @@
<div class="page-header">
<h3>{{ title }}</h3>
</div>
{% if form.errors %}
<div class="alert-message error">{% trans "Please correct the errors below." %}</div>

{% if form.non_field_errors %}
<div class="alert alert-block alert-error">
<ul>
{% for error in form.non_field_errors %}
<li>{{ error }}</li>
{% endfor %}
</ul>
</div>
{% endif %}


<form class="form-stacked" action="" method="post">
{% csrf_token %}
<input type="hidden" name="next" value="{{ next }}" />
<fieldset>
{% for field in form %}
<div class="clearfix{% if field.errors %} error{% endif %}">
{{ field.label_tag }}
<div class="input">{{ field }}</div>
{% if field.help_text %}
<span class="help-block">{{ field.help_text }}</span>
{% endif %}
</div>
{% include "sentry/partial/_form_field.html" %}
{% endfor %}
</fieldset>
<p class="actions">
Expand Down

0 comments on commit 315a449

Please sign in to comment.