|
2 | 2 | <AppLayout title="Create user">
|
3 | 3 |
|
4 | 4 | <template #header>
|
5 |
| - <h2 class="font-semibold text-xl text-gray-800 leading-tight"> |
| 5 | + <h2 class="text-xl font-semibold leading-tight text-gray-800"> |
6 | 6 | Create user
|
7 | 7 | </h2>
|
8 | 8 | </template>
|
9 | 9 |
|
10 | 10 | <div class="py-12">
|
11 |
| - <div class="max-w-7xl mx-auto sm:px-6 lg:px-8"> |
12 |
| - <div class="m-auto w-full max-w-xs"> |
| 11 | + <div class="mx-auto max-w-7xl sm:px-6 lg:px-8"> |
| 12 | + <div class="w-full max-w-xs m-auto"> |
13 | 13 |
|
14 |
| - <form @submit.prevent="submit" class="bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4 m-auto"> |
| 14 | + <form @submit.prevent="submit" class="px-8 pt-6 pb-8 m-auto mb-4 bg-white rounded shadow-md" |
| 15 | + enctype="multipart/form-data"> |
15 | 16 |
|
16 | 17 | <div class="mb-4">
|
17 |
| - <label class="block text-gray-700 text-sm font-bold mb-2" for="name"> |
| 18 | + <label class="block mb-2 text-sm font-bold text-gray-700" for="name"> |
18 | 19 | Name <span class="text-red-500">*</span>
|
19 | 20 | </label>
|
20 | 21 | <input v-model="form.name"
|
21 |
| - class="mb-2 shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" |
| 22 | + class="w-full px-3 py-2 mb-2 leading-tight text-gray-700 border rounded shadow appearance-none focus:outline-none focus:shadow-outline" |
22 | 23 | id="name" type="text">
|
23 | 24 | <span class="text-red-500">{{ errors.name }}</span>
|
24 | 25 | </div>
|
25 | 26 |
|
26 | 27 | <div class="mb-4">
|
27 |
| - <label class="block text-gray-700 text-sm font-bold mb-2" for="email"> |
| 28 | + <label class="block mb-2 text-sm font-bold text-gray-700" for="email"> |
28 | 29 | E-mail <span class="text-red-500">*</span>
|
29 | 30 | </label>
|
30 | 31 | <input v-model="form.email"
|
31 |
| - class="mb-2 shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" |
| 32 | + class="w-full px-3 py-2 mb-2 leading-tight text-gray-700 border rounded shadow appearance-none focus:outline-none focus:shadow-outline" |
32 | 33 | id="email" type="email">
|
33 | 34 | <span class="text-red-500">{{ errors.email }}</span>
|
34 | 35 | </div>
|
35 | 36 |
|
36 | 37 | <div class="mb-4">
|
37 | 38 | <div class="mb-3 xl:w-96">
|
38 | 39 | <select disabled v-model="form.role_id"
|
39 |
| - class="form-select appearance-none block text-base font-normal text-gray-700 bg-white bg-clip-padding bg-no-repeat border border-solid border-gray-300 rounded ease-in-out m-0 focus:text-gray-700 focus:bg-white focus:border-blue-600 focus:outline-none" |
| 40 | + class="block m-0 text-base font-normal text-gray-700 ease-in-out bg-white bg-no-repeat border border-gray-300 border-solid rounded appearance-none form-select bg-clip-padding focus:text-gray-700 focus:bg-white focus:border-blue-600 focus:outline-none" |
40 | 41 | aria-label="Default select example">
|
41 | 42 | <option value="2">Subscriber</option>
|
42 | 43 | </select>
|
43 | 44 | </div>
|
44 | 45 | </div>
|
45 | 46 |
|
46 | 47 | <div class="mb-4">
|
47 |
| - <label class="block text-gray-700 text-sm font-bold mb-2" for="password"> |
| 48 | + <label class="block mb-2 text-sm font-bold text-gray-700" for="avatar"> |
| 49 | + Avatar <span class="text-red-500">*</span> |
| 50 | + </label> |
| 51 | + <input type="file" id="avatar" v-on:change="form.avatar = $event.target.files[0]"> |
| 52 | + <span class="text-red-500">{{ errors.avatar }}</span> |
| 53 | + </div> |
| 54 | + |
| 55 | + <div class="mb-4"> |
| 56 | + <label class="block mb-2 text-sm font-bold text-gray-700" for="password"> |
48 | 57 | Password <span class="text-red-500">*</span>
|
49 | 58 | </label>
|
50 | 59 | <input v-model="form.password"
|
51 |
| - class="mb- 2shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" |
| 60 | + class="w-full px-3 py-2 leading-tight text-gray-700 border rounded appearance-none mb- 2shadow focus:outline-none focus:shadow-outline" |
52 | 61 | id="password" type="password">
|
53 | 62 | <span class="text-red-500">{{ errors.password }}</span>
|
54 | 63 | </div>
|
|
58 | 67 | </div>
|
59 | 68 | </form>
|
60 | 69 |
|
61 |
| - <p class="text-center text-gray-500 text-xs"> |
| 70 | + <p class="text-xs text-center text-gray-500"> |
62 | 71 | ©2023 - <a class="text-blue-500" href="https://github.com/perisicnikola37"
|
63 | 72 | target="_blank">@perisicnikola37</a>
|
64 | 73 | </p>
|
@@ -88,6 +97,7 @@ export default {
|
88 | 97 | email: '',
|
89 | 98 | role_id: 2,
|
90 | 99 | password: '',
|
| 100 | + avatar: null |
91 | 101 | })
|
92 | 102 | }
|
93 | 103 | },
|
|
0 commit comments