Skip to content

Commit

Permalink
Merge fieldclass into input element
Browse files Browse the repository at this point in the history
  • Loading branch information
Norman Rusch committed Feb 3, 2017
1 parent 05b2897 commit 60d4a5b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
Expand Up @@ -3,15 +3,14 @@
{% for choice in choices %}
<li>
<label class="form-field-checkboxinput{% if field.errors %} has-errors{% endif %}" for="{{ attrs.id }}_{{ forloop.counter }}">
<span class="field">
<input
{% if choice.0 in value %}checked="checked"{% endif %}
type="checkbox"
id="{{ attrs.id }}_{{ forloop.counter }}"
name="{{ name }}"
value="{{ choice.0 }}"
>
</span>
<input
{% if choice.0 in value %}checked="checked"{% endif %}
type="checkbox"
id="{{ attrs.id }}_{{ forloop.counter }}"
name="{{ name }}"
value="{{ choice.0 }}"
class="field"
/>
<span class="label">
{{ choice.1 }}
</span>
Expand Down
19 changes: 9 additions & 10 deletions barbeque/templates/barbeque/forms/field/radioselect.html
Expand Up @@ -3,16 +3,15 @@
{% for choice in choices %}
<li>
<label for="{{ attrs.id }}_{{ forloop.counter }}" class="radioselect">
<span class="field">
<input
{% if choice.0 in value %} checked{% endif %}
type="radio"
id="{{ attrs.id }}_{{ forloop.counter }}"
name="{{ name }}"
value="{{ choice.0 }}"
{% if required %} required{% endif %}
>
</span>
<input
{% if choice.0 in value %}checked="checked"{% endif %}
type="radio"
id="{{ attrs.id }}_{{ forloop.counter }}"
name="{{ name }}"
value="{{ choice.0 }}"
class="field"
{% if required %} required{% endif %}
/>
<span class="label">
{{ choice.1 }}
</span>
Expand Down

0 comments on commit 60d4a5b

Please sign in to comment.