Changeset d795fa6 for resources/views/dashboard/users
- Timestamp:
- 10/17/21 18:39:50 (3 years ago)
- Branches:
- develop, master
- Children:
- bd9e8e3
- Parents:
- 120759b
- Location:
- resources/views/dashboard/users
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
resources/views/dashboard/users/create.blade.php
r120759b rd795fa6 27 27 <div class="card"> 28 28 <div class="card-body"> 29 <h6 class="card-title"> User account data</h6>30 <form action="{{ route("dashboard.users.store") }}" method="post" accept-charset="utf-8" enctype='multipart/form-data' >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 31 @csrf 32 32 <div class="row"> … … 34 34 <div class="form-group"> 35 35 <label>Name</label> 36 <input type="text" name="name" value="{{ old('name') }}" class="form-control" placeholder="Name" required> 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> 37 40 </div> 38 41 </div> … … 40 43 <div class="form-group"> 41 44 <label>Surname</label> 42 <input type="text" name="surname" value="{{ old('surname') }}" class="form-control" placeholder="Surname" required> 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> 43 49 </div> 44 50 </div> … … 48 54 <div class="form-group"> 49 55 <label class="form-label">Username</label> 50 <input type="text" name="username" value="{{ old('username') }}" class="form-control" placeholder="Username" required> 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> 51 60 </div> 52 61 </div> … … 54 63 <div class="form-group"> 55 64 <label class="form-label">Role</label> 56 <select class="form-control" name="userRole ">65 <select class="form-control" name="userRole required"> 57 66 @foreach ($roles as $role) 58 <option value="{{ $role->id }}" {{ (old("userRole") == $role->id ? "selected" : "" ) }}>{{ ucfirst($role->name)}}</option>67 <option value="{{ $role->id }}" {{ (old("userRole") == $role->id ? "selected" : "" ) }}>{{ $role->name }}</option> 59 68 @endforeach 60 69 </select> … … 67 76 <label>Email</label> 68 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> 69 81 </div> 70 82 </div> 71 83 <div class="col-md-6"> 72 84 <div class="form-group"> 73 <label class="form-label">Mobile Number</label> 74 <input type="text" name="mobile_number" value="{{ old('mobile_number') }}" class="form-control" placeholder="Phone number" autocomplete="off" required> 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> 75 90 </div> 76 91 </div> … … 83 98 <label>Avatar</label> 84 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> 85 103 </div> 86 104 </div> -
resources/views/dashboard/users/edit.blade.php
r120759b rd795fa6 28 28 <div class="card-body"> 29 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' >30 <form action="{{ route("dashboard.users.edit", ["id" =>$user->id]) }}" method="post" accept-charset="utf-8" enctype='multipart/form-data' class="needs-validation" novalidate> 31 31 @method("patch") 32 32 @csrf … … 35 35 <div class="form-group"> 36 36 <label>Name</label> 37 <input type="text" name="name" value="{{ $user->name }}" class="form-control" placeholder="Name" required> 37 <input type="text" name="name" value="{{ $user->name }}" minlength="2" maxlength="30" pattern="[a-zA-Zа-шА-Ш._\s]+" class="form-control" placeholder="Name" required> 38 <div class="invalid-feedback"> 39 Please enter only letters and spaces with length between [2, 30] 40 </div> 38 41 </div> 39 42 </div> … … 41 44 <div class="form-group"> 42 45 <label>Surname</label> 43 <input type="text" name="surname" value="{{$user->surname}}" class="form-control" placeholder="Surname" required> 46 <input type="text" name="surname" value="{{$user->surname}}" minlength="2" maxlength="30" pattern="[a-zA-Zа-шА-Ш._\s]+" class="form-control" placeholder="Surname" required> 47 <div class="invalid-feedback"> 48 Please enter only letters and spaces with length between [2, 30] 49 </div> 44 50 </div> 45 51 </div> … … 49 55 <div class="form-group"> 50 56 <label class="form-label">Username</label> 51 <input type="text" name="username" value="{{ $user->username }}" class="form-control" placeholder="Username" required> 57 <input type="text" name="username" value="{{ $user->username }}" minlength="5" maxlength="30" class="form-control" placeholder="Username" required> 58 <div class="invalid-feedback"> 59 Please enter characters with length between [5, 30] 60 </div> 52 61 </div> 53 62 </div> … … 56 65 <label class="form-label">Role</label> 57 66 58 <select class="form-control" name="userRole" >67 <select class="form-control" name="userRole" required> 59 68 @foreach($roles as $role) 60 69 <option value="{{ $role->id }}" {{ $user->role_id == $role->id ? "selected" : "" }}>{{ $role->name }}</option> … … 68 77 <div class="form-group"> 69 78 <label>Email</label> 70 <input type="email" name="email" value="{{ $user->email }}" class="form-control" placeholder="E-mail" required> 79 <input type="email" name="email" value="{{ $user->email }}" maxlength="50" class="form-control" placeholder="E-mail" required> 80 <div class="invalid-feedback"> 81 Please enter a valid email address with length <=50 82 </div> 71 83 </div> 72 84 </div> 73 85 <div class="col-md-6"> 74 86 <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> 87 <label class="form-label">Phone Number</label> 88 <input type="text" name="phone_number" value="{{ $user->phone_number }}" class="form-control" placeholder="Phone number" autocomplete="off" required> 89 <div class="invalid-feedback"> 90 Please enter your phone number 91 </div> 77 92 </div> 78 93 </div> … … 83 98 <label>Avatar</label> 84 99 <input type="file" name="avatar" value="{{ $user->avatar }}" class="form-control" accept="image/*"> 100 <div class="invalid-feedback"> 101 Please upload a valid image file 102 </div> 85 103 </div> 86 104 </div> -
resources/views/dashboard/users/index.blade.php
r120759b rd795fa6 1 1 @extends('layouts.app') 2 2 3 @section("title", " Users")3 @section("title", "SaveSpace - Users") 4 4 5 @section('pageTitle', 'User List')5 @section('pageTitle', 'Users') 6 6 7 7 @section('head') … … 37 37 <thead> 38 38 <tr> 39 <th> 40 {{-- <div class="custom-control custom-checkbox">--}} 41 {{-- <input type="checkbox" class="custom-control-input" id="user-list-select-all">--}} 42 {{-- <label class="custom-control-label" for="user-list-select-all"></label>--}} 43 {{-- </div>--}} 44 </th> 39 <th></th> 45 40 <th>State</th> 46 41 <th>Username</th> … … 48 43 <th>Email</th> 49 44 <th>Phone Number</th> 45 <th>Created by</th> 50 46 <th>Created at</th> 47 <th>Updated at</th> 51 48 <th>Role</th> 52 49 <th>Status</th> … … 76 73 <td>{{$user->name .' '. $user->surname}}</td> 77 74 <td>{{$user->email}}</td> 78 <td>{{$user->mobile_number}}</td> 75 <td>{{$user->phone_number}}</td> 76 <td>{{ $user->getCreatedByName() }}</td> 79 77 <td>{{ date('d.m.Y', strtotime($user->created_at)) }}</td> 78 @if($user->updated_at==NULL) 79 <td>/</td> 80 @else 81 <td>{{ date('d.m.Y - H:i', strtotime($user->updated_at)) }}</td> 82 @endif 80 83 <td>{{ $user->role->name }}</td> 81 84 <td>
Note:
See TracChangeset
for help on using the changeset viewer.