<div style="height:450px">
  <h4>Paramétrage prise automatique RDV</h4>
  <form class="form-horizontal">
    <div class="form-group ">
      <label class="control-label col-sm-2" for="agent">Agent</label>
      <div class="col-sm-6">
        <input
          type="text"
          ng-model="paramData.agent.login"
          class="form-control"
          id="agent"
        />
      </div>
      <div class="col-sm-2">
        <user-picker res="paramData.agent" roles="['ANC_agent']"></user-picker>
      </div>
    </div>
    <div class="form-group ">
      <label class="control-label col-sm-2" for="agent">Date</label>
      <div class="col-sm-6">
        <input
          type="text"
          class="form-control"
          ng-model="paramData.date"
          data-date-format="dd-MM-yyyy"
          model-date-format="yyyy-MM-ddTHH:mm:ss.sssZ"
          data-min-date="{{dateMin}}"
          data-max-date="{{dateMax}}"
          placeholder="Date"
          bs-datepicker
          data-autoclose="true"
        />
      </div>
      <div class="col-xs-2">
        <button
          ng-click="openCalendarRdvs(paramData.agent.login,paramData.date)"
          ng-disabled="!paramData.agent.login"
        >
          <i class="fa fa-calendar"></i>
        </button>
      </div>
    </div>
    <div class="form-group ">
      <label class="control-label col-sm-2" for="agent">Délai</label>
      <div class="col-sm-7">
        <input
          type="number"
          ng-model="paramData.delai"
          class="form-control"
          id="delai"
        />
      </div>
      <span> mn</span>
    </div>
    <div>
      <table class="table table-hover">
        <thead>
          <tr>
            <th style="text-align:left">
              <input
                type="checkbox"
                ng-model="matinee"
                class="form-check-input"
              />Matinée
            </th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>
              <form class="form-inline" ng-hide="!matinee">
                <div class="form-group col-sm-6">
                  <div class="col-sm-6">
                    <label for="datedebut">début</label>
                  </div>
                  <div class="col-sm-6">
                    <input
                      type="text"
                      class="form-control"
                      ng-model="paramData.dateDebut1"
                      data-time-format="HH:mm"
                      model-time-format="yyyy-MM-ddTHH:mm:ss.sssZ"
                      data-autoclose="1"
                      placeholder="h"
                      bs-timepicker
                    />
                  </div>
                </div>
                <div class="form-group col-sm-6">
                  <div class="col-sm-6">
                    <label for="datefin">fin</label>
                  </div>
                  <div class="col-sm-6">
                    <input
                      type="text"
                      class="form-control"
                      ng-model="paramData.dateFin1"
                      data-time-format="HH:mm"
                      model-time-format="yyyy-MM-ddTHH:mm:ss.sssZ"
                      time-type="string"
                      data-autoclose="1"
                      placeholder="h"
                      bs-timepicker
                    />
                  </div>
                </div>
              </form>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
    <div>
      <table class="table table-hover">
        <thead>
          <tr>
            <th style="text-align:left">
              <input
                type="checkbox"
                ng-model="apresmidi"
                class="form-check-input"
              />Après midi
            </th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>
              <form class="form-inline" ng-hide="!apresmidi">
                <div class="form-group col-sm-6">
                  <div class="col-sm-6">
                    <label for="datedebut">début</label>
                  </div>
                  <div class="col-sm-6">
                    <input
                      type="text"
                      class="form-control"
                      ng-model="paramData.dateDebut2"
                      data-time-format="HH:mm"
                      model-time-format="yyyy-MM-ddTHH:mm:ss.sssZ"
                      time-type="string"
                      data-autoclose="1"
                      placeholder="h"
                      bs-timepicker
                    />
                  </div>
                </div>
                <div class="form-group col-sm-6">
                  <div class="col-sm-6">
                    <label for="datefin">fin</label>
                  </div>
                  <div class="col-sm-6">
                    <input
                      type="text"
                      class="form-control"
                      ng-model="paramData.dateFin2"
                      data-time-format="HH:mm"
                      model-time-format="yyyy-MM-ddTHH:mm:ss.sssZ"
                      time-type="string"
                      data-autoclose="1"
                      placeholder="h"
                      bs-timepicker
                    />
                  </div>
                </div>
              </form>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </form>
  <button
    type="button"
    ng-click="saveParametresVisites()"
    class="btn btn-primary pull-right"
  >
    <translate>common.save</translate>
  </button>
  <button
    type="button"
    ng-click="cancelParametresVisites()"
    class="btn btn-default pull-right"
  >
    <translate>common.close</translate>
  </button>
</div>
