<h3 class="modalTitle">
  {{ 'hpo.common.prev' | translate }} > {{ currentParameter.name }}
</h3>
<form id="formulaire-feature" ng-submit="confirm(newAttributeInformations)">
  <div class="modalBody marginTop">
    <div class="row nomargin">
      <div class="col-md-12">
        <div class="col-md-8 nopadding">
          <label><translate>hpo.multicritere.analyse.method</translate></label>
        </div>
        <div class="col-md-4 nopadding">
          <div class="col-md-12">
            <input
              type="radio"
              ng-model="newAttributeInformations.update"
              ng-value="'add'"
            />
            <translate>hpo.common.add</translate>
          </div>
          <div class="col-md-12">
            <input
              type="radio"
              ng-model="newAttributeInformations.update"
              ng-value="'update'"
            />
            <translate>hpo.common.replace</translate>
          </div>
        </div>
      </div>
    </div>

    <div
      class="row nomargin"
      ng-if="newAttributeInformations.update === 'update'"
    >
      <div class="col-md-12 marginTop nopadding">
        <div class="form-group clearfix">
          <div class="col-xs-4">
            <label class="required"
              ><translate>hpo.multicritere.analyse.selected</translate></label
            >
          </div>
          <div class="col-xs-4">
            <select
              class="form-control"
              ng-model="newAttributeInformations.updatedAttribute"
              ng-options="attr as attr.alias for attr in newAttributeInformations.possible | orderBy:'alias'"
              required
            />
          </div>
        </div>
      </div>
    </div>

    <div class="row nomargin" ng-if="newAttributeInformations.update === 'add'">
      <div class="col-md-12 marginTop nopadding">
        <div class="form-group clearfix">
          <div class="col-xs-4">
            <label
              ><translate
                >hpo.multicritere.analyse.newattribute</translate
              ></label
            >
          </div>
        </div>
        <create-update-attribute
          current-feature-type-attribute="newAttributeInformations.newAttribute"
          no-title="true"
          addonly-one="true"
          to-verify-attributes="newAttributeInformations.existing"
          fixed-types="[newAttributeInformations.type]"
        ></create-update-attribute>
      </div>
    </div>

    <hr />

    <!-- Single button -->
    <div class="row nomargin">
      <div class="col-xs-12 text-right nopadding-col marginBottom">
        <button
          class="btn btn-primary"
          type="submit"
          ng-disabled="checkCorrectInformations(newAttributeInformations)"
        >
          <translate>common.apply</translate>
        </button>
      </div>
    </div>
  </div>
</form>
