Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (26 sloc) 742 Bytes
{% block form_errors %}
{% spaceless %}
{% if errors|length > 0 %}
<ul class="alert alert-error">
{% for error in errors %}
<li>{{ error.message }}</li>
{% endfor %}
</ul>
{% endif %}
{% endspaceless %}
{% endblock form_errors %}
{% block button_attributes %}
{% spaceless %}
id="{{ id }}" name="{{ full_name }}"{% if disabled %} disabled="disabled"{% endif %}
{% set hasClass = false %}
{% for attrname, attrvalue in attr %}
{{ attrname }}="{{ attrvalue }}"
{% if attrname == "class" %}
{% set hasClass = true %}
{% endif %}
{% endfor %}
{% if not hasClass %}
class="btn"
{% endif %}
{% endspaceless %}
{% endblock button_attributes %}