暫無描述

edit.blade.php 1.9KB

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