<script type="text/x-handlebars-template">

    <select id="{{id}}" {{#if options.readonly}}readonly="readonly"{{/if}} {{#if options.multiple}}multiple="multiple"{{/if}} {{#if options.size}}size="{{options.size}}"{{/if}} {{#if name}}name="{{name}}"{{/if}}>

    {{#if options.multiple}}

        {{#if options.hideNone}}
        {{else}}
        <option value="">{{{options.noneLabel}}}</option>
        {{/if}}

        {{#each selectOptions}}
        <option value="{{{value}}}" {{#if selected}}selected="selected"{{/if}}>{{text}}</option>
        {{/each}}

    {{else}}

        {{#if options.hideNone}}
        {{else}}
        <option value="">{{{options.noneLabel}}}</option>
        {{/if}}

        {{#each selectOptions}}
        <option value="{{{value}}}" {{#if selected}}selected="selected"{{/if}}>{{text}}</option>
        {{/each}}

    {{/if}}

    </select>

</script>