Skip to content

Commit

Permalink
fix(templates): added none raised error output;
Browse files Browse the repository at this point in the history
- Added non-scheming error to output of resource form.
  • Loading branch information
JVickery-TBS committed Aug 1, 2023
1 parent 5a93ca5 commit f9b5d2c
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{% ckan_extends %}

{% block stages %}
{{ super() }}
{% if error_summary and error_summary|length == 1 and _('Error') in error_summary %}
<section class="alert alert-danger">
<h3>{{ _('Error') }}</h3>
<p>{{ error_summary[_('Error')] }}</p>
</section>
{% endif %}
{% endblock %}

{% block basic_fields_url %}
{{ form.input('url', id='field-url', label=_('URL'), placeholder=_('http://whatever'), value=data.url, error=errors.name) }}
{% endblock %}
Expand All @@ -10,4 +20,3 @@
{% block again_button %}
<button class="btn btn-default" name="save" value="again" type="submit">{{ _('Save & add another') }}</button>
{% endblock %}

0 comments on commit f9b5d2c

Please sign in to comment.