source: resources/views/dashboard/settings/index.blade.php@ e0d3f94

develop
Last change on this file since e0d3f94 was 0208bbd, checked in by Berat Kjufliju <kufliju@…>, 3 years ago

edited pagination

  • Property mode set to 100644
File size: 17.0 KB
RevLine 
[194a359]1@extends('layouts.app')
2
3@section("title", "User Settings")
4
5@section('content')
6
7 <div class="page-header">
8 <nav aria-label="breadcrumb" class="d-flex align-items-start">
9 <ol class="breadcrumb">
10 <li class="breadcrumb-item">
[c6b84df]11 <a href="{{ url('/') }}">Dashboard</a>
[194a359]12 </li>
[c6b84df]13 <li class="breadcrumb-item active" aria-current="page">Settings</li>
[194a359]14 </ol>
15 </nav>
16 </div>
17
18 <div class="row">
19 <div class="col-md-12">
20
21 <div class="row">
22 <div class="col-lg-3 col-md-12 mb-3">
[e6c1f87]23 <div class="nav flex-lg-column flex-sm-row nav-pills" id="#tabMenu" role="tablist" aria-orientation="vertical">
24 <a class="nav-link {{$active_tab == 'account' ? 'active' : ""}}" id="account-tab" data-toggle="pill" href="#account" role="tab" aria-controls="account" aria-selected="true">Account</a>
25 <a class="nav-link {{$active_tab == 'security' ? 'active' : ""}}" id="security-tab" data-toggle="pill" href="#security" role="tab" aria-controls="security" aria-selected="false">Security</a>
[c6b84df]26 <a class="nav-link {{$active_tab == 'file-types' ? 'active' : ""}}" id="file-types-tab" data-toggle="pill" href="#file-types" role="tab" aria-controls="file-types" aria-selected="false">File validation</a>
[194a359]27 </div>
28 </div>
29 <div class="col-lg-9 col-md-12">
30 <div class="tab-content" id="v-pills-tabContent">
[e6c1f87]31 <div class="tab-pane {{$active_tab == 'account' ? 'active' : ""}}" id="account" role="tabpanel" aria-labelledby="account-tab">
[194a359]32 <div class="card">
33 <div class="card-body">
34 <h6 class="card-title">Account</h6>
[d795fa6]35 <form action="{{ route("dashboard.users.editUserData", ["id" =>$user->id]) }}" method="post" accept-charset="utf-8" enctype='multipart/form-data' class="needs-validation" novalidate>
[194a359]36 @method("patch")
37 @csrf
38 <div class="row">
39 <div class="col-md-6">
40 <div class="form-group">
41 <label>Name</label>
[d795fa6]42 <input type="text" name="name" value="{{ $user->name }}" minlength="2" maxlength="30" class="form-control" placeholder="Name" required>
43 <div class="invalid-feedback">
44 Please enter only letters and spaces with length between [2, 30]
45 </div>
[194a359]46 </div>
47 </div>
48 <div class="col-md-6">
49 <div class="form-group">
50 <label>Surname</label>
51 <input type="text" name="surname" value="{{$user->surname}}" class="form-control" placeholder="Surname" required>
52 </div>
53 </div>
54 </div>
55 <div class="row">
56 <div class="col-md-6">
57 <div class="form-group">
58 <label class="form-label">Mobile Number</label>
[d795fa6]59 <input type="text" name="phone_number" value="{{ $user->phone_number }}" class="form-control" placeholder="Phone number" autocomplete="off" required>
[194a359]60 </div>
61 </div>
[24a616f]62 <div class="col-md-5">
63 <div class="form-group">
64 <label>Avatar</label>
65 <input type="file" name="avatar" value="{{ $user->avatar }}" class="form-control" accept="image/*">
66 </div>
67 </div>
68 <div class="col-md-1">
69 <div class="form-group">
70 <label>Current</label>
[0208bbd]71 <figure class="avatar avatar-sm mr-2">
72 @if(auth()->user()->avatar==NULL)
73 <img src="{{ url('assets/media/images/user.png') }}" class="rounded-circle" alt="avatar">
74 @else
75 <img src="{{url('uploads/users/' . auth()->user()->avatar)}}" class="rounded-circle" alt="avatar">
76 @endif
77 </figure>
78
[24a616f]79 </div>
80 </div>
[194a359]81 </div>
82 <input type="submit" value="Save changes" class="submitBtn btn btn-primary pull-right m-10">
83 </form>
84 </div>
85 </div>
86 </div>
[e6c1f87]87 <div class="tab-pane {{$active_tab == 'security' ? 'active' : ""}}" id="security" role="tabpanel" aria-labelledby="security-tab">
[194a359]88 <div class="card">
89 <div class="card-body">
90 <form class="actionForm" action="{{ route("dashboard.settings.password") }}"
91 method="post" accept-charset="UTF-8">
92
93 @method("patch")
94 @csrf
95
96 <fieldset class="form-fieldset">
97
98 <h4 class="font-weight-normal border-bottom pb-2">Password</h4>
99
100 <h6 class="font-weight-normal text-muted">After changing your
101 password you will be logged out automatically.</h6>
102
103 <div class="row">
104
105 <div class="col-md-4">
106 <div class="form-group">
107 <label class="form-label">Current Password <span
108 class="form-required">*</span></label>
109 <input type="password" class="form-control"
110 name="current_password" autocomplete="off"
111 required>
112 </div>
113 </div>
114
115 <div class="col-md-4">
116 <div class="form-group">
117 <label class="form-label">New Password <span
118 class="form-required">*</span></label>
119 <input type="password" class="form-control"
120 name="password" autocomplete="off" required>
121 </div>
122 </div>
123
124 <div class="col-md-4">
125 <div class="form-group">
126 <label class="form-label">Repeat New Password <span
127 class="form-required">*</span></label>
128 <input type="password" class="form-control"
129 name="password_confirmation" autocomplete="off"
130 required>
131 </div>
132 </div>
133
134 <div class="col-md-12">
135 <div class="form-group mb-0 float-right">
136 <input type="submit" value="Submit"
137 class="submitBtn btn btn-primary">
138 </div>
139 </div>
140
141 </div>
142
143 </fieldset>
144
145 </form>
146 </div>
147 </div>
148
149
150 <div class="card">
151 <div class="card-body">
152 <form class="actionForm" action="{{ route("dashboard.settings.username") }}"
153 method="post" accept-charset="UTF-8">
154
155 @method("patch")
156 @csrf
157
158 <fieldset class="form-fieldset">
159
160 <h4 class="font-weight-normal border-bottom pb-2">Username</h4>
161
162 <h6 class="font-weight-normal text-muted">After changing your
163 username you will be logged out automatically.</h6>
164
165 <div class="row">
166
167
168 <div class="col-md-6">
169 <div class="form-group">
170 <label class="form-label">Username</label>
171 <input type="text"
172 value="{{ old("username", $user->username) }}"
173 name="username" class="form-control">
174 </div>
175 </div>
176
177 <div class="col-md-12">
178 <div class="form-group mb-0 float-right">
179 <input type="submit" value="Submit"
180 class="submitBtn btn btn-primary">
181 </div>
182 </div>
183
184 </div>
185
186 </fieldset>
187
188 </form>
189
190 </div>
191 </div>
192
193 <div class="card">
194 <div class="card-body">
195 <form class="actionForm" action="{{ route("dashboard.settings.email") }}"
196 method="post" accept-charset="UTF-8">
197
198 @method("patch")
199 @csrf
200
201 <fieldset class="form-fieldset">
202
203 <h4 class="font-weight-normal border-bottom pb-2">E-mail</h4>
204
205 <h6 class="font-weight-normal text-muted">This is where lost
206 password requests will be sent. After changing your e-mail you
207 will be logged out automatically.</h6>
208
209 <div class="row">
210
211 <div class="col-md-4">
212 <div class="form-group">
213 <label class="form-label">E-mail</label>
214 <input type="email"
215 value="{{ old("email", $user->email) }}"
216 name="email" class="form-control">
217 </div>
218 </div>
219
220 <div class="col-md-12">
221 <div class="form-group mb-0 float-right">
222 <input type="submit" value="Submit"
223 class="submitBtn btn btn-primary">
224 </div>
225 </div>
226
227 </div>
228
229 </fieldset>
230 </form>
231 </div>
232 </div>
233 </div>
[c6b84df]234 <div class="tab-pane {{$active_tab == 'file-types' ? 'active' : ""}}" id="file-types" role="tabpanel" aria-labelledby="file-types-tab">
235
[194a359]236 <div class="card">
[c6b84df]237 <div class="card-body">
238 <h6 class="card-title">File validation</h6>
239 <form action="{{ route("dashboard.settings.file-types") }}" method="post" accept-charset="utf-8" enctype='multipart/form-data'>
240 @method("patch")
241 @csrf
242 <div class="row">
243 <div class="col-md-6">
244 <div class="form-group">
245 <label>Mimes</label>
246 <input type="text" name="mimes" value="{{ $fileType->mimes }}" class="form-control" placeholder="Mimes" required>
247 </div>
248 </div>
249 <div class="col-md-6">
250 <div class="form-group">
251 <label class="form-label">Max file size (in KB)</label>
252 <input type="number" name="max_size" value="{{ $fileType->max_size }}" class="form-control" placeholder="Max file size" autocomplete="off" required>
253 <p class="text-danger p-2">Note: 1 MB = 1024 KB</p>
254 </div>
255 </div>
256 </div>
257 <input type="submit" value="Save changes" class="submitBtn btn btn-primary pull-right m-10">
258 </form>
259 </div>
260 </div>
261
[194a359]262 </div>
263 </div>
264 </div>
265 </div>
266
267 </div>
268 </div>
269
270@endsection
[e6c1f87]271
272@section('script')
273 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
274 <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js" integrity="sha512-uto9mlQzrs59VwILcLiRYeLKPPbS/bT71da/OEBYEwcdNUk8jYIy+D176RYoop1Da+f9mvkYrmj5MCLZWEtQuA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
275 <script>
276 //redirect to specific tab
277 $(document).ready(function () {
278 $('#tabMenu a[href="#{{ old('tab') }}"]').tabs('show')
279 });
280 </script>
281@endsection
Note: See TracBrowser for help on using the repository browser.