1 | @extends('layouts.app')
|
---|
2 |
|
---|
3 | @section("title", "Users - Create new")
|
---|
4 |
|
---|
5 | @section('pageTitle', 'Create 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">Create 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">Create user</h6>
|
---|
30 | <form action="{{ route("dashboard.users.store") }}" method="post" accept-charset="utf-8" enctype='multipart/form-data' class="needs-validation" novalidate>
|
---|
31 | @csrf
|
---|
32 | <div class="row">
|
---|
33 | <div class="col-md-6">
|
---|
34 | <div class="form-group">
|
---|
35 | <label>Name</label>
|
---|
36 | <input type="text" name="name" value="{{ old('name') }}" minlength="2" maxlength="25" pattern="[a-zA-Zа-шА-Ш._\s]+" class="form-control" placeholder="Name" required>
|
---|
37 | <div class="invalid-feedback">
|
---|
38 | Please enter only letters and spaces with length between [2, 25]
|
---|
39 | </div>
|
---|
40 | </div>
|
---|
41 | </div>
|
---|
42 | <div class="col-md-6">
|
---|
43 | <div class="form-group">
|
---|
44 | <label>Surname</label>
|
---|
45 | <input type="text" name="surname" value="{{ old('surname') }}" minlength="2" maxlength="25" pattern="[a-zA-Zа-шА-Ш._\s]+" class="form-control" placeholder="Surname" required>
|
---|
46 | <div class="invalid-feedback">
|
---|
47 | Please enter only letters and spaces with length between [2, 25]
|
---|
48 | </div>
|
---|
49 | </div>
|
---|
50 | </div>
|
---|
51 | </div>
|
---|
52 | <div class="row">
|
---|
53 | <div class="col-md-6">
|
---|
54 | <div class="form-group">
|
---|
55 | <label class="form-label">Username</label>
|
---|
56 | <input type="text" name="username" value="{{ old('username') }}" minlength="5" maxlength="30" class="form-control" placeholder="Username" required>
|
---|
57 | <div class="invalid-feedback">
|
---|
58 | Please enter characters with length between [5, 30]
|
---|
59 | </div>
|
---|
60 | </div>
|
---|
61 | </div>
|
---|
62 | <div class="col-md-6">
|
---|
63 | <div class="form-group">
|
---|
64 | <label class="form-label">Role</label>
|
---|
65 | <select class="form-control" name="userRole required">
|
---|
66 | @foreach ($roles as $role)
|
---|
67 | <option value="{{ $role->id }}" {{ (old("userRole") == $role->id ? "selected" : "" ) }}>{{ $role->name }}</option>
|
---|
68 | @endforeach
|
---|
69 | </select>
|
---|
70 | </div>
|
---|
71 | </div>
|
---|
72 | </div>
|
---|
73 | <div class="row">
|
---|
74 | <div class="col-md-6">
|
---|
75 | <div class="form-group">
|
---|
76 | <label>Email</label>
|
---|
77 | <input type="email" name="email" value="{{ old('email') }}" class="form-control" placeholder="E-mail" required>
|
---|
78 | <div class="invalid-feedback">
|
---|
79 | Please enter a valid email address
|
---|
80 | </div>
|
---|
81 | </div>
|
---|
82 | </div>
|
---|
83 | <div class="col-md-6">
|
---|
84 | <div class="form-group">
|
---|
85 | <label class="form-label">Phone Number</label>
|
---|
86 | <input type="text" name="phone_number" value="{{ old('phone_number') }}" class="form-control" placeholder="Phone number" autocomplete="off" required>
|
---|
87 | <div class="invalid-feedback">
|
---|
88 | Please enter your phone number
|
---|
89 | </div>
|
---|
90 | </div>
|
---|
91 | </div>
|
---|
92 |
|
---|
93 | </div>
|
---|
94 |
|
---|
95 | <div class="row">
|
---|
96 | <div class="col-md-6">
|
---|
97 | <div class="form-group">
|
---|
98 | <label>Avatar</label>
|
---|
99 | <input type="file" name="avatar" value="{{ old('avatar') }}" class="form-control" accept="image/*">
|
---|
100 | <div class="invalid-feedback">
|
---|
101 | Please upload a valid image file
|
---|
102 | </div>
|
---|
103 | </div>
|
---|
104 | </div>
|
---|
105 | </div>
|
---|
106 | <input type="submit" value="Save changes" class="submitBtn btn btn-primary pull-right m-10">
|
---|
107 | </form>
|
---|
108 | </div>
|
---|
109 | </div>
|
---|
110 | </div>
|
---|
111 | </div>
|
---|
112 | </div>
|
---|
113 | </div>
|
---|
114 | </div>
|
---|
115 | </div>
|
---|
116 |
|
---|
117 | @endsection
|
---|