Added choices & multichoices

This commit is contained in:
Adolfo Gómez 2013-12-04 03:03:07 +00:00
parent 61c9f4f975
commit 732840df42
2 changed files with 10 additions and 3 deletions

View File

@ -3,7 +3,7 @@
{% comment %}The choice item MUST be a Select{% endcomment %}
{% block field %}
{% verbatim %}
<select class="selectpicker show-menu-arrow {{ css }}" name="{{ name }}" id="{{ name }}_field" {{# if readonly }} disabled{{/ if }}>
<select class="selectpicker show-menu-arrow show-tick {{ css }}" name="{{ name }}" data-style="btn-default" data-width="100%" id="{{ name }}_field" {{# if readonly }} disabled{{/ if }}>
{{#each values }}
<option value="{{ id }}"{{# ifequals id ../value }}selected{{/ ifequals }}>{{ text }}</option>
{{/each}}

View File

@ -1,5 +1,12 @@
{% extends "uds/admin/tmpl/fld/form-group.html" %}
{% load i18n %}
{% comment %}The choice item MUST be a Select{% endcomment %}
{% block field %}
{% verbatim %}
{% endverbatim %}
<select class="selectpicker show-menu-arrow {{ css }}" multiple data-style="btn-default" data-selected-text-format="count>3" data-width="100%" name="{{ name }}" id="{{ name }}_field" {{# if readonly }} disabled{{/ if }}>
{{#each values }}
<option value="{{ id }}"{{# ifequals id ../value }}selected{{/ ifequals }}>{{ text }}</option>
{{/each}}
</select>
{% endverbatim %}
{% endblock %}