Ingen beskrivning

create.blade.php 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. @extends('layouts.modal')
  2. @section('modal_id'){{ 'modal-course-create' }}@overwrite
  3. @section('modal_title'){{ 'Creando curso nuevo' }}@overwrite
  4. @section('modal_body')
  5. <form method="POST" action="/course" enctype="multipart/form-data" id='modal-course-create-form'>
  6. @csrf
  7. <div class="row">
  8. <div class="form-group col-sm-6">
  9. <label for="modal-course-create-code-field">Codificacion:</label>
  10. <input id="modal-course-create-code-field" type="text" class="form-control" name="code" maxlength="8" minlength="8" size="8" required>
  11. </div>
  12. </div>
  13. <div class="form-group row">
  14. <div class="col-sm-12">
  15. <label for="modal-course-create-title-field">Titulo:</label>
  16. <input id="modal-course-create-title-field" type="text" class="form-control" name="title" maxlength="255">
  17. </div>
  18. </div>
  19. <div class="row">
  20. <div class="form-group col-sm-8">
  21. <label for="modal-course-create-syllabus-field">Prontuario:</label>
  22. <input id="modal-course-create-syllabus-field" type="file" name="syllabus">
  23. </div>
  24. <div class="form-group col-sm-4">
  25. <label for="modal-dept-field">Departamento:</label>
  26. <select id="modal-dept-field" class="form-control" name="dept_id" default="1" required>
  27. @foreach (App\Department::all() as $department)
  28. <option value="{{ $department->id }}"
  29. @if ($department->id === 1)
  30. selected
  31. @else
  32. {{-- TODO: Check if this should be displayed --}}
  33. disabled hidden
  34. @endif
  35. >{{ $department->name }}</option>
  36. @endforeach
  37. </select>
  38. </div>
  39. </div>
  40. </form>
  41. @overwrite
  42. @section('modal_submit_text'){{ 'Crear curso' }}@overwrite
  43. @section('modal_submit')
  44. function(){document.getElementById('modal-course-create-form').submit()}
  45. @overwrite