<h3 class="modalTitle">
  {{ newCurrentModel.nameprevision }}
</h3>

<div class="modalBody marginTop">
  <div class="row">
    <div class="col-md-12" ng-if="newCurrentModel.status === 'FINISHED'">
      <div class="alert alert-warning" ng-if="!newCurrentModel.finaliser">
        <div class="row">
          <div class="col-md-8">
            <translate>hpo.common.finaliserPrevision</translate>
          </div>
          <div class="col-md-1 pull-right">
            <button
              type="button"
              class="btn btn-success btn-sm"
              ng-click="finaliserStep(newCurrentModel)"
            >
              <translate>hpo.common.finaliseraction</translate>
            </button>
          </div>
        </div>
      </div>
      <div class="alert alert-success" ng-if="newCurrentModel.finaliser">
        <div class="row">
          <div class="col-md-12">
            <translate>hpo.common.finaliserok</translate>
          </div>
        </div>
      </div>
    </div>
  </div>

  <div class="row">
    <div class="col-md-12 marginBottom">
      <div class="row nomargin marginTop add-border">
        <h4><a translate>hpo.model.calage.infocalage</a></h4>
      </div>

      <div class="row nomargin contenu-hpo">
        <div class="col-md-12 marginTop">
          <div class="form-group clearfix">
            <div class="col-xs-6 nopaddingLeft">
              <label class="required"
                ><translate
                  >model.featuretypes.attributes.name</translate
                ></label
              >

              <input
                type="text"
                class="form-control form-control-info"
                ng-model="newCurrentModel.nameprevision"
                limit="25"
                required
                disabled
              />
            </div>

            <div class="col-xs-6 nopaddingRight">
              <label class="required"
                ><translate>hpo.common.commentaire</translate></label
              >
              <textarea
                type="textarea"
                class="form-control form-control-info"
                id="inputalias"
                placeholder="{{ 'hpo.common.easyget' | translate }}"
                ng-model="newCurrentModel.commentaireprevision"
                required
                disabled
              />
            </div>
          </div>
        </div>

        <div class="col-md-12 marginTop">
          <div class="form-group clearfix">
            <div class="col-xs-6 nopaddingLeft">
              <label class="required"
                ><translate>hpo.model.prevision.datestart</translate></label
              >
              <input
                type="text"
                class="form-control form-control-info"
                data-date-format="dd-MM-yyyy"
                model-date-format="yyyy-MM-ddTHH:mm:ss.sssZ"
                ng-model="newCurrentModel.dateprevisionstart"
                timezone="UTC"
                bs-datepicker
                disabled
                data-autoclose="true"
              />
            </div>

            <div class="col-xs-6">
              <label class="required"
                ><translate>hpo.model.prevision.dateend</translate></label
              >
              <input
                type="text"
                class="form-control form-control-info"
                data-date-format="dd-MM-yyyy"
                model-date-format="yyyy-MM-ddTHH:mm:ss.sssZ"
                ng-model="newCurrentModel.dateprevisionend"
                timezone="UTC"
                bs-datepicker
                data-autoclose="true"
                required
                disabled
              />
            </div>
          </div>
        </div>

        <div class="col-md-12 marginTop">
          <div class="form-group clearfix">
            <div class="col-xs-6 nopaddingLeft">
              <label><translate>hpo.common.duree</translate></label>
            </div>
            <div class="col-xs-6">
              {{ newCurrentModel.duree.diff + " " + newCurrentModel.duree.unit
              }}
            </div>
          </div>
        </div>
      </div>
    </div>

    <div class="col-md-12 marginBottom">
      <div
        class="row nomargin marginTop add-border"
        ng-if="newCurrentModel.status === 'FINISHED'"
      >
        <h4><a translate>hpo.common.data</a></h4>
      </div>

      <div
        class="col-md-12 marginTop"
        ng-if="newCurrentModel.status === 'FINISHED'"
      >
        <div class="form-group clearfix">
          <model-jeu-data-hpo
            model="newCurrentModel"
            table-name="tableName"
          ></model-jeu-data-hpo>
        </div>
      </div>

      <div
        class="col-md-12 marginTop"
        ng-show="newCurrentModel.status !== 'FINISHED'"
      >
        <div class="form-group clearfix">
          <div class="alert alert-info smallMarginBottom">
            <translate>{{ newCurrentModel.message }}</translate>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
