Ingen beskrivning

register.blade.php 8.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. @extends('layouts.app')
  2. @section('title', 'Nuevo Usuario | Gerencia Docente')
  3. @section('content')
  4. <div class="mdc-layout-grid__inner dashboard-grid">
  5. <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">
  6. <div class="mdc-layout-grid__inner">
  7. <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12-desktop mdc-layout-grid__cell--span-8-tablet mdc-layout-grid__cell--span-4-phone">
  8. <h2 class="mdc-typography--heading1">Usuario Nuevo</h2>
  9. </div>
  10. </div>
  11. @if ($errors->any())
  12. <div class="mdc-layout-grid__inner">
  13. <div class="alert alert-danger alert-dismissible fade show mdc-layout-grid__cell mdc-layout-grid__cell--span-12" role="alert">
  14. <button type="button" class="close" data-dismiss="modal" aria-label="close">
  15. <span aria-hidden="true">&times;</span>
  16. </button>
  17. <ul class="mdc-list">
  18. @foreach ($errors->all() as $error)
  19. <li class="mcd-list-item"><span class="mdc-list-item__text">{{ $error }}</span></li>
  20. @endforeach
  21. </ul>
  22. </div>
  23. </div>
  24. <br>
  25. @endif
  26. <div class="mdc-layout-grid__inner">
  27. <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">
  28. <br>
  29. <form method="POST" action="{{ route('user.store') }}">
  30. @csrf
  31. <div class="mdc-layout-grid__inner">
  32. <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">
  33. <div class="form-field">
  34. <div class="mdc-text-field" data-mdc-auto-init="MDCTextField">
  35. <input type="email" id="email-field" class="mdc-text-field__input" name="email">
  36. <label class="mdc-floating-label" for="email-field">E-mail</label>
  37. <div class="mdc-line-ripple"></div>
  38. </div>
  39. </div>
  40. </div>
  41. <hr class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">
  42. <h3 class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12 mdc-layout-grid__cell--span-4-mobile">
  43. Permisos
  44. </h3>
  45. @if (Auth::user()->is_admin)
  46. <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">
  47. <div class="mdc-form-field">
  48. <div class="mdc-checkbox" data-mdc-auto-init="MDCCheckbox">
  49. <input type="checkbox" class="mdc-checkbox__native-control" id="checkbox-admin" name="admin" value="1">
  50. <div class="mdc-checkbox__background">
  51. <svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
  52. <path class="mdc-checkbox__checkmark-path" fill="none" d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
  53. </svg>
  54. <div class="mdc-checkbox__mixedmark"></div>
  55. </div>
  56. <div class="mdc-checkbox__ripple"></div>
  57. </div>
  58. <label for="checkbox-admin">Nivel recinto</label>
  59. </div>
  60. </div>
  61. @endif
  62. @if ($faculties->isNotEmpty())
  63. <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-6">
  64. <div class="mdc-layout-grid__inner">
  65. <h4 class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">Facultades</h4>
  66. @foreach ($faculties->sortBy('name') as $faculty)
  67. <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-6">
  68. <div class="mdc-form-field">
  69. <div class="mdc-checkbox">
  70. <input type="checkbox" class="mdc-checkbox__native-control" id="checkbox-f-{{ $loop->index }}" name="faculties[]" value="{{ $faculty->id }}">
  71. <div class="mdc-checkbox__background">
  72. <svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
  73. <path class="mdc-checkbox__checkmark-path" fill="none" d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
  74. </svg>
  75. <div class="mdc-checkbox__mixedmark"></div>
  76. </div>
  77. <div class="mdc-checkbox__ripple"></div>
  78. </div>
  79. <label for="checkbox-f-{{ $loop->index }}">{{ $faculty->name }}</label>
  80. </div>
  81. </div>
  82. @endforeach
  83. </div>
  84. </div>
  85. @endif
  86. @if ($departments->isNotEmpty())
  87. <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-6">
  88. <div class="mdc-layout-grid__inner">
  89. <h4 class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">Departamentos</h4>
  90. @foreach ($departments->sortBy('title') as $department)
  91. <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-6">
  92. <div class="mdc-form-field">
  93. <div class="mdc-checkbox" data-auto-init="MDCCheckbox">
  94. <input type="checkbox" class="mdc-checkbox__native-control" id="checkbox-d-{{ $loop->index }}" name="departments[]" value="{{ $department->id }}">
  95. <div class="mdc-checkbox__background">
  96. <svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
  97. <path class="mdc-checkbox__checkmark-path" fill="none" d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
  98. </svg>
  99. <div class="mdc-checkbox__mixedmark"></div>
  100. </div>
  101. <div class="mdc-checkbox__ripple"></div>
  102. </div>
  103. <label for="checkbox-d-{{ $loop->index }}">{{ $department->name ?: $department->code }}</label>
  104. </div>
  105. </div>
  106. @endforeach
  107. </div>
  108. </div>
  109. @endif
  110. <hr class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">
  111. <div class="mdc-layout-grid__cell mdc-layout-grid__cell--span-12">
  112. <input type="submit" class="mdc-button mdc-button--raised" value="Añadir usuario">
  113. </div>
  114. </div>
  115. </form>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. @endsection
  121. @section('modals')
  122. @include('modal.semester')
  123. @include('modal.semester-clone')
  124. @include('modal.user-add')
  125. @endsection
  126. @section('scripts')
  127. <script type="text/javascript" src="/js/dashboard.js"></script>
  128. @endsection