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

<div class="modalBody marginTop">
  <div class="row">
    <div ng-class="{'col-md-6 verticalLine marginBottom':!hpoSimplifyVisualize,'col-md-12 marginBottom':hpoSimplifyVisualize}">
      <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><translate>model.featuretypes.attributes.name</translate></label>

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

            <div class="col-xs-6 nopaddingRight">
                <label><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.commentairecalage" 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.model.choice.datestartobs</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.dateobsstart"
                      timezone="UTC"
                      bs-datepicker
                      disabled
                      data-autoclose="true"
               />
            </div>

            <div class="col-xs-6">
               <label><translate>hpo.model.choice.dateendobs</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.dateendobs"
                      timezone="UTC"
                      bs-datepicker
                      required
                      disabled
                      data-autoclose="true"
               />
            </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 class="col-md-12 marginTop">
          <div class="form-group clearfix">
            <div class="col-xs-6 nopaddingLeft">
                <label>
                  <translate>hpo.common.converged</translate>
                </label>
            </div>
            <div class="col-xs-6">
                <div ng-show="newCurrentModel.converged" class="text-success bg-success text-center" style="width:50px;">&#x2714;</div>
                <div ng-show="!newCurrentModel.converged" class="text-danger bg-danger text-center" style="width:50px;">&#x2716;</div>
            </div>
          </div>
        </div>

        <!-- <div class="col-md-12 marginTop"  ng-if="newCurrentModel.converged">
          <div class="form-group clearfix">
            <div class="col-xs-6 nopaddingLeft">
                <label>
                  <translate>hpo.common.convergedafter</translate>
                </label>
            </div>
            <div class="col-xs-6">
              <span class="mdMarginLeft">{{ newCurrentModel.fitcox.length | number }}</span>
            </div>
          </div>
        </div> -->

    </div>
  </div>

    <div ng-if="!hpoSimplifyVisualize" class="col-md-6 marginBottom">

          <div class="row nomargin marginTop add-border">
              <h4><a translate>hpo.common.summarymethod</a></h4>
          </div>

          <div class="col-md-12 marginTop" ng-show="newCurrentModel.converged">
            <div class="form-group clearfix">
              <div class="col-xs-6 nopaddingLeft">
                <label>
                  <translate>hpo.common.convergencecovariates</translate>
                </label>
              </div>
              <div class="col-xs-6">
                <select class="form-control"
                ng-model="newval">
                <option value="" disabled selected hidden translate>model.featuretypes.actions.choisir</option>
                <option ng-value="$index" ng-show="newCurrentModel.fitcox.length >= 2"
                   ng-repeat="opt in newCurrentModel.fitcox.slice(0,newCurrentModel.fitcox.length - 1) track by $index">
                  {{ ('hpo.common.fitcoxconvergence' | translate) +
                  " " + ($index + 1) }}
                </option>
                <option ng-value="newCurrentModel.fitcox.length-1" selected>
                  {{ 'hpo.common.fitcox' | translate }}
                </option>
                <option ng-value="'fitcoxsurv'" >
                  {{ 'hpo.common.fitcoxsurv' | translate }}
                </option>
                <option ng-value="'rsf'" >
                  {{ 'hpo.common.rsf' | translate }}
                </option>
              </select>
            </div>
          </div>
        </div>

        <div class="col-xs-12 nopaddingRight marginTop" ng-show="newval !== undefined"  ng-show="newCurrentModel.converged">
            <pre ng-bind-html='newval === "fitcoxsurv" || newval === "rsf" ?
                                newCurrentModel[newval] : newCurrentModel.fitcox[newval]'
                 style="max-height:320px;overflow-y:auto;">
            </pre>
        </div>

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

    </div>
</div>
