1 | @extends('layouts.app')
|
---|
2 |
|
---|
3 | @section("title", "Users - Edit user")
|
---|
4 |
|
---|
5 | @section('pageTitle', 'Edit user')
|
---|
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">Edit user</li>
|
---|
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-12 col-md-12">
|
---|
25 | <div class="tab-content" id="v-pills-tabContent">
|
---|
26 | <div class="tab-pane fade show active" id="v-pills-home" role="tabpanel" aria-labelledby="v-pills-home-tab">
|
---|
27 | <div class="card">
|
---|
28 | <div class="card-body">
|
---|
29 | <h6 class="card-title">User account data</h6>
|
---|
30 | <form action="{{ route("dashboard.users.edit", ["id" =>$user->id]) }}" method="post" accept-charset="utf-8" enctype='multipart/form-data'>
|
---|
31 | @method("patch")
|
---|
32 | @csrf
|
---|
33 | <div class="row">
|
---|
34 | <div class="col-md-6">
|
---|
35 | <div class="form-group">
|
---|
36 | <label>Name</label>
|
---|
37 | <input type="text" name="name" value="{{ $user->name }}" class="form-control" placeholder="Name" required>
|
---|
38 | </div>
|
---|
39 | </div>
|
---|
40 | <div class="col-md-6">
|
---|
41 | <div class="form-group">
|
---|
42 | <label>Surname</label>
|
---|
43 | <input type="text" name="surname" value="{{$user->surname}}" class="form-control" placeholder="Surname" required>
|
---|
44 | </div>
|
---|
45 | </div>
|
---|
46 | </div>
|
---|
47 | <div class="row">
|
---|
48 | <div class="col-md-6">
|
---|
49 | <div class="form-group">
|
---|
50 | <label class="form-label">Username</label>
|
---|
51 | <input type="text" name="username" value="{{ $user->username }}" class="form-control" placeholder="Username" required>
|
---|
52 | </div>
|
---|
53 | </div>
|
---|
54 | <div class="col-md-6">
|
---|
55 | <div class="form-group">
|
---|
56 | <label class="form-label">Role</label>
|
---|
57 |
|
---|
58 | <select class="form-control" name="userRole">
|
---|
59 | @foreach($roles as $role)
|
---|
60 | <option value="{{ $role->id }}" {{ $user->role_id == $role->id ? "selected" : "" }}>{{ $role->name }}</option>
|
---|
61 | @endforeach
|
---|
62 | </select>
|
---|
63 | </div>
|
---|
64 | </div>
|
---|
65 | </div>
|
---|
66 | <div class="row">
|
---|
67 | <div class="col-md-6">
|
---|
68 | <div class="form-group">
|
---|
69 | <label>Email</label>
|
---|
70 | <input type="email" name="email" value="{{ $user->email }}" class="form-control" placeholder="E-mail" required>
|
---|
71 | </div>
|
---|
72 | </div>
|
---|
73 | <div class="col-md-6">
|
---|
74 | <div class="form-group">
|
---|
75 | <label class="form-label">Mobile Number</label>
|
---|
76 | <input type="text" name="mobile_number" value="{{ $user->mobile_number }}" class="form-control" placeholder="Phone number" autocomplete="off" required>
|
---|
77 | </div>
|
---|
78 | </div>
|
---|
79 | </div>
|
---|
80 | <div class="row">
|
---|
81 | <div class="col-md-5">
|
---|
82 | <div class="form-group">
|
---|
83 | <label>Avatar</label>
|
---|
84 | <input type="file" name="avatar" value="{{ $user->avatar }}" class="form-control" accept="image/*">
|
---|
85 | </div>
|
---|
86 | </div>
|
---|
87 | <div class="col-md-1">
|
---|
88 | <div class="form-group">
|
---|
89 | <label>Current</label>
|
---|
90 | @include('dashboard.partials.avatar')
|
---|
91 | </div>
|
---|
92 | </div>
|
---|
93 | </div>
|
---|
94 | <input type="submit" value="Save changes" class="submitBtn btn btn-primary pull-right m-10">
|
---|
95 | </form>
|
---|
96 | </div>
|
---|
97 | </div>
|
---|
98 | </div>
|
---|
99 | </div>
|
---|
100 | </div>
|
---|
101 | </div>
|
---|
102 | </div>
|
---|
103 | </div>
|
---|
104 | @endsection
|
---|