<section class="horizontal-form container-fluid">
  <h2>{{#if editing}}Edit{{else}}Add{{/if}} Stack</h2>
  {{top-errors errors=errors}}

  <div class="row form-group">
    <div class="col-sm-12 col-md-2 form-label">
      <label>Name*</label>
    </div>
    <div class="col-sm-12 col-md-8">
      {{input type="text" value=primaryResource.name classNames="form-control" placeholder="e.g. MyApp"}}
    </div>
  </div>

  <div class="row form-group">
    <div class="col-sm-12 col-md-2 form-label">
      <label>Description</label>
    </div>
    <div class="col-sm-12 col-md-8">
      {{textarea value=primaryResource.description classNames="form-control no-resize" rows="5" placeholder="e.g. MyApp stack"}}
    </div>
  </div>

  <div class="over-hr" style="margin: 20px 0;">
    <span>Optional: Import Compose</span>
  </div>
  <div class="row form-group">
    <div class="col-md-4 col-md-offset-2">
      <label style="vertical-align: bottom;">
        docker-compose
        {{read-text-file accept=".yml" action=(action "readFile" "dockerCompose")}}
      </label>
      {{textarea value=primaryResource.dockerCompose classNames="form-control no-resize" rows="5" placeholder="Contents of docker-compose.yml"}}
    </div>
    <div class="col-md-4">
      <label style="vertical-align: bottom;">
        rancher-compose
        {{read-text-file accept=".yml" action=(action "readFile" "rancherCompose")}}
      </label>
      {{textarea value=primaryResource.rancherCompose classNames="form-control no-resize" rows="5" placeholder="Contents of rancher-compose.yml"}}
    </div>
  </div>
</section>

{{partial "save-cancel"}}
