1
0
mirror of https://koodu.h-i.works/projects/thebadspace synced 2025-06-25 16:04:37 -05:00

added member edit admin ui

needed way to edit existing members info if needed, so simple ui was
created for admins of the site to change specific info, not including a
members avi or password.

also consolidated memeber action and ui into it's own controller for the
sake of clearer organization
This commit is contained in:
ro
2024-09-24 16:21:59 -06:00
parent 250f9193fa
commit 3f838bab8b
9 changed files with 160 additions and 39 deletions

View File

@ -5,7 +5,23 @@
@section('main-content')
<section>
<article>
<h2>Member Listing </h2>
@switch($mode)
@case('member-edit')
<h2>Edit Info for {{$member->handle}}</h2>
@include('forms.member-edit')
<br />
@break
@case('member-create')
Second case...
@break
@default
<h2>Member Listing </h2>
@foreach($members as $member)
<a href="/den/member/{{$member->uuid}}">{{$member->handle}}</a><br />
@endforeach
@endswitch
</article>
</section>
@endsection

View File

@ -8,8 +8,8 @@
<article>
<h2>Hey {{$handle}} </h2>
<a href="/den/you">Edit Your Account</a><br />
<a href="/den/locations">Manage Locations</a><br />
@if($role==1)
@if($role==0)
<a href="/den/locations">Manage Locations</a><br />
<a href="/den/member">Manage Members</a><br />
@endif
</article>

View File

@ -0,0 +1,34 @@
<form action="/den/member/edit" method="post" enctype="multipart/form-data">
<div>
<img class="your-avatar" src='{{$avatar}}'>
<br />
<label>Handle</label><br />
<input type="text" name="handle" value="{{$member->handle}}" />
<br />
<label>Email</label><br />
<input type="text" name="email" value="{{$member->email}}" />
<br />
<label>Pronouns</label><br />
<input type="text" name="pronouns" value="{{$member->pronoun}}" />
<br />
<label>Role</label><br />
<input type="text" name="role" value="{{$member->role}}" />
<br />
<label>Status</label><br />
<select name="status">
@if($member->active == true)
<option value="true" selected>Active</option>
<option value="false">Not Active</option>
@else
<option value="true">Active</option>
<option value="false" selected>Not Active</option>
@endif
</select>
<br />
</div>
@csrf
<input type="hidden" name="id" value="{{$member->uuid}}" />
<input type="submit" value="Edit Member" name="submit_button">
</form>