-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupload.blade.php
159 lines (145 loc) · 9.75 KB
/
upload.blade.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
@extends('layouts.editapp')
@section('content')
<div class="slice slice-sm bg-section-secondary" x-data>
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-9">
<div class="row">
<div class="col-lg-12">
<form enctype="multipart/form-data" id="form" method="POST" id="form" action="{{route('upload.update',$user->upload->id)}}" >
@method("PATCH")
<div class="align-items-center">
@csrf
<div class="row align-items-center">
<div class="col-sm-4 text-center">
<img src="{{Storage::url($upload->student_image)}}" alt="" x-ref='student_image' class=" mb-2 img-thumbnail border">
<div>
<input type="file" accept="image/*" name="student_image" id="student_image" class="custom-input-file" @change="readerFile = new FileReader(); readerFile.onload = function(loadEvent){ $refs.student_image.src=loadEvent.target.result }; readerFile.readAsDataURL($event.target.files[0])" />
<label for="student_image">
<i data-feather="upload"></i>
<span>Student Photho</span>
</label>
</div>
@error('student_image')
<span class="text-danger" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-sm-4 text-center">
<img src="{{Storage::url($upload->father_image)}}" alt="" x-ref='father_image' class=" mb-2 img-thumbnail border">
<div>
<input type="file" accept="image/*" name="father_image" id="father_image" class="custom-input-file" @change="readerFile = new FileReader();readerFile.onload = function(loadEvent){ $refs.father_image.src=loadEvent.target.result }; readerFile.readAsDataURL($event.target.files[0]);$('#form')[0].reportValidity();" />
<label for="father_image">
<i data-feather="upload"></i>
<span>Father's Photho</span>
</label>
</div>
@error('father_image')
<span class="text-danger" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-sm-4 text-center">
<img src="{{Storage::url($upload->mother_image)}}" alt="" x-ref='mother_image' class=" mb-2 img-thumbnail border">
<div>
<input type="file" accept="image/*" name="mother_image" id="mother_image" class="custom-input-file" @change="readerFile = new FileReader(); readerFile.onload = function(loadEvent){ $refs.mother_image.src=loadEvent.target.result }; readerFile.readAsDataURL($event.target.files[0])" />
<label for="mother_image">
<i data-feather="upload"></i>
<span>Mother Photho</span>
</label>
</div>
@error('mother_image')
<span class="text-danger" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-sm-6 text-center p-4">
<img src="{{Storage::url($upload->signature_image)}}" alt="" x-ref='signature_image' class=" mb-2 img-thumbnail border">
<div>
<input type="file" accept="image/*" name="signature_image" id="signature_image" class="custom-input-file" @change="readerFile = new FileReader(); readerFile.onload = function(loadEvent){ $refs.signature_image.src=loadEvent.target.result }; readerFile.readAsDataURL($event.target.files[0])" />
<label for="signature_image">
<i data-feather="upload"></i>
<span>Signature Image</span>
</label>
</div>
@error('signature_image')
<span class="text-danger" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-sm-6">
<div class="row">
<div class="col-sm-12 text-center">
<div>
<input type="file" name="aadhar_card" id="aadhar_card" class="custom-input-file" />
<label for="aadhar_card">
<i data-feather="upload"></i>
<span> Aadhar Card </span>
</label>
</div>
@error('aadhar_card')
<span class="text-danger" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-sm-12 my-2 text-center">
<div>
<input type="file" name="file1" id="file1" class="custom-input-file" />
<label for="file1">
<i data-feather="upload"></i>
<span>File 1 (PDF,JPG,PNG)</span>
</label>
</div>
@error('file1')
<span class="text-danger" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-sm-12 text-center">
<div>
<input type="file" name="file2" id="file2" class="custom-input-file"/>
<label for="file2">
<i data-feather="upload"></i>
<span>File 2 (PDF,JPG,PNG)</span>
</label>
</div>
@error('file2')
<span class="text-danger" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
</div>
</div>
</div>
<div class="mt-3">
<button type="sumbit" @click.prevent="if(!$('#form')[0].checkValidity()){$('#form')[0].reportValidity();}else{Swal.fire({title: 'Are you sure?',text: 'You wont be able to revert this!',icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes, Sumbit it!'
}).then((result) => {
if (result.value) {
$( '#form').submit();
}
});}"
class="btn btn-sm btn-primary"
>Save</button>
<button type="reset" class="btn btn-sm btn-danger"
>Reset</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
@endsection