<div class="o-layout o-layout--center u-padding">
  [% IF txt_auth_error.defined %]
  <div class="o-layout__item">
    <div class="o-media o-media--error u-padding u-margin-bottom">
      <div class="o-media__img">[% flashIcon(level='error') %]</div>
      <p class="o-media__body">[% i18n(txt_auth_error) %]</p>
    </div>
  </div>
  [% END %]

  <form name="registration" method="post" action="/device-registration">

    [% IF status_msg_error.defined %]
    <div class="o-layout__item u-1/1">
      <div class="o-media o-media--error u-padding u-margin-bottom">
        <div class="o-media__img">[% flashIcon(level='error') %]</div>
        <p class="o-media__body">[% i18n(status_msg_error) %]</p>
      </div>
    </div>
    [% END %]

    <div class="o-layout__item o-layout--left u-1/1 u-2/3@tablet u-3/5@desktop">

      <div class="input-container">
        <label for="device_mac">[% i18n("Device MAC address") %]</label>
        <input class="field" name="device_mac" id="device_mac" type="text" value="[% device_mac %]" />
      </div>

      [% IF device_registration_list_roles.size > 1 %]
      <div class="input-container">
        <label>[% i18n("Select registration role") %]</label>
        <select name="registration_role">
          [% FOREACH registration_role IN device_registration_list_roles %]
          <option value='[% registration_role.value %]'>[% registration_role.label %]</option>
          [% END %]
        </select>
      </div>
      [% END %]

      [% IF console_types.size > 1 %]
      <div class="input-container">
        <label>[% i18n("Device Type") %]</label>
        <select name="console_type">
          <option value="">[% i18n('Select Console') %]</option>
          [% FOREACH console_type IN console_types %]
          <option [% IF console_type == selected_console_type %]selected='selected'[% END %]
          value='[% console_type %]'>[% console_type %]</option>
          [% END %]
        </select>
      </div>
      [% END %]

      [%# submit %]
      <div class="u-margin-top">
        <button type="submit" name="submit" class="c-btn c-btn--primary u-1/1">
          [% i18n('Register') %]
        </button>
      </div>

    </div>

  </form>

</div>

[% INCLUDE status/menu.html %]
