1234567891011121314151617181920 |
- % from bottle import template
- % multiple = (get("multiple", False) and 'multiple="true"') or ""
- <div class="pure-u-1">
- % if defined("label"):
- % include('label', id=id, label=label)
- % end
- <select id="{{id}}" name="{{name}}" size="10" {{!multiple}} style="width: calc(100% - 1em); margin: 0 1em 1em">
- % if defined("hint"):
- % include('option', value=hint, disabled=True)
- % end
- % for child in children:
- % if "optgroup" in child and child["optgroup"] is None:
- % del child["optgroup"]
- % end
- {{!template('options', **child)}}
- % end
- </select>
- </div>
|