Sin descripción

create.blade.php 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. @extends('layouts.modal')
  2. @section('modal_id'){{ 'modal-professor-create' }}@overwrite
  3. @section('modal_title'){{ 'Creando profesor nuevo' }}@overwrite
  4. @section('modal_body')
  5. <form method="POST" action="/professor" enctype="multipart/form-data" id='modal-professor-create-form'>
  6. @csrf
  7. <div class="row">
  8. <div class="form-group col-6">
  9. <label for="modal-professor-create-num-field"># de Profesor:</label>
  10. <input id="modal-professor-create-num-field" type="text" class="form-control" name="num_prof" maxlength="16" required>
  11. </div>
  12. <div class="form-group col-4">
  13. <label for="modal-professor-create-type-field">Tipo:</label>
  14. <select id="modal-professor-create-type-field" class="form-control" name="type">
  15. <option value="plantilla">Plantilla</option>
  16. <option value="contrato">Contrato</option>
  17. <option value="ta">T.A.</option>
  18. </select>
  19. </div>
  20. </div>
  21. <div class="form-group row">
  22. <div class="col-4">
  23. <label for="modal-professor-create-fname-field">Nombre:</label>
  24. <input id="modal-professor-create-fname-field" type="text" class="form-control" name="first_name" maxlength="255">
  25. </div>
  26. <div class="col-8">
  27. <label for="modal-professor-create-lname-field">Apellido:</label>
  28. <input id="modal-professor-create-lname-field" type="text" class="form-control" name="last_name" maxlength="255">
  29. </div>
  30. </div>
  31. <div class="row">
  32. <div class="form-group col-sm-8">
  33. <label for="modal-professor-create-email-field">Email:</label>
  34. <input id="modal-professor-create-email-field" type="email" name="email">
  35. </div>
  36. <div class="form-group col-4">
  37. <label for="modal-professor-create-dept-field">Departamento:</label>
  38. <select id="modal-professor-create-dept-field" class="form-control" name="dept_id" default="1" required>
  39. @foreach (App\Department::all() as $department)
  40. <option value="{{ $department->id }}"
  41. @if ($department->id === 1)
  42. selected
  43. @else
  44. {{-- TODO: Check if this should be displayed --}}
  45. disabled hidden
  46. @endif
  47. >{{ $department->name }}</option>
  48. @endforeach
  49. </select>
  50. </div>
  51. </div>
  52. </form>
  53. @overwrite
  54. @section('modal_submit_text'){{ 'Crear curso' }}@overwrite
  55. @section('modal_submit')
  56. function(){document.getElementById('modal-professor-create-form').submit()}
  57. @overwrite