<label class={{config.css.label}} for={{name}}>
  {{label}}{{#if required}} *{{/if}}
</label>

{{#if (eq type "select")}}
  {{one-way-select
    value            = (get model name)
    options          = options
    optionLabelPath  = optionLabelPath
    optionValuePath  = optionValuePath
    optionTargetPath = optionTargetPath
    name             = name
    class            = config.css.control
    update           = (action "update")
    focusOut         = (action "setDirty")
    includeBlank     = includeBlank
    }}

{{else if (eq type "radioGroup")}}

  {{#each options as |option|}}
    <div class="radio">
      <label>
      {{one-way-radio
        value    = (get model name)
        option   = option.key
        name     = name
        update   = (action "update")
        focusOut = (action "setDirty")
        }}
        {{option.label}}</label>
    </div>
  {{/each}}

{{else}}

  {{component (concat "one-way-" type)
    value       = (get model name)
    options     = options
    name        = name
    class       = config.css.control
    update      = (action "update")
    focusOut    = (action "setDirty")
    placeholder = placeholder
    }}

{{/if}}

{{#if help}}
  <p class={{config.css.help}}>{{help}}</p>
{{/if}}

{{#if showError}}
  <span class={{config.css.help}}>{{firstError}}</span>
{{/if}}


<label class={{config.css.label}} for={{name}}>
  {{label}}{{#if required}} *{{/if}}
</label>

{{#if (eq type "select")}}
  {{one-way-select
    value            = (get model name)
    options          = options
    optionLabelPath  = optionLabelPath
    optionValuePath  = optionValuePath
    optionTargetPath = optionTargetPath
    name             = name
    class            = config.css.control
    update           = (action "update")
    focusOut         = (action "setDirty")
    includeBlank     = includeBlank
    disabled         = disabled
    }}

{{else if (eq type "radioGroup")}}

  {{#each options as |option|}}
    <div class="radio">
      <label>
      {{one-way-radio
        value    = (get model name)
        option   = option.key
        name     = name
        update   = (action "update")
        focusOut = (action "setDirty")
        disabled = disabled
        }}
        {{option.label}}</label>
    </div>
  {{/each}}

{{else}}

  {{component (concat "one-way-" type)
    value       = (get model name)
    options     = options
    name        = name
    class       = config.css.control
    update      = (action "update")
    focusOut    = (action "setDirty")
    placeholder = placeholder
    disabled    = disabled
    readonly    = readonly
    }}

{{/if}}

{{#if help}}
  <p class={{config.css.help}}>{{help}}</p>
{{/if}}

{{#if showError}}
  <span class={{config.css.help}}>{{firstError}}</span>
{{/if}}


Add disabled and readonly support
Add disabled and readonly support
