Skip to content

Commit

Permalink
Improve multi-select
Browse files Browse the repository at this point in the history
  • Loading branch information
kmmbvnr committed Jun 29, 2014
1 parent d254cc2 commit a763d30
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions viewflow/static/viewflow/css/viewflow.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,12 @@ Few bootstrap redifinitions
padding: 5px;
border-radius: 0px;
margin-left: 0px;
}

/*
Match chosen to default theme
*/

.chosen-container-multi .chosen-choices li.search-field input[type="text"] {
padding: 15px 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
{% if field.errors %}has-error{% endif %}
{% viewpart field_group_class_add field.html_name %}{% endviewpart %}
{% endviewpart %}">
<label for="{{ field.id_for_label }}" class="control-label">{{ field.label }} aaa</label>
<label for="{{ field.id_for_label }}" class="control-label">{{ field.label }}</label>
<select class="form-control chosen" name="{{ field.name }}" id="id_{{ field.name }}" multiple>
{% for value, choice in field.field.choices %}
<option value="{{ value }}" {% if value == field.value %}selected="selected"{% endif %}>{{ choice }}</option>
{% endfor %}
</select>
{% if field.help_text %}
<span class="help-block">{{ field.help_text }}</span>
{% endif %}
{% include 'viewflow/form/field_errors.html' %}
</div>

0 comments on commit a763d30

Please sign in to comment.