edit.blade.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. @extends('admin.partial.template-full')
  2. @section('section')
  3. <div class="title d-flex justify-content-between align-items-center">
  4. <span><a href="/i/admin/users/show/{{$user->id}}" class="btn btn-outline-secondary btn-sm font-weight-bold">Back</a></span>
  5. <span class="text-center">
  6. <h3 class="font-weight-bold mb-0">&commat;{{$profile->username}}</h3>
  7. <p class="mb-0 small text-muted text-uppercase font-weight-bold">
  8. <span>{{$profile->statuses()->count()}} Posts</span>
  9. <span class="px-1">|</span>
  10. <span>{{$profile->followers()->count()}} Followers</span>
  11. <span class="px-1">|</span>
  12. <span>{{$profile->following()->count()}} Following</span>
  13. </p>
  14. </span>
  15. <span>
  16. <div class="dropdown">
  17. <button class="btn btn-outline-secondary btn-sm font-weight-bold dropdown-toggle" type="button" id="userActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fas fa-bars"></i></button>
  18. <div class="dropdown-menu dropdown-menu-right" aria-labelledby="userActions">
  19. <a class="dropdown-item" href="/i/admin/users/show/{{$user->id}}">
  20. <span class="font-weight-bold">Overview</span>
  21. </a>
  22. <a class="dropdown-item" href="/i/admin/users/activity/{{$user->id}}">
  23. <span class="font-weight-bold">Activity</span>
  24. </a>
  25. <a class="dropdown-item" href="/i/admin/users/message/{{$user->id}}">
  26. <span class="font-weight-bold">Send Message</span>
  27. </a>
  28. <a class="dropdown-item" href="{{$profile->url()}}">
  29. <span class="font-weight-bold">View Profile</span>
  30. </a>
  31. <div class="dropdown-divider"></div>
  32. <a class="dropdown-item" href="/i/admin/users/modtools/{{$user->id}}">
  33. <span class="font-weight-bold">Mod Tools</span>
  34. </a>
  35. <a class="dropdown-item" href="/i/admin/users/modlogs/{{$user->id}}">
  36. <span class="font-weight-bold">Mod Logs</span>
  37. </a>
  38. <div class="dropdown-divider"></div>
  39. <a class="dropdown-item" href="/i/admin/users/delete/{{$user->id}}">
  40. <span class="text-danger font-weight-bold">Delete Account</span>
  41. </a>
  42. </div>
  43. </div>
  44. </span>
  45. </div>
  46. <hr>
  47. <div class="col-12 col-md-8 offset-md-2">
  48. <p class="title h4 font-weight-bold mt-2 py-2">Edit</p>
  49. <hr>
  50. <div class="row">
  51. <div class="col-12">
  52. <form method="post">
  53. @csrf
  54. <div class="form-group">
  55. <label class="font-weight-bold text-muted">Display Name</label>
  56. <input type="text" class="form-control" name="name" value="{{$user->name}}">
  57. </div>
  58. <div class="form-group">
  59. <label class="font-weight-bold text-muted">Username</label>
  60. <input type="text" class="form-control" name="username" value="{{$user->username}}">
  61. </div>
  62. <div class="form-group">
  63. <label class="font-weight-bold text-muted">Email address</label>
  64. <input type="email" class="form-control" name="email" value="{{$user->email}}" placeholder="Enter email">
  65. <p class="help-text small text-muted font-weight-bold">
  66. @if($user->email_verified_at)
  67. <span class="text-success">Verified</span> for {{$user->email_verified_at->diffForHumans()}}
  68. @else
  69. <span class="text-danger">Unverified</span> email.
  70. @endif
  71. </p>
  72. </div>
  73. <div class="form-group">
  74. <label class="font-weight-bold text-muted">Bio</label>
  75. <textarea class="form-control" rows="4" name="bio" placeholder="Empty bio">{{$profile->bio}}</textarea>
  76. </div>
  77. <div class="form-group">
  78. <label class="font-weight-bold text-muted">Website</label>
  79. <input type="text" class="form-control" name="website" value="{{$profile->website}}" placeholder="No website added">
  80. </div>
  81. <div class="form-group">
  82. <label class="font-weight-bold text-muted">Admin</label>
  83. <div class="custom-control custom-switch">
  84. <input type="checkbox" class="custom-control-input" id="customSwitch1" {{$user->is_admin ? 'checked="checked"' : ''}}>
  85. <label class="custom-control-label" for="customSwitch1"></label>
  86. </div>
  87. <p class="help-text small text-muted font-weight-bold">For security reasons, you cannot change admin status on this form. Use the CLI instead.</p>
  88. </div>
  89. <hr>
  90. <p class="float-right">
  91. <button type="submit" class="btn btn-primary font-weight-bold py-1">SAVE</button>
  92. </p>
  93. </form>
  94. </div>
  95. </div>
  96. </div>
  97. @endsection