|
5 | 5 | <input type="text" class="form-control" name="upload-title" id="upload-title" placeholder="@lang('File title here...')" required> |
6 | 6 | <br/> |
7 | 7 | @endif |
| 8 | + @if($upload_type == 'routine') |
| 9 | + <label for="sections">For</label> |
| 10 | + <select id="sections" class="form-control" name="sections" required> |
| 11 | + @foreach($classes as $class) |
| 12 | + @foreach($class->sections as $section) |
| 13 | + <option value="{{$section->id}}"> |
| 14 | + @lang('Class'): {{$class->class_number}} - |
| 15 | + @lang('Section'): {{$section->section_number}} |
| 16 | + </option> |
| 17 | + @endforeach |
| 18 | + @endforeach |
| 19 | + </select> |
| 20 | + @elseif($upload_type == 'syllabus') |
| 21 | + <label for="classes">Class</label> |
| 22 | + <select id="classes" class="form-control" name="classes" required> |
| 23 | + @foreach($classes as $class) |
| 24 | + <option value="{{$class->id}}"> |
| 25 | + @lang('Class'): {{$class->class_number}} |
| 26 | + </option> |
| 27 | + @endforeach |
| 28 | + </select> |
| 29 | + @endif |
8 | 30 | <input class="form-control-sm" id="fileupload" type="file" accept=".xlsx,.xls,.doc,.docx,.ppt,.pptx,.txt,.pdf,image/png,image/jpeg" name="file" data-url="{{url('upload/file')}}"> |
9 | 31 | <br/> |
10 | 32 | <div class="progress"> |
|
61 | 83 | data.context.text(@json( __('File Upload has been canceled'))); |
62 | 84 | }); |
63 | 85 | @if($upload_type != 'profile') |
64 | | - data.formData = {upload_type: '{{$upload_type}}',title: $('#upload-title').val()}; |
| 86 | + @if($upload_type == 'routine') |
| 87 | + data.formData = {upload_type: '{{$upload_type}}',section_id:$('#sections').val(),title: $('#upload-title').val()}; |
| 88 | + @elseif($upload_type == 'syllabus') |
| 89 | + data.formData = {upload_type: '{{$upload_type}}',class_id:$('#classes').val(),title: $('#upload-title').val()}; |
| 90 | + @else |
| 91 | + data.formData = {upload_type: '{{$upload_type}}',title: $('#upload-title').val()}; |
| 92 | + @endif |
65 | 93 | @else |
66 | 94 | data.formData = {upload_type: '{{$upload_type}}',user_id: $('#userIdPic').val()}; |
67 | 95 | @endif |
|
0 commit comments