templates/course-template/modals/time-edit.html.twig line 1

Open in your IDE?
  1. <form method="post" class="ajax" action="{{ path('course_template_proposals_time_update', { 'id': course.id, 'timeId': time.id }) }}">
  2.     <div class="modal-header">
  3.         <h5 class="modal-title" id="exampleModalLabel">Termin-Vorlage bearbeiten</h5>
  4.         <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  5.             <span aria-hidden="true">&times;</span>
  6.         </button>
  7.     </div>
  8.     {%  if time.getAvailability() == 'Booked' %}
  9.         <div class="modal-body">
  10.         <b>{{ time.getOrderItem().owner.orderItem[0].name  }}<br></b>
  11.         <small> {{ time.start|date('d.m.Y H:i') }} - {{ time.end|date('H:i') }}</small>
  12.         
  13.                 <p>Diese Zeit wurde reserviert oder gebucht.</p>
  14.                <a class="btn btn-primary" 
  15.    href="{{ path('order_show', { 
  16.        'id': time.getOrderItem().owner.orderItem|last.order.id, 
  17.        'occurrenceId': time.getOccurrence().getId() 
  18.    }) }}">
  19.     Reservierung/Buchung aufrufen
  20. </a>
  21.                
  22.           
  23.         </div>
  24.     {% else %}
  25.         <div class="modal-body">
  26.             <div class="form-group">
  27.                 <label for="availability">Status</label>
  28.                 <select class="form-control" id="availability" name="availability">
  29.                     <option {% if time.getAvailability() == "Bookable" %}selected{% endif %} value="Bookable">Buchung möglich</option>
  30.                     <option {% if time.getAvailability() == "Requestable" %}selected{% endif %} value="Requestable">Anfrage möglich</option>
  31.                     <option {% if time.getAvailability() == "NotAvailable" %}selected{% endif %} value="NotAvailable">nicht verfügbar</option>
  32.                 </select>
  33.             </div>
  34.             <div class="form-group">
  35.                 <label for="note">Notiz</label>
  36.                 <textarea class="form-control" name="note" id="note" placeholder="Notiz">{{ time.getNote() }}</textarea>
  37.             </div>
  38.         </div>
  39.         <div class="modal-footer">
  40.             <!--
  41.             {% if app.user.role == 'ROLE_ADMIN' %}
  42.                 <a href="{{ path('course-templates_convert', { 'courseId': course.id, 'timeId': time.id }) }}" class="btn btn-info mr-auto">Buchung erstellen</a>
  43.             {% endif %}
  44.             -->
  45.             <button type="submit" class="btn btn-success">Speichern</button>
  46.         </div>
  47.     {% endif %}
  48. </form>
  49.  <div class="modal-footer">
  50. {%  if time.getAvailability() != 'Bookable' %}
  51. <form method="post" 
  52.       action="{{ path('course_template_proposals_time_unbook', { 'id': course.id, 'timeId': time.id }) }}" 
  53.       class="ajax-form" 
  54.       data-debug="ajax-form">
  55.     <button type="submit" class="btn btn-danger btn-sm">
  56.         Reservierung/Buchung freigeben
  57.     </button>
  58. </form>
  59. {% endif %}
  60. <div id="ajax-feedback" class="alert" style="display: none;"></div>
  61.   </div>