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