templates/abscence_sheet/edit.html.twig line 1

Open in your IDE?
  1. {% extends "layout/backEndLayout.html.twig" %}
  2. {% form_theme edit_form 'bootstrap_4_layout.html.twig' %}
  3. {% block content %}
  4. <div class="row mt-4">
  5. <div class="col-12 jumbotron mx-auto">
  6. <article class="text-center">
  7. <br/>
  8. <div class="card-header">
  9. <h4 class="my-0 font-weight-normal text-center text-justify text-uppercase"> Modifier evaluation {{ abscence_sheet.id }} </h4>
  10. </div>
  11. <div class="example-wrapper">
  12. <h1 class="center">Edition fiche d'abscence N°
  13. {{abscence_sheet.id}}
  14. Sequence
  15. {{abscence_sheet.sequence.code}}
  16. Cours
  17. {{abscence_sheet.classRoom.name}}
  18. </h1>
  19. <div class="row">
  20. <div class="col-lg-4 mar-bot30"></div>
  21. <div class="col-lg-4 mar-bot30">
  22. {{ form_start(edit_form) }}
  23. {{ form_widget(edit_form) }}
  24. </div>
  25. <div class="col-lg-4 mar-bot30"></div>
  26. </div>
  27. <div class="row">
  28. <div class="col-lg-1 mar-bot30"></div>
  29. <div class="col-lg-10 mar-bot30">
  30. {% if students is defined %}
  31. <table class="table table-bordered table-hover table-sortable" id="tab_logic">
  32. <thead>
  33. <tr>
  34. <th style="width:10%;" class="text-center">Matricule</th>
  35. <th style="width:30%;" class="text-center" >Nom et prénom</th>
  36. <th style="width:20%;" class="text-center" >Heures d'abscence</th>
  37. <th style="width:30%;" class="text-center" >Raison</th>
  38. </tr>
  39. </thead>
  40. <tbody>
  41. {% for student in students %}
  42. <tr class="hidden" data-id="0" id='addr0'>
  43. <td data-name="name">
  44. {{student.matricule}}
  45. </td>
  46. <td data-name="name">
  47. {{student.lastname}}
  48. {{student.firstname}}
  49. </td>
  50. <td data-name="desc">
  51. <input type="number" id="{{student.matricule}}" placeholder="0...100" value={{abscences[student.matricule] is defined ? abscences[student.matricule].weight : 0}}
  52. min="0" max="100" class="form-control value" name="{{student.matricule}}weight"/>
  53. </td>
  54. <td data-name="desc">
  55. <input type="text" placeholder="Raison" class="form-control" value={{abscences[student.matricule] is defined ? abscences[student.matricule].reason : "RAS"}} name="{{student.matricule}}raison" />
  56. </td>
  57. </tr>
  58. {% endfor %}
  59. </tbody>
  60. </table>
  61. {% endif %}
  62. </div>
  63. <div class="col-lg-1 mar-bot30"></div>
  64. </div>
  65. <div class="btn-group center record_actions">
  66. <a class="btn btn-info" href="{{ path('admin_abscences_sheet_index') }}">
  67. <i class="fa fa-list"></i>
  68. {{ 'Back to the list'|trans({}, 'admin') }}
  69. </a>
  70. <button class="btn btn-warning" type="submit">
  71. <i class="fa fa-edit"></i>
  72. {{ 'Update'|trans({}, 'admin') }}</button>
  73. </div>
  74. </div>
  75. </article>
  76. </div>
  77. </div>
  78. {% endblock %}
  79. {% block javascripts %}
  80. {{parent()}}
  81. <script type="text/javascript" src="{{ asset('assets/js/jquery.js') }}"></script>
  82. <script type="text/javascript">
  83. var idClassRoom, idSequence=$("#abscence_sheet_sequence").val(), startDate, endDate;
  84. $("#abscence_sheet_sequence").change(function () {
  85. idSequence = $(this).val();
  86. });
  87. $("#abscence_sheet_startDate").change(function () {
  88. startDate = $(this).val();
  89. });
  90. $("#abscence_sheet_endDate").change(function () {
  91. endDate = $(this).val();
  92. });
  93. var abscencesJson = [],
  94. postData;
  95. </script>
  96. {% endblock javascripts %}