{{top-errors errors=errors}}

<section class="horizontal-form">
  <div class="container-fluid">
    {{partial "host/add-common"}}

    <div class="over-hr" style="margin: 20px 0;">
      <span>Account Access</span>
    </div>

    <div class="row form-group">
      <div class="col-sm-12 col-md-2 form-label">
        <label for="username" class="form-control-static">Username*</label>
      </div>
      <div class="col-sm-12 col-md-8">
        {{input id="username" type="text" value=rackspaceConfig.username classNames="form-control" placeholder="Your RackSpace username"}}
      </div>
    </div>

    <div class="row form-group">
      <div class="col-sm-12 col-md-2 form-label">
        <label for="apiKey" class="form-control-static">API Key*</label>
      </div>
      <div class="col-sm-12 col-md-8">
        {{input id="apiKey" type="password" value=rackspaceConfig.apiKey classNames="form-control" placeholder="Your RackSpace API key"}}
        <p class="help-block">From the Account Settings screen of the RackSpace control panel</p>
      </div>
    </div>

    <div class="over-hr" style="margin: 20px 0;">
      <span>Region</span>
    </div>

    <div class="row form-group">
      <div class="col-sm-12 col-md-2 form-label">
        <label for="region" class="form-control-static">Region</label>
      </div>
      <div class="col-sm-12 col-md-8">
        {{view "select"
          class="form-control"
          id="region"
          content=regionChoices
          optionValuePath="content.value"
          optionLabelPath="content.label"
          value=rackspaceConfig.region
        }}
      </div>
    </div>

    <div class="over-hr" style="margin: 20px 0;">
      <span>Instance</span>
    </div>

    <div class="row form-group">
      <div class="col-sm-12 col-md-2 form-label">
        <label for="flavor" class="form-control-static">Flavor</label>
      </div>
      <div class="col-sm-12 col-md-8">
        {{view "select"
          classNames="form-control"
          value=rackspaceConfig.flavorId
          content=flavorChoices
          optionValuePath="content.value"
          optionLabelPath="content.label"
        }}
      </div>
    </div>

    <div class="over-hr" style="margin: 20px 0;">
      <span>Rancher</span>
    </div>
    <div class="row form-group">
      <div class="col-sm-12 col-md-2 form-label">
        <label class="form-control-static">Labels</label>
      </div>
      <div class="col-sm-12 col-md-8">
        {{partial "edit-labels"}}
      </div>
    </div>
  </div>

  {{partial "save-cancel"}}
</section>
