btcpayserver/BTCPayServer/Views/Stores/StoreUsers.cshtml
d11n 06db29dd43
Delete confirmation modals (#2614)
* Refactor confirm view: separate modal

* Add delete confirmation modals for apps and FIDO2

* Add delete confirmation modals for 2FA actions

* Add delete confirmation modals for api keys and webhooks

* Add delete confirmation modals for stores and store users

* Add delete confirmation modals for LND seed and SSH

* Add delete confirmation modals for rate rule scripting

* Test fixes and improvements

* Add delete confirmation modals for dynamic DNS

* Add delete confirmation modals for store access tokens

* Add confirmation modals for pull payment archiving

* Refactor confirm modal code

* Add confirmation input, update wording

* Update modal styles

* Upgrade ChromeDriver

* Simplify and unify confirmation input

* Test fixes

* Fix wording

* Add modals for wallet replace and removal
2021-09-07 11:55:53 +09:00

69 lines
2.7 KiB
Text

@model StoreUsersViewModel
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData.SetActivePageAndTitle(StoreNavPages.Users, "Manage users", Context.GetStoreData().StoreName);
}
<div class="row">
<div class="col-lg-8">
<h4 class="mb-3">@ViewData["PageTitle"]</h4>
<p>
Add access to your store to other users (Guest will not be able to see and modify the store settings)<br/>
Note that the user must have a registered account on this BTCPay Server.
</p>
@if (!ViewContext.ModelState.IsValid)
{
<div asp-validation-summary="All" class="text-danger"></div>
}
<form method="post">
<div class="row g-1">
<div class="col-sm">
<input asp-for="Email" type="text" class="form-control" placeholder="user@example.com">
</div>
<div class="col-sm">
<select asp-for="Role" class="form-select">
<option value="@StoreRoles.Owner">Owner</option>
<option value="@StoreRoles.Guest">Guest</option>
</select>
</div>
<div class="col-sm">
<button type="submit" role="button" class="btn btn-primary"><span class="fa fa-plus"></span> Add user</button>
</div>
</div>
</form>
<div class="form-group">
<table class="table table-hover table-responsive-md">
<thead>
<tr>
<th>Email</th>
<th>Role</th>
<th style="text-align:right">Actions</th>
</tr>
</thead>
<tbody>
@foreach (var user in Model.Users)
{
<tr>
<td>@user.Email</td>
<td>@user.Role</td>
<td style="text-align:right">
<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>
</td>
</tr>
}
</tbody>
</table>
</div>
</div>
</div>
<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" />
}