edit.blade.php 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. @extends('helpers.modals.editModal')
  2. @section('editModalForm')
  3. <form method="POST" action="{{ route ('updateUser')}}" enctype="multipart/form-data">
  4. @csrf
  5. <div class="modal-body">
  6. <div class="row">
  7. <input type="hidden" name="id" id="editId">
  8. <div class="position-relative form-group col-md-6">
  9. <label for="name" class="importantField">Name</label>
  10. <input name="name" id="editName" placeholder="Enter a name" type="text" class="form-control" required>
  11. </div>
  12. <div class="position-relative form-group col-md-6">
  13. <label for="email" class="importantField">Email</label>
  14. <input name="email" id="editEmail" placeholder="Enter a email" type="email" class="form-control" required>
  15. </div>
  16. <div class="position-relative form-group col-md-6">
  17. <label for="password" class="importantField">Password ( Masukan Password untuk Mengubah Data )</label>
  18. <input name="password" id="editPassword" placeholder="Enter a password" type="password" class="form-control" required>
  19. </div>
  20. <div class="position-relative form-group col-md-6">
  21. <label for="role_id" class="importantField">Role</label>
  22. <select name="role_id" id="editRoleId" class="form-control" required>
  23. <option value="" selected disabled>Enter a Role</option>
  24. @foreach(\App\Model\Privillage\Role::all() as $key => $value)
  25. <option value="{{$value->id}}">{{$value->role_name}}</option>
  26. @endforeach
  27. </select>
  28. </div>
  29. <div class="position-relative form-group col-md-6">
  30. <label for="editUserType" class="importantField">User Type</label>
  31. <select id="editUserType" name="userType" class="form-control" required>
  32. <option value="" selected disabled>Enter a type</option>
  33. <option value="user">User</option>
  34. <option value="upt">UPT</option>
  35. <option value="waba">Waba</option>
  36. </select>
  37. </div>
  38. <div class="position-relative form-group col-md-6 div-type-code">
  39. <label for="editTypeCode" id="labeleditTypeCode" class="importantField">Select User Type First</label>
  40. <select name="typeCode" id="editTypeCode" class="form-control selectData">
  41. <option value="" selected disabled>Enter a sub type</option>
  42. </select>
  43. </div>
  44. <div class="position-relative form-group col-md-6">
  45. <label for="profile_photo" class="optionalField">Profile Photo</label>
  46. <input name="profile_photo" id="editProfilePhoto" type="file" class="form-control-file" accept="image/*" onchange="document.getElementById('editOldPhotoProfilePreview').src = window.URL.createObjectURL(this.files[0])">
  47. </div>
  48. <div class="position-relative form-group col-md-6">
  49. <label for="profile_photo" class="optionalField">Preview Profile Photo</label>
  50. <div id="editOldPhotoProfile"></div>
  51. </div>
  52. </div>
  53. </div>
  54. <div class="modal-footer">
  55. @include('helpers.button.buttonClose')
  56. @include('helpers.button.buttonSave')
  57. </div>
  58. </form>
  59. @endsection