thebadspace/resources/views/forms/member-edit.blade.php
ro 3c0762344e added member create ui
now that editing member work, that process needed to be fleshed out by
adding an admin method to add new members as well. now new members can
be added by an admin

also changed the name of a blade file that wasn't following the template
naming convention
2024-09-27 12:39:56 -06:00

61 lines
1.9 KiB
PHP

<form action="{{$action_url}}" method="post" enctype="multipart/form-data">
<div>
@php
isset($avatar) ? $avi = $avatar : $avi = '';
@endphp
<img class="your-avatar" src='{{$avi}}'>
<br />
<label>Handle</label><br />
@php
isset($member->handle) ? $handle = $member->handle : $handle = '';
@endphp
<input type="text" name="handle" value="{{$handle}}" />
<br />
@php
isset($member->email) ? $email = $member->email : $email = '';
@endphp
<label>Email</label><br />
<input type="text" name="email" value="{{$email}}" />
<br />
@php
isset($member->pronoun) ? $pronoun = $member->pronoun : $pronoun = '';
@endphp
<label>Pronouns</label><br />
<input type="text" name="pronouns" value="{{$pronoun}}" />
<br />
@php
isset($member->role) ? $role = $member->role : $role = 2;
@endphp
<label>Role</label><br />
<input type="text" name="role" value="{{$role}}" />
<br />
@if($mode == 'member-create')
<label>Fresh Password</label><br />
<input type="password" id="fresh_pass" name="fresh_pass" value="" />
<br />
<label>Confirm Fresh Password</label><br />
<input type="password" id="fresh_pass_confirm" name="fresh_pass_confirm" value="" />
<br />
@endif
@php
isset($member->active) ? $status = $member->active : $status = false;
@endphp
<label>Status</label><br />
<select name="status">
@if($status)
<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
@php
isset($member->uuid) ? $uuid = $member->uuid : $uuid = 0;
@endphp
<input type="hidden" name="id" value="{{$uuid}}" />
<input type="submit" value="Edit Member" name="submit_button">
</form>