mirror of
https://github.com/Jetsparrow/jetherald.git
synced 2026-01-20 23:56:08 +03:00
47 lines
1.8 KiB
Plaintext
47 lines
1.8 KiB
Plaintext
@model AdminInvitesModel
|
|
|
|
<form asp-controller="AdminInvites" asp-action="CreateInvite" method="POST" enctype="application/x-www-form-urlencoded">
|
|
<label for="roleselector">Role:</label>
|
|
<select name="roleId" required id="roleselector">
|
|
@foreach (var role in Model.Roles.Values)
|
|
{
|
|
<option value="@role.RoleId">@role.Name</option>
|
|
}
|
|
</select>
|
|
<label for="planselector">Plan:</label>
|
|
<select name="planId" required id="planselector">
|
|
@foreach (var plan in Model.Plans.Values)
|
|
{
|
|
<option value="@plan.PlanId">@plan.Name</option>
|
|
}
|
|
</select>
|
|
|
|
<input type="submit" value="Create invite" class="h2 submitpost" style="margin-top:10px; width:initial">
|
|
</form>
|
|
<br>
|
|
<hr>
|
|
<h3>Invites</h3>
|
|
<ul class="issues-list">
|
|
@foreach (var invite in Model.Invites)
|
|
{
|
|
<li>
|
|
<span style="font-family:monospace">@invite.InviteCode.Substring(0, 12)... r:(@Model.Roles[invite.RoleId].Name) p:(@Model.Plans[invite.PlanId].Name)</span>
|
|
<form asp-controller="AdminInvites" asp-action="DeleteInvite" asp-route-inviteId="@invite.UserInviteId" method="POST" style="display:inline">
|
|
<input type="submit" value="❌" style="display:inline; color:red;" class="buttonlink">
|
|
</form>
|
|
@if (invite.RedeemedBy == default)
|
|
{
|
|
<a class="copier" style="display:inline; color:blue"
|
|
asp-controller="Registration" asp-action="Register" asp-route-invite="@invite.InviteCode">
|
|
📤
|
|
</a>
|
|
}
|
|
else
|
|
{
|
|
<span>
|
|
@invite.RedeemedBy:@(invite.RedeemedByLogin ?? "deleted user")
|
|
</span>
|
|
}
|
|
</li>
|
|
}
|
|
</ul> |