Skip to content

Commit

Permalink
[2556] Only show remove checkbox if custom fields have data
Browse files Browse the repository at this point in the history
  • Loading branch information
aron committed Jun 21, 2012
1 parent e3dd419 commit 53ce5b7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ckan/templates/macros/form.html
Expand Up @@ -181,9 +181,11 @@
<div class="input-prepend">
<label for="{{ label_id }}" class="add-on">Key</label><input id="{{ id or names[0] }}-key" name="{{ names[0] }}" value="{{ values[0] | e }}" placeholder="{{ placeholders[0] }}" />
<label for="{{ id or names[1] }}-value" class="add-on">Value</label><input id="{{ id or names[1] }}-value" name="{{ names[1] }}" value="{{ values[1] | e }}" placeholder="{{ placeholders[1] }}" />
<label class="checkbox" for="{{ id or names[2] }}-remove">
<input type="checkbox" id="{{ id or names[2] }}-remove" name="{{ names[2] }}"{% if values[2] %} checked{% endif %} /> {{ _('Remove') }}
</label>
{% if values[0] or values[1] or error %}
<label class="checkbox" for="{{ id or names[2] }}-remove">
<input type="checkbox" id="{{ id or names[2] }}-remove" name="{{ names[2] }}"{% if values[2] %} checked{% endif %} /> {{ _('Remove') }}
</label>
{% endif %}
</div>
{% endcall %}
{% endmacro %}
Expand Down

0 comments on commit 53ce5b7

Please sign in to comment.