<template name="addEditEventModal">
  <div class="modal fade" id="add-edit-event-modal" tabindex="-1" role="dialog" aria-labelledby="add-edit-event-modal">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="add-edit-event">{{modalLabel.label}} Event</h4>
      </div>


      <form id="add-edit-event-form">
        <div class="modal-body" style="padding-left:50px;width:600px;">
          <div class="form-group">
            <div class="row">
                  <div class="col-xs-12 col-sm-4">
                    <label for="type">Priorité de réservation</label>
                    <select {{disabled}} name="type" class="form-control">
                      <option selected="{{selected currentUser.role 'Babault' }}" value="Babault">Babault</option>
                      <option selected="{{selected currentUser.role 'Famille' }}" value="Famille">Famille</option>
                      <option selected="{{selected currentUser.role 'Guest' }}" value="Guest">Invité</option>
                    </select>
                  </div>
                <div style="display:flex;flex-direction:row;justify-content:center;position:relative;right:55px;">
                    <div class="col-xs-12 col-sm-3">
                      <label for="start">Debut de la réservation</label>
                      <input type="text" name="start" class="form-control" value="{{event.start}}">
                    </div>
                    <div class="col-xs-12 col-sm-3" style="width:50px;"></div>
                    <div class="col-xs-12 col-sm-3">
                      <label for="end">Fin de la réservation</label>
                      <input type="text" name="end" class="form-control" value="{{#if event.end}}{{event.end}}{{else}}{{event.start}}{{/if}}">
                    </div>
                </div>
            </div>
          </div>
          <div class="form-group" style="position:relative;right:30px;">
            <label for="title">Auteur de la réservation</label>
            <input disabled type="text" name="title" class="form-control" value="{{event.title}}">
          </div>
          <div class="row">
            <div class="col-xs-12 col-sm-4">
              <label for="guests">Nombre d'invités</label>
              <input type="text" name="guests" class="form-control" value="{{event.guests}}">
            </div>
            <div class="col-xs-12 col-sm-4">
              <label for="comment">Commentaires : </label>
              <textarea name="comment" id="comment" style="width:500px;height:125px;"></textarea>
            </div>
          </div>
        </div>
        <div class="modal-footer">
          {{#if modalType 'edit'}}
            <button class="btn btn-danger pull-left delete-event">Supprimer la réservation</button>
          {{/if}}
          <button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
          <button type="submit" class="btn btn-success">{{modalLabel.button}} Event</button>
        </div>
      </form>


    </div>
  </div>
</div>
</template>
