mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
ban/unban buttons added to profile
several css tweaks changed administratorIPs to PrivilegedClients added time step references to profile page
This commit is contained in:
22
WebfrontCore/Views/Action/_ActionForm.cshtml
Normal file
22
WebfrontCore/Views/Action/_ActionForm.cshtml
Normal file
@ -0,0 +1,22 @@
|
||||
@model WebfrontCore.ViewModels.ActionInfo
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
<form class="action-form" action="/Action/@Model.Action">
|
||||
<div class="input-group mb-3">
|
||||
@foreach (var input in Model.Inputs)
|
||||
{
|
||||
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" id="basic-addon-@input.Name">@input.Name</span>
|
||||
</div>
|
||||
{
|
||||
string inputType = input.Type ?? "text";
|
||||
string value = input.Value ?? "";
|
||||
|
||||
<input type="@inputType" name="@input.Name" value="@value" class="form-control" placeholder="@input.Placeholder" aria-label="@input.Name" aria-describedby="basic-addon-@input.Name">
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<button type="submit" class="btn btn-block btn-primary">@Model.ActionButtonLabel</button>
|
||||
</form>
|
@ -26,12 +26,12 @@
|
||||
if (Model.Level == SharedLibrary.Objects.Player.Permission.User.ToString())
|
||||
{
|
||||
|
||||
<span id="profile_action_ban_btn" class="oi oi-ban text-danger" title="ban" aria-hidden="true"></span>
|
||||
<span id="profile_action_ban_btn" class="profile-action oi oi-ban text-danger" title="Ban Client" data-action="ban" aria-hidden="true"></span>
|
||||
}
|
||||
|
||||
if (Model.Level == SharedLibrary.Objects.Player.Permission.Banned.ToString())
|
||||
{
|
||||
<span id="profile_action_unban_btn" class="iconic iconic-carriage-return text-success" title="carriage return" aria-hidden="true"></span>
|
||||
<span id="profile_action_unban_btn" class="profile-action oi oi-action-undo text-success" title="carriage return" data-action="unban" aria-hidden="true"></span>
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -85,6 +85,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section targetid {
|
||||
<input type="hidden" name="targetId" value="@Model.ClientId" />
|
||||
}
|
||||
|
||||
@section scripts {
|
||||
<script>
|
||||
const clientInfo = {};
|
||||
|
@ -61,6 +61,30 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Action Modal -->
|
||||
<div class="modal fade" id="actionModal" tabindex="-1" role="dialog" aria-labelledby="actionModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content bg-dark">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="actionModalLabel">IW4MAdmin</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true" class="text-danger">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
</div>
|
||||
<!--<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary">Action</button>
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="target_id">
|
||||
@RenderSection("targetid", required: false);
|
||||
</div>
|
||||
<!-- End Action Modal -->
|
||||
|
||||
<div class="container pt-0 pb-4 pl-4 pr-4">
|
||||
@RenderBody()
|
||||
<footer></footer>
|
||||
|
Reference in New Issue
Block a user