mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-01-07 08:04:29 +01:00
Improves upload button for files (#3044)
* reorders form, removes header * adds flexbox + button formatting * adjusts whitespace & flexbox class * adjusts class for mobile
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
@if (!Model.StorageConfigured)
|
||||
{
|
||||
<p>
|
||||
Before being able to upload you first need to
|
||||
Before being able to upload you first need to
|
||||
<a asp-action="storage" asp-route-forceChoice="true" asp-route-returnurl="@ViewData["ReturnUrl"]">
|
||||
choose your file storage service provider
|
||||
</a>.
|
||||
@@ -26,6 +26,16 @@ else
|
||||
</a>
|
||||
</p>
|
||||
|
||||
@if (Model.StorageConfigured)
|
||||
{
|
||||
<form asp-action="CreateFiles" method="post" enctype="multipart/form-data">
|
||||
<div class="d-flex">
|
||||
<input multiple type="file" class="form-control mb-3" name="files" id="files" required>
|
||||
<button class="btn btn-primary mb-3 ms-3" role="button">Upload</button>
|
||||
</div>
|
||||
</form>
|
||||
}
|
||||
|
||||
@if (Model.Files.Any())
|
||||
{
|
||||
<table class="table table-hover table-responsive-md">
|
||||
@@ -62,8 +72,7 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@if(Model.DirectUrlByFiles!=null && Model.DirectUrlByFiles.Count > 0)
|
||||
@if (Model.DirectUrlByFiles != null && Model.DirectUrlByFiles.Count > 0)
|
||||
{
|
||||
foreach (KeyValuePair<string, string> fileUrlPair in Model.DirectUrlByFiles)
|
||||
{
|
||||
@@ -71,7 +80,6 @@ else
|
||||
var fileUrl = fileUrlPair.Value;
|
||||
var file = Model.Files.Single(storedFile => storedFile.Id.Equals(fileId, StringComparison.InvariantCultureIgnoreCase));
|
||||
|
||||
|
||||
<div class="card mb-2">
|
||||
<div class="card-text">
|
||||
<ul class="list-group list-group-flush">
|
||||
@@ -97,11 +105,3 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
@if (Model.StorageConfigured)
|
||||
{
|
||||
<form asp-action="CreateFiles" method="post" enctype="multipart/form-data">
|
||||
<h4 class="mt-5 mb-3">Upload Files</h4>
|
||||
<input multiple type="file" class="form-control mb-3" name="files" id="files" required>
|
||||
<button class="btn btn-primary" role="button"><span class="fa fa-plus"></span> Upload files</button>
|
||||
</form>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user