Brak opisu

edit.blade.php 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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" enctype="multipart/form-data" id='modal-course-edit-form'>
  6. @method('PATCH')
  7. @csrf
  8. <input type="hidden" name="id" id="modal-course-edit-id">
  9. <div class="row">
  10. <div class="form-group col-6">
  11. <label for="modal-course-edit-code">Codificacion:</label>
  12. <input id="modal-course-edit-code" type="text" class="form-control" name="code" maxlength="8" minlength="8" size="8">
  13. </div>
  14. </div>
  15. <div class="row">
  16. <div class="form-group col-12">
  17. <label for="modal-course-edit-title">Titulo:</label>
  18. <input id="modal-course-edit-title" type="text" class="form-control" name="title" maxlength="255">
  19. </div>
  20. </div>
  21. <div class="row">
  22. <div class="form-group col-8">
  23. <label for="modal-course-edit-syllabus">Prontuario:</label>
  24. <input type="file" id="modal-course-edit-syllabus" name="syllabus">
  25. </div>
  26. <div class="form-group col-4">
  27. <label for="modal-course-edit-dept">Departamento:</label>
  28. <select id="modal-course-edit-dept" class="form-control" name="dept_id" default="1">
  29. @foreach (App\Department::all() as $department)
  30. <option value="{{ $department->id }}" @if ($department->id === 1) selected @else disabled hidden @endif >
  31. {{ $department->name }}
  32. </option>
  33. @endforeach
  34. </select>
  35. </div>
  36. </div>
  37. </form>
  38. @overwrite
  39. @section('modal_submit_text'){{ 'Editar' }}@overwrite
  40. @section('modal_submit')
  41. function(){document.getElementById('modal-course-edit-form').submit()}
  42. @overwrite