2018-03-23 16:24:57 +09:00
@model StoreUsersViewModel
@{
Layout = "../Shared/_NavLayout.cshtml";
2021-12-31 08:36:38 +01:00
ViewData.SetActivePage(StoreNavPages.Users, "Store Users", Context.GetStoreData().Id);
2018-03-23 16:24:57 +09:00
}
<div class="row">
2022-01-27 03:56:46 +01:00
<div class="col-xxl-constrain col-xl-8">
2021-12-16 11:17:02 +01:00
<h3 class="mb-3">@ViewData["Title"]</h3>
2021-04-08 15:32:42 +02:00
<p>
2021-11-18 00:56:25 -08:00
Give other registered BTCPay Server users access to your store.<br />
Guests will not be able to see or modify the store settings.
2021-04-08 15:32:42 +02:00
</p>
@if (!ViewContext.ModelState.IsValid)
{
<div asp-validation-summary="All" class="text-danger"></div>
}
2021-05-19 04:39:27 +02:00
<form method="post">
2021-11-18 00:56:25 -08:00
<div class="d-flex">
<div class="flex-grow-1">
2021-05-19 04:39:27 +02:00
<input asp-for="Email" type="text" class="form-control" placeholder="user@example.com">
</div>
2021-11-18 00:56:25 -08:00
<div class="ms-3">
2021-05-19 04:39:27 +02:00
<select asp-for="Role" class="form-select">
<option value="@StoreRoles.Owner">Owner</option>
<option value="@StoreRoles.Guest">Guest</option>
</select>
</div>
2021-11-18 00:56:25 -08:00
<div class="ms-3">
2021-12-27 22:54:31 -08:00
<button type="submit" role="button" class="btn btn-primary"><span class="fa fa-plus"></span> Add User</button>
2021-05-19 04:39:27 +02:00
</div>
</div>
</form>
2018-03-23 16:24:57 +09:00
<div class="form-group">
2021-08-20 14:59:31 +02:00
<table class="table table-hover table-responsive-md">
2018-04-05 23:20:12 -05:00
<thead>
2021-04-08 15:32:42 +02:00
<tr>
<th>Email</th>
<th>Role</th>
<th style="text-align:right">Actions</th>
</tr>
2018-03-23 16:24:57 +09:00
</thead>
<tbody>
2021-04-08 15:32:42 +02:00
@foreach (var user in Model.Users)
{
<tr>
<td>@user.Email</td>
<td>@user.Role</td>
<td style="text-align:right">
2021-09-07 04:55:53 +02:00
<a asp-action="DeleteStoreUser" asp-route-storeId="@Model.StoreId" asp-route-userId="@user.Id" data-bs-toggle="modal" data-bs-target="#ConfirmModal" data-description="This action will prevent <strong>@user.Email</strong> from accessing this store and its settings." data-confirm-input="REMOVE">Remove</a>
2021-04-08 15:32:42 +02:00
</td>
</tr>
}
2018-03-23 16:24:57 +09:00
</tbody>
</table>
</div>
</div>
</div>
2021-09-07 04:55:53 +02:00
<partial name="_Confirm" model="@(new ConfirmModel("Remove store user", "This action will prevent the user from accessing this store and its settings. Are you sure?", "Delete"))" />
@section PageFootContent {
<partial name="_ValidationScriptsPartial" />
2021-12-16 11:17:02 +01:00
}