No Description

create.blade.php 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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">Codificacion:</label>
  10. <input id="modal-course-create-code" 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">Titulo:</label>
  16. <input id="modal-course-create-title" 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">Prontuario:</label>
  22. <input id="modal-course-create-syllabus" type="file" name="syllabus">
  23. </div>
  24. <div class="form-group col-sm-4">
  25. <label for="modal-course-create-dept">Departamento:</label>
  26. <select id="modal-course-create-dept" class="form-control" name="dept_id" default="1" required>
  27. @foreach (App\Department::all() as $department)
  28. <option value="{{ $department->id }}" @if ($department->id === 1) selected @else disabled hidden @endif >
  29. {{ $department->name }}
  30. </option>
  31. @endforeach
  32. </select>
  33. </div>
  34. </div>
  35. </form>
  36. @overwrite
  37. @section('modal_submit_text'){{ 'Crear curso' }}@overwrite
  38. @section('modal_submit')
  39. function(){document.getElementById('modal-course-create-form').submit()}
  40. @overwrite