mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-24 14:50:50 +01:00
* Newlines * Dashboard * Add more translations * Moar * Remove from translated texts * Dictionary controller translations * Batch 1 of controller updates * Batch 2 of controller updates * Component translations * Batch 3 of controller updates * Fixes
82 lines
4 KiB
Text
82 lines
4 KiB
Text
@using BTCPayServer.Abstractions.Contracts
|
|
@using BTCPayServer.Abstractions.Models
|
|
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
|
@inject IFileService FileService
|
|
@model IndexViewModel
|
|
@{
|
|
ViewData.SetActivePage(ManageNavPages.Index, "Update your account");
|
|
var canUpload = await FileService.IsAvailable();
|
|
}
|
|
|
|
<form method="post" enctype="multipart/form-data">
|
|
<div class="sticky-header">
|
|
<h2 text-translate="true">@ViewData["Title"]</h2>
|
|
<button id="page-primary" type="submit" class="btn btn-primary">Save</button>
|
|
</div>
|
|
<partial name="_StatusMessage" />
|
|
<div class="col-xxl-constrain col-xl-8">
|
|
@if (!ViewContext.ModelState.IsValid)
|
|
{
|
|
<div asp-validation-summary="All" class="@(ViewContext.ModelState.ErrorCount.Equals(1) ? "no-marker" : "")"></div>
|
|
}
|
|
<div class="form-group">
|
|
<div class="d-flex align-items-center justify-content-between gap-3">
|
|
<label asp-for="Email" class="form-label"></label>
|
|
@if (Model.RequiresEmailConfirmation)
|
|
{
|
|
<button asp-action="SendVerificationEmail" class="d-inline-flex align-items-center gap-1 btn btn-link p-0">
|
|
<vc:icon symbol="actions-email" />
|
|
<span text-translate="true">Send verification email</span>
|
|
</button>
|
|
}
|
|
else if (Model.EmailConfirmed)
|
|
{
|
|
<span class="d-inline-flex align-items-center gap-1 text-success">
|
|
<vc:icon symbol="checkmark" />
|
|
<span text-translate="true">confirmed</span>
|
|
</span>
|
|
}
|
|
</div>
|
|
<input asp-for="Email" class="form-control" />
|
|
<span asp-validation-for="Email" class="text-danger"></span>
|
|
</div>
|
|
<div class="form-group">
|
|
<label asp-for="Name" class="form-label"></label>
|
|
<input asp-for="Name" class="form-control" />
|
|
<span asp-validation-for="Name" class="text-danger"></span>
|
|
</div>
|
|
@if (canUpload)
|
|
{
|
|
<div class="form-group">
|
|
<div class="d-flex align-items-center justify-content-between gap-2">
|
|
<label asp-for="ImageFile" class="form-label"></label>
|
|
@if (!string.IsNullOrEmpty(Model.ImageUrl))
|
|
{
|
|
<button type="submit" class="btn btn-link p-0 text-danger" name="RemoveImageFile" value="true">
|
|
<vc:icon symbol="cross" />
|
|
<span text-translate="true">Remove</span>
|
|
</button>
|
|
}
|
|
</div>
|
|
<div class="d-flex align-items-center gap-3">
|
|
<input asp-for="ImageFile" type="file" class="form-control flex-grow">
|
|
@if (!string.IsNullOrEmpty(Model.ImageUrl))
|
|
{
|
|
<img src="@Model.ImageUrl" alt="Profile picture" class="profile-picture"/>
|
|
}
|
|
</div>
|
|
<span asp-validation-for="ImageFile" class="text-danger"></span>
|
|
</div>
|
|
}
|
|
<h3 class="mt-5 mb-4" text-translate="true">Delete Account</h3>
|
|
<div id="danger-zone">
|
|
<a id="delete-user" class="btn btn-outline-danger mb-5" data-confirm-input="DELETE" data-bs-toggle="modal" data-bs-target="#ConfirmModal" asp-action="DeleteUserPost" data-description="This action will also delete all stores, invoices, apps and data associated with the user." text-translate="true">Delete Account</a>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<partial name="_Confirm"
|
|
model="@(new ConfirmModel("Delete user", "The user will be permanently deleted. This action will also delete all stores, invoices, apps and data associated with your user.", "Delete", actionName: nameof(BTCPayServer.Controllers.UIManageController.DeleteUserPost)))"/>
|
|
|
|
@section PageFootContent {
|
|
<partial name="_ValidationScriptsPartial"/>
|
|
}
|