1 | @extends("layouts.dashboard")
|
---|
2 |
|
---|
3 | @section("title", "Settings - Dashboard | TechnoBlog")
|
---|
4 |
|
---|
5 | @section("dashboard_content")
|
---|
6 |
|
---|
7 | <div class="my-3 my-md-5">
|
---|
8 |
|
---|
9 | <div class="container">
|
---|
10 |
|
---|
11 | <div class="row">
|
---|
12 |
|
---|
13 | <div class="col-sm-12">
|
---|
14 |
|
---|
15 | <div class="card">
|
---|
16 |
|
---|
17 | <div class="card-header">
|
---|
18 | <h3 class="card-title font-weight-bold">Settings</h3>
|
---|
19 | </div>
|
---|
20 |
|
---|
21 | <div class="card-body">
|
---|
22 |
|
---|
23 | <div class="row">
|
---|
24 | <div class="col-md-4">
|
---|
25 | <div class="nav flex-column nav-pills" id="v-pills-tab" role="tablist"
|
---|
26 | aria-orientation="vertical">
|
---|
27 | <a class="nav-link active pt-2 pb-2" id="v-pills-home-tab" data-toggle="pill"
|
---|
28 | href="#v-pills-home" role="tab" aria-controls="v-pills-home"
|
---|
29 | aria-selected="true">Profile Settings</a>
|
---|
30 | <a class="nav-link pt-2 pb-2" id="v-pills-profile-tab" data-toggle="pill"
|
---|
31 | href="#v-pills-profile" role="tab" aria-controls="v-pills-profile"
|
---|
32 | aria-selected="false">Account Settings</a>
|
---|
33 | </div>
|
---|
34 | </div>
|
---|
35 |
|
---|
36 | <div class="col-md-8">
|
---|
37 | <div class="tab-content" id="v-pills-tabContent">
|
---|
38 | <div class="tab-pane fade show active" id="v-pills-home" role="tabpanel"
|
---|
39 | aria-labelledby="v-pills-home-tab">
|
---|
40 |
|
---|
41 | <form class="actionForm" action="{{ route("dashboard.settings.personal") }}"
|
---|
42 | method="post" accept-charset="UTF-8">
|
---|
43 |
|
---|
44 | @method("patch")
|
---|
45 | @csrf
|
---|
46 |
|
---|
47 | <fieldset class="form-fieldset">
|
---|
48 |
|
---|
49 | <h4 class="font-weight-normal border-bottom pb-2">Personal
|
---|
50 | Information</h4>
|
---|
51 |
|
---|
52 | <div class="row">
|
---|
53 |
|
---|
54 | <div class="col-md-4">
|
---|
55 | <div class="form-group">
|
---|
56 | <label class="form-label">Name</label>
|
---|
57 | <input type="text"
|
---|
58 | value="{{ old("name", $userProfile->user->name) }}"
|
---|
59 | name="name" class="form-control">
|
---|
60 | </div>
|
---|
61 | </div>
|
---|
62 |
|
---|
63 | <div class="col-md-4">
|
---|
64 | <div class="form-group">
|
---|
65 | <label class="form-label">Surname</label>
|
---|
66 | <input type="text"
|
---|
67 | value="{{ old("surname", $userProfile->user->surname) }}"
|
---|
68 | name="surname" class="form-control">
|
---|
69 | </div>
|
---|
70 | </div>
|
---|
71 |
|
---|
72 | <div class="col-md-4">
|
---|
73 | <div class="form-group">
|
---|
74 | <label class="form-label">Mobile Number Country
|
---|
75 | Code</label>
|
---|
76 | <select class="selectData" id="selectWithContent"
|
---|
77 | name="mobile_number_country">
|
---|
78 | <option value=""></option>
|
---|
79 | @foreach ($countries as $code => $name)
|
---|
80 | <option value="{{ $code }}"
|
---|
81 | {{ (old("mobile_number_country", $userProfile->user->country_code) == $code) ? "selected" : "" }} data-data='{"image": "/assets/images/flags/{{ strtolower($code) }}.svg"}'>{{ $name }}</option>
|
---|
82 | @endforeach
|
---|
83 | </select>
|
---|
84 | </div>
|
---|
85 | </div>
|
---|
86 |
|
---|
87 | <div class="col-md-4">
|
---|
88 | <div class="form-group">
|
---|
89 | <label class="form-label">Mobile Number</label>
|
---|
90 | <input type="text"
|
---|
91 | value="{{ old("mobile_number", $userProfile->user->mobile_number) }}"
|
---|
92 | name="mobile_number" class="form-control">
|
---|
93 | </div>
|
---|
94 | </div>
|
---|
95 |
|
---|
96 | <div class="col-md-8">
|
---|
97 | <div class="form-group">
|
---|
98 | <label class="form-label">Short Bio</label>
|
---|
99 | <input type="text"
|
---|
100 | value="{{ old("short_bio", $userProfile->short_bio) }}"
|
---|
101 | name="short_bio" class="form-control"
|
---|
102 | autocomplete="off">
|
---|
103 | </div>
|
---|
104 | </div>
|
---|
105 |
|
---|
106 | <div class="col-md-8">
|
---|
107 | <div class="form-group">
|
---|
108 | <label class="form-label">Public Profile Link</label>
|
---|
109 | <div class="input-group">
|
---|
110 | <span class="input-group-prepend" id="basic-addon3">
|
---|
111 | <span class="input-group-text">https://technoblog.com/profile/</span>
|
---|
112 | </span>
|
---|
113 | <input type="text"
|
---|
114 | value="{{ old("profile_link", $userProfile->profile_link) }}"
|
---|
115 | name="profile_link" class="form-control"
|
---|
116 | autocomplete="off">
|
---|
117 | </div>
|
---|
118 | </div>
|
---|
119 | </div>
|
---|
120 |
|
---|
121 | <div class="col-md-12">
|
---|
122 | <div class="form-group mb-0 float-right">
|
---|
123 | <input type="submit" value="Submit"
|
---|
124 | class="submitBtn btn btn-primary">
|
---|
125 | </div>
|
---|
126 | </div>
|
---|
127 |
|
---|
128 | </div>
|
---|
129 |
|
---|
130 | </fieldset>
|
---|
131 |
|
---|
132 | </form>
|
---|
133 |
|
---|
134 | <form class="actionForm" action="{{ route("dashboard.settings.photos") }}"
|
---|
135 | method="post" enctype="multipart/form-data">
|
---|
136 |
|
---|
137 | @method("patch")
|
---|
138 | @csrf
|
---|
139 |
|
---|
140 | <fieldset class="form-fieldset">
|
---|
141 |
|
---|
142 | <h4 class="font-weight-normal border-bottom pb-2">Photos</h4>
|
---|
143 |
|
---|
144 | <div class="row">
|
---|
145 |
|
---|
146 | <div class="col-md-6">
|
---|
147 | <div class="form-group">
|
---|
148 | <label class="form-label">Upload Profile Picture</label>
|
---|
149 | <div class="custom-file">
|
---|
150 | <input type="file" class="custom-file-input"
|
---|
151 | name="profile_image">
|
---|
152 | <label class="custom-file-label">Choose file</label>
|
---|
153 | </div>
|
---|
154 | </div>
|
---|
155 | </div>
|
---|
156 |
|
---|
157 | <div class="col-md-6">
|
---|
158 | <div class="form-group">
|
---|
159 | <label class="form-label">Upload Cover Picture</label>
|
---|
160 | <div class="custom-file">
|
---|
161 | <input type="file" class="custom-file-input"
|
---|
162 | name="cover_image">
|
---|
163 | <label class="custom-file-label">Choose file</label>
|
---|
164 | </div>
|
---|
165 | </div>
|
---|
166 | </div>
|
---|
167 |
|
---|
168 | <div class="col-md-12">
|
---|
169 | <div class="form-group mb-0 float-right">
|
---|
170 | <input type="submit" value="Submit"
|
---|
171 | class="submitBtn btn btn-primary">
|
---|
172 | </div>
|
---|
173 | </div>
|
---|
174 |
|
---|
175 | </div>
|
---|
176 |
|
---|
177 | </fieldset>
|
---|
178 |
|
---|
179 | </form>
|
---|
180 |
|
---|
181 | <form class="actionForm" action="{{ route("dashboard.settings.social") }}"
|
---|
182 | method="post" accept-charset="UTF-8">
|
---|
183 |
|
---|
184 | @method("patch")
|
---|
185 | @csrf
|
---|
186 |
|
---|
187 | <fieldset class="form-fieldset">
|
---|
188 |
|
---|
189 | <h4 class="font-weight-normal border-bottom pb-2">Social Site
|
---|
190 | Links</h4>
|
---|
191 |
|
---|
192 | <div class="row">
|
---|
193 |
|
---|
194 | <div class="col-md-6">
|
---|
195 | <div class="form-group">
|
---|
196 | <label class="form-label">Facebook</label>
|
---|
197 | <div class="input-group">
|
---|
198 | <span class="input-group-prepend" id="basic-addon3">
|
---|
199 | <span
|
---|
200 | class="input-group-text">https://facebook.com/</span>
|
---|
201 | </span>
|
---|
202 | <input type="text" class="form-control"
|
---|
203 | name="facebook"
|
---|
204 | value="{{ old("facebook", $userProfile->facebook_link) }}">
|
---|
205 | </div>
|
---|
206 | </div>
|
---|
207 | </div>
|
---|
208 |
|
---|
209 | <div class="col-md-6">
|
---|
210 | <div class="form-group">
|
---|
211 | <label class="form-label">Instagram</label>
|
---|
212 | <div class="input-group">
|
---|
213 | <span class="input-group-prepend" id="basic-addon3">
|
---|
214 | <span class="input-group-text">https://instagram.com/</span>
|
---|
215 | </span>
|
---|
216 | <input type="text" class="form-control"
|
---|
217 | name="instagram"
|
---|
218 | value="{{ old("instagram", $userProfile->instagram_link) }}">
|
---|
219 | </div>
|
---|
220 | </div>
|
---|
221 | </div>
|
---|
222 |
|
---|
223 | <div class="col-md-6 mt-3">
|
---|
224 | <div class="form-group">
|
---|
225 | <label class="form-label">Twitter</label>
|
---|
226 | <div class="input-group">
|
---|
227 | <span class="input-group-prepend" id="basic-addon3">
|
---|
228 | <span
|
---|
229 | class="input-group-text">https://twitter.com/</span>
|
---|
230 | </span>
|
---|
231 | <input type="text" class="form-control"
|
---|
232 | name="twitter"
|
---|
233 | value="{{ old("twitter", $userProfile->twitter_link) }}">
|
---|
234 | </div>
|
---|
235 | </div>
|
---|
236 | </div>
|
---|
237 |
|
---|
238 | <div class="col-md-6 mt-3">
|
---|
239 | <div class="form-group">
|
---|
240 | <label class="form-label">Youtube</label>
|
---|
241 | <div class="input-group">
|
---|
242 | <span class="input-group-prepend" id="basic-addon3">
|
---|
243 | <span
|
---|
244 | class="input-group-text">https://youtube.com/</span>
|
---|
245 | </span>
|
---|
246 | <input type="text" class="form-control"
|
---|
247 | name="youtube"
|
---|
248 | value="{{ old("youtube", $userProfile->youtube_link) }}">
|
---|
249 | </div>
|
---|
250 | </div>
|
---|
251 | </div>
|
---|
252 |
|
---|
253 | <div class="col-md-6 mt-3">
|
---|
254 | <div class="form-group">
|
---|
255 | <label class="form-label">Skype</label>
|
---|
256 | <div class="input-group">
|
---|
257 | <span class="input-group-prepend" id="basic-addon3">
|
---|
258 | <span class="input-group-text">@</span>
|
---|
259 | </span>
|
---|
260 | <input type="text" class="form-control" name="skype"
|
---|
261 | value="{{ old("skype", $userProfile->skype_link) }}">
|
---|
262 | </div>
|
---|
263 | </div>
|
---|
264 | </div>
|
---|
265 |
|
---|
266 | <div class="col-md-12">
|
---|
267 | <div class="form-group mb-0 float-right">
|
---|
268 | <input type="submit" value="Submit"
|
---|
269 | class="submitBtn btn btn-primary">
|
---|
270 | </div>
|
---|
271 | </div>
|
---|
272 |
|
---|
273 | </div>
|
---|
274 |
|
---|
275 | </fieldset>
|
---|
276 |
|
---|
277 | </form>
|
---|
278 |
|
---|
279 | </div>
|
---|
280 |
|
---|
281 | <div class="tab-pane fade" id="v-pills-profile" role="tabpanel"
|
---|
282 | aria-labelledby="v-pills-profile-tab">
|
---|
283 |
|
---|
284 | <form class="actionForm" action="{{ route("dashboard.settings.username") }}"
|
---|
285 | method="post" accept-charset="UTF-8">
|
---|
286 |
|
---|
287 | @method("patch")
|
---|
288 | @csrf
|
---|
289 |
|
---|
290 | <fieldset class="form-fieldset">
|
---|
291 |
|
---|
292 | <h4 class="font-weight-normal border-bottom pb-2">Username</h4>
|
---|
293 |
|
---|
294 | <h6 class="font-weight-normal text-muted">After changing your
|
---|
295 | username you will be logged out automatically.</h6>
|
---|
296 |
|
---|
297 | <div class="row">
|
---|
298 |
|
---|
299 |
|
---|
300 | <div class="col-md-6">
|
---|
301 | <div class="form-group">
|
---|
302 | <label class="form-label">Username</label>
|
---|
303 | <input type="text"
|
---|
304 | value="{{ old("username", $userProfile->user->username) }}"
|
---|
305 | name="username" class="form-control">
|
---|
306 | </div>
|
---|
307 | </div>
|
---|
308 |
|
---|
309 | <div class="col-md-12">
|
---|
310 | <div class="form-group mb-0 float-right">
|
---|
311 | <input type="submit" value="Submit"
|
---|
312 | class="submitBtn btn btn-primary">
|
---|
313 | </div>
|
---|
314 | </div>
|
---|
315 |
|
---|
316 | </div>
|
---|
317 |
|
---|
318 | </fieldset>
|
---|
319 |
|
---|
320 | </form>
|
---|
321 |
|
---|
322 | <form class="actionForm" action="{{ route("dashboard.settings.password") }}"
|
---|
323 | method="post" accept-charset="UTF-8">
|
---|
324 |
|
---|
325 | @method("patch")
|
---|
326 | @csrf
|
---|
327 |
|
---|
328 | <fieldset class="form-fieldset">
|
---|
329 |
|
---|
330 | <h4 class="font-weight-normal border-bottom pb-2">Password</h4>
|
---|
331 |
|
---|
332 | <h6 class="font-weight-normal text-muted">After changing your
|
---|
333 | password you will be logged out automatically.</h6>
|
---|
334 |
|
---|
335 | <div class="row">
|
---|
336 |
|
---|
337 | <div class="col-md-4">
|
---|
338 | <div class="form-group">
|
---|
339 | <label class="form-label">Current Password <span
|
---|
340 | class="form-required">*</span></label>
|
---|
341 | <input type="password" class="form-control"
|
---|
342 | name="current_password" autocomplete="off"
|
---|
343 | required>
|
---|
344 | </div>
|
---|
345 | </div>
|
---|
346 |
|
---|
347 | <div class="col-md-4">
|
---|
348 | <div class="form-group">
|
---|
349 | <label class="form-label">New Password <span
|
---|
350 | class="form-required">*</span></label>
|
---|
351 | <input type="password" class="form-control"
|
---|
352 | name="password" autocomplete="off" required>
|
---|
353 | </div>
|
---|
354 | </div>
|
---|
355 |
|
---|
356 | <div class="col-md-4">
|
---|
357 | <div class="form-group">
|
---|
358 | <label class="form-label">Repeat New Password <span
|
---|
359 | class="form-required">*</span></label>
|
---|
360 | <input type="password" class="form-control"
|
---|
361 | name="password_confirmation" autocomplete="off"
|
---|
362 | required>
|
---|
363 | </div>
|
---|
364 | </div>
|
---|
365 |
|
---|
366 | <div class="col-md-12">
|
---|
367 | <div class="form-group mb-0 float-right">
|
---|
368 | <input type="submit" value="Submit"
|
---|
369 | class="submitBtn btn btn-primary">
|
---|
370 | </div>
|
---|
371 | </div>
|
---|
372 |
|
---|
373 | </div>
|
---|
374 |
|
---|
375 | </fieldset>
|
---|
376 |
|
---|
377 | </form>
|
---|
378 |
|
---|
379 | <form class="actionForm" action="{{ route("dashboard.settings.email") }}"
|
---|
380 | method="post" accept-charset="UTF-8">
|
---|
381 |
|
---|
382 | @method("patch")
|
---|
383 | @csrf
|
---|
384 |
|
---|
385 | <fieldset class="form-fieldset">
|
---|
386 |
|
---|
387 | <h4 class="font-weight-normal border-bottom pb-2">E-mail</h4>
|
---|
388 |
|
---|
389 | <h6 class="font-weight-normal text-muted">This is where lost
|
---|
390 | password requests will be sent. After changing your e-mail you
|
---|
391 | will be logged out automatically.</h6>
|
---|
392 |
|
---|
393 | <div class="row">
|
---|
394 |
|
---|
395 | <div class="col-md-4">
|
---|
396 | <div class="form-group">
|
---|
397 | <label class="form-label">E-mail</label>
|
---|
398 | <input type="email"
|
---|
399 | value="{{ old("email", $userProfile->user->email) }}"
|
---|
400 | name="email" class="form-control">
|
---|
401 | </div>
|
---|
402 | </div>
|
---|
403 |
|
---|
404 | <div class="col-md-12">
|
---|
405 | <div class="form-group mb-0 float-right">
|
---|
406 | <input type="submit" value="Submit"
|
---|
407 | class="submitBtn btn btn-primary">
|
---|
408 | </div>
|
---|
409 | </div>
|
---|
410 |
|
---|
411 | </div>
|
---|
412 |
|
---|
413 | </fieldset>
|
---|
414 |
|
---|
415 | </form>
|
---|
416 |
|
---|
417 | <fieldset class="form-fieldset border-danger">
|
---|
418 | <h4 class="font-weight-normal border-bottom pb-2 text-danger">Danger
|
---|
419 | Zone</h4>
|
---|
420 | <h5 class="font-weight-normal text-danger">Before you delete your
|
---|
421 | account you need to choose any admin or editor to transfer your
|
---|
422 | posts. After that all informations related to your account will be
|
---|
423 | deleted permanently.</h5>
|
---|
424 | <a href="javascript:void(0)" data-from="{{ auth()->user()->id }}"
|
---|
425 | class="btn btn-danger transferPostsAndDelete mt-2">Delete account</a>
|
---|
426 | </fieldset>
|
---|
427 |
|
---|
428 | <div class="modal fade deleteUser" id="transferPosts" tabindex="-1"
|
---|
429 | role="dialog" aria-hidden="true">
|
---|
430 |
|
---|
431 | <div class="modal-dialog modal-dialog-centered" role="document">
|
---|
432 |
|
---|
433 | <div class="modal-content">
|
---|
434 |
|
---|
435 | <div class="modal-header">
|
---|
436 | <h5 class="modal-title" id="exampleModalLabel">Delete
|
---|
437 | Account</h5>
|
---|
438 | <button type="button" class="close" data-dismiss="modal"
|
---|
439 | aria-label="Close"></button>
|
---|
440 | </div>
|
---|
441 |
|
---|
442 | <div class="modal-body">
|
---|
443 |
|
---|
444 | <form id="transferPosts"
|
---|
445 | action="{{ route("dashboard.settings.transfer") }}"
|
---|
446 | method="post">
|
---|
447 |
|
---|
448 | @csrf
|
---|
449 |
|
---|
450 | @if (auth()->user()->post->count() > 0)
|
---|
451 | <div class="form-group">
|
---|
452 | <label class="form-label">Transfer your posts to
|
---|
453 | any admin or editor</label>
|
---|
454 | <select class="selectData"
|
---|
455 | id="selectWithContent" name="to">
|
---|
456 | @foreach ($adminAndEditors as $user)
|
---|
457 | <option value="{{ $user->id }}"
|
---|
458 | {{ (old("to") == $user->id) ? "selected" : "" }} data-data='{"image": "/uploads/users/{{ $user->userProfile->profile_photo_link }}"}'>{{ $user->getFullName() }}</option>
|
---|
459 | @endforeach
|
---|
460 | </select>
|
---|
461 | </div>
|
---|
462 | @endif
|
---|
463 |
|
---|
464 | <input type="hidden" name="from" value="">
|
---|
465 |
|
---|
466 | <div class="form-group">
|
---|
467 | <label class="form-label">Confirm Password</label>
|
---|
468 | <input type="password" class="form-control"
|
---|
469 | name="password" autocomplete="off" required>
|
---|
470 | </div>
|
---|
471 |
|
---|
472 | <div class="modal-footer pb-0">
|
---|
473 | <button type="button" class="btn btn-secondary"
|
---|
474 | data-dismiss="modal">Close
|
---|
475 | </button>
|
---|
476 | <input type="submit" class="btn btn-danger"
|
---|
477 | value="Delete">
|
---|
478 | </div>
|
---|
479 |
|
---|
480 | </form>
|
---|
481 |
|
---|
482 | </div>
|
---|
483 |
|
---|
484 | </div>
|
---|
485 |
|
---|
486 | </div>
|
---|
487 |
|
---|
488 | </div>
|
---|
489 | </div>
|
---|
490 | </div>
|
---|
491 | </div>
|
---|
492 | </div>
|
---|
493 |
|
---|
494 | </div>
|
---|
495 |
|
---|
496 | </div>
|
---|
497 |
|
---|
498 | </div>
|
---|
499 |
|
---|
500 | </div>
|
---|
501 |
|
---|
502 | </div>
|
---|
503 |
|
---|
504 | </div>
|
---|
505 |
|
---|
506 | @endsection
|
---|