APTrust/dart

View on GitHub
ui/templates/partials/input_select.html

Summary

Maintainability
Test Coverage
<div class="form-group {{ field.formGroupClass }}">
  <label class="control-label" for="{{ field.id }}"
         {{#if field.help }}data-toggle="popover" data-trigger="hover" title="{{ field.label }}" data-content="{{field.help}}"{{/if}}>{{ field.label }} {{#if field.attrs.required}}<i class="fas fa-asterisk fa-xs text-danger"></i>{{/if}} {{#if field.help}}<i class="fas fa-question-circle text-primary"></i>{{/if}}</label>
  <select id="{{ field.id }}" name="{{ field.name }}"
         class="form-control {{#each field.cssClasses }}{{ this }} {{/each }}"
         {{#each field.attrs }}{{ @key }}="{{ this }}" {{/each }}>
    {{#each field.choices }}
      <option value="{{ this.value }}" {{#if this.selected }}selected{{/if }}>{{ this.label }}</option>
    {{/each }}
  </select>
  <small id="{{ field.id }}Error" class="form-text text-danger">
    {{ field.error }}
  </small>
</div>