accessoverview.tpl 841 B

123456789101112131415161718192021222324252627282930313233343536
  1. <h2 class="page-header">{{ 'DisplayAccessOverview'|get_lang }}</h2>
  2. {{ form }}
  3. <h3 class="page-header">{{ 'Results'|get_lang }}</h3>
  4. {{ table }}
  5. <script>
  6. $(document).on('ready', function () {
  7. var courseIdEl = $('#course_id'),
  8. sessionIdEl = $('#session_id');
  9. if (!courseIdEl.val()) {
  10. sessionIdEl
  11. .prop('disabled', true)
  12. .selectpicker('refresh');
  13. }
  14. courseIdEl.on('change', function() {
  15. var self = $(this);
  16. if (!this.value) {
  17. sessionIdEl
  18. .prop("disabled", true)
  19. .selectpicker('refresh');
  20. return;
  21. }
  22. sessionIdEl
  23. .prop("disabled", false)
  24. .selectpicker('refresh');
  25. });
  26. });
  27. </script>