Skip to content
This repository was archived by the owner on Jun 22, 2022. It is now read-only.

Commit 2cd523e

Browse files
fix: #5 Uploading avatar image bugs out (#10)
1 parent b0d632f commit 2cd523e

File tree

3 files changed

+60
-46
lines changed

3 files changed

+60
-46
lines changed

stisla-stubs/views/layouts/app.blade.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
<link rel="stylesheet" href="{{ asset('web/css/components.css')}}">
2121
@yield('page_css')
2222

23-
2423
@yield('css')
2524
</head>
2625
<body>
@@ -67,6 +66,7 @@
6766
<script>
6867
let loggedInUser =@json(\Illuminate\Support\Facades\Auth::user());
6968
let loginUrl = '{{ route('login') }}';
69+
const userUrl = '{{url('users')}}';
7070
// Loading button plugin (removed from BS4)
7171
(function ($) {
7272
$.fn.button = function (action) {

stisla-stubs/views/profile/change_password.blade.php

+47-41
Original file line numberDiff line numberDiff line change
@@ -7,67 +7,73 @@
77
<button type="button" aria-label="Close" class="close outline-none" data-dismiss="modal">×</button>
88
</div>
99
<form method="POST" id='changePasswordForm'>
10-
<div class="modal-body">
11-
@if ($errors->any())
12-
<div class="alert alert-danger">
13-
<ul>
14-
@foreach ($errors->all() as $error)
15-
<li>{{ $error }}</li>
16-
@endforeach
17-
</ul>
18-
</div>
19-
@endif
20-
<div class="alert alert-danger d-none" id=""></div>
10+
<div class="alert alert-info">
11+
Note: This is just UI. you need to develop Backend for update
12+
</div>
13+
<div class="modal-body">
14+
@if ($errors->any())
15+
<div class="alert alert-danger">
16+
<ul>
17+
@foreach ($errors->all() as $error)
18+
<li>{{ $error }}</li>
19+
@endforeach
20+
</ul>
21+
</div>
22+
@endif
23+
<div class="alert alert-danger d-none" id=""></div>
2124
<input type="hidden" name="is_active" value="1">
2225
<input type="hidden" name="user_id" id="editPasswordValidationErrorsBox">
2326
{{csrf_field()}}
24-
<div class="row">
25-
<div class="form-group col-sm-12">
26-
<label>Current Password:</label><span
27-
class="required confirm-pwd"></span><span class="required">*</span>
28-
<div class="input-group">
29-
<input class="form-control input-group__addon" id="pfCurrentPassword" type="password"
30-
name="password_current" required>
31-
<div class="input-group-append input-group__icon">
27+
<div class="row">
28+
<div class="form-group col-sm-12">
29+
<label>Current Password:</label><span
30+
class="required confirm-pwd"></span><span class="required">*</span>
31+
<div class="input-group">
32+
<input class="form-control input-group__addon" id="pfCurrentPassword" type="password"
33+
name="password_current" required>
34+
<div class="input-group-append input-group__icon">
3235
<span class="input-group-text changeType">
3336
<i class="icon-ban icons"></i>
3437
</span>
38+
</div>
3539
</div>
3640
</div>
37-
</div>
38-
<div class="form-group col-sm-12">
39-
<label>New Password:</label><span
40-
class="required confirm-pwd"></span><span class="required">*</span>
41-
<div class="input-group">
42-
<input class="form-control input-group__addon" id="pfNewPassword" type="password"
43-
name="password" required>
44-
<div class="input-group-append input-group__icon">
41+
<div class="form-group col-sm-12">
42+
<label>New Password:</label><span
43+
class="required confirm-pwd"></span><span class="required">*</span>
44+
<div class="input-group">
45+
<input class="form-control input-group__addon" id="pfNewPassword" type="password"
46+
name="password" required>
47+
<div class="input-group-append input-group__icon">
4548
<span class="input-group-text changeType">
4649
<i class="icon-ban icons"></i>
4750
</span>
51+
</div>
4852
</div>
4953
</div>
50-
</div>
51-
<div class="form-group col-sm-12">
52-
<label>Confirm Password:</label><span
53-
class="required confirm-pwd"></span><span class="required">*</span>
54-
<div class="input-group">
55-
<input class="form-control input-group__addon" id="pfNewConfirmPassword" type="password"
56-
name="password_confirmation" required>
57-
<div class="input-group-append input-group__icon">
54+
<div class="form-group col-sm-12">
55+
<label>Confirm Password:</label><span
56+
class="required confirm-pwd"></span><span class="required">*</span>
57+
<div class="input-group">
58+
<input class="form-control input-group__addon" id="pfNewConfirmPassword" type="password"
59+
name="password_confirmation" required>
60+
<div class="input-group-append input-group__icon">
5861
<span class="input-group-text changeType">
5962
<i class="icon-ban icons"></i>
6063
</span>
64+
</div>
6165
</div>
6266
</div>
6367
</div>
68+
<div class="text-right">
69+
<button type="submit" class="btn btn-primary" id="btnPrPasswordEditSave"
70+
data-loading-text="<span class='spinner-border spinner-border-sm'></span> Processing...">
71+
Save
72+
</button>
73+
<button type="button" class="btn btn-light ml-1" data-dismiss="modal">Cancel
74+
</button>
75+
</div>
6476
</div>
65-
<div class="text-right">
66-
<button type="submit" class="btn btn-primary" id="btnPrPasswordEditSave" data-loading-text="<span class='spinner-border spinner-border-sm'></span> Processing...">Save</button>
67-
<button type="button" class="btn btn-light ml-1" data-dismiss="modal">Cancel
68-
</button>
69-
</div>
70-
</div>
7177
</form>
7278
</div>
7379
</div>

stisla-stubs/views/profile/edit_profile.blade.php

+12-4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
<button type="button" aria-label="Close" class="close outline-none" data-dismiss="modal">×</button>
88
</div>
99
<form method="POST" id="editProfileForm" enctype="multipart/form-data">
10+
<div class="alert alert-info">
11+
Note: This is just UI. you need to develop Backend for update
12+
</div>
1013
<div class="modal-body">
1114
<div class="alert alert-danger d-none" id="editProfileValidationErrorsBox"></div>
1215
<input type="hidden" name="user_id" id="pfUserId">
@@ -15,7 +18,8 @@
1518
<div class="row">
1619
<div class="form-group col-sm-6">
1720
<label>Name:</label><span class="required">*</span>
18-
<input type="text" name="name" id="pfName" class="form-control" required autofocus tabindex="1">
21+
<input type="text" name="name" id="pfName" class="form-control" required autofocus
22+
tabindex="1">
1923
</div>
2024
<div class="form-group col-sm-6 d-flex">
2125
<div class="col-sm-4 col-md-6 pl-0 form-group">
@@ -24,11 +28,12 @@
2428
<label
2529
class="image__file-upload btn btn-primary text-white"
2630
tabindex="2"> Choose
27-
<input type="file" name="photo" id="pfImage" class="d-none" >
31+
<input type="file" name="photo" id="pfImage" class="d-none">
2832
</label>
2933
</div>
3034
<div class="col-sm-3 preview-image-video-container float-right mt-1">
31-
<img id='edit_preview_photo' class="img-thumbnail user-img user-profile-img profilePicture"
35+
<img id='edit_preview_photo'
36+
class="img-thumbnail user-img user-profile-img profilePicture"
3237
src="{{asset('img/logo.png')}}"/>
3338
</div>
3439
</div>
@@ -40,7 +45,10 @@ class="image__file-upload btn btn-primary text-white"
4045
</div>
4146
</div>
4247
<div class="text-right">
43-
<button type="submit" class="btn btn-primary" id="btnPrEditSave" data-loading-text="<span class='spinner-border spinner-border-sm'></span> Processing..." tabindex="5">Save</button>
48+
<button type="submit" class="btn btn-primary" id="btnPrEditSave"
49+
data-loading-text="<span class='spinner-border spinner-border-sm'></span> Processing..."
50+
tabindex="5">Save
51+
</button>
4452
<button type="button" class="btn btn-light ml-1 edit-cancel-margin margin-left-5"
4553
data-dismiss="modal">Cancel
4654
</button>

0 commit comments

Comments
 (0)