<form class="form-horizontal" style="margin-top: 15px">
  <div class="form-group">
    <div class="col-sm-12 small text-muted">
      By default, secrets will be available under <code>/run/secrets/$SECRET_NAME</code> in containers (Linux) or
      <code>C:\ProgramData\Docker\secrets\$SECRET_NAME</code> (Windows).</div
    >
  </div>
  <div class="form-group">
    <div class="col-sm-12" style="margin-top: 5px">
      <label class="control-label text-left">Secrets</label>
      <span class="label label-default interactive" style="margin-left: 10px" ng-click="addSecret()"> <pr-icon icon="'plus'" mode="'alt'"></pr-icon> add a secret </span>
    </div>
    <!-- info message -->
    <div class="form-group" ng-show="formValues.Secrets.$invalid" style="margin-bottom: 0px">
      <div class="col-sm-12 small text-warning" style="padding-left: 35px; padding-top: 20px">
        <pr-icon icon="'alert-triangle'" mode="'warning'"></pr-icon> {{ formValues.Secrets.$error }}
      </div>
    </div>
    <div class="col-sm-12 form-inline" style="margin-top: 10px">
      <div ng-repeat="secret in formValues.Secrets track by $index" style="margin-top: 4px">
        <div class="input-group col-sm-4 input-group-sm">
          <span class="input-group-addon">secret</span>
          <select
            class="form-control"
            ng-model="secret.model"
            ng-change="checkIfSecretDuplicated()"
            ng-options="secret.Name for secret in availableSecrets | orderBy: 'Name'"
            data-cy="docker-stack-secrets-select"
          >
            <option value="" selected="selected">Select a secret</option>
          </select>
        </div>
        <div class="input-group col-sm-4 input-group-sm" ng-if="applicationState.endpoint.apiVersion >= 1.3 && secret.overrideTarget">
          <span class="input-group-addon">target</span>
          <input class="form-control" ng-model="secret.target" placeholder="/path/in/container" />
        </div>
        <div class="input-group col-sm-3 input-group-sm">
          <div class="btn-group btn-group-sm" ng-if="applicationState.endpoint.apiVersion >= 1.3">
            <label class="btn btn-light" ng-model="secret.overrideTarget" uib-btn-radio="false">Default location</label>
            <label class="btn btn-light" ng-model="secret.overrideTarget" uib-btn-radio="true">Override</label>
          </div>
          <button class="btn btn-dangerlight" type="button" ng-click="removeSecret($index)">
            <pr-icon icon="'trash-2'" size="'md'"></pr-icon>
          </button>
        </div>
      </div>
    </div>
  </div>
</form>
