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