made the renew lifetime button to appear only when the file is not flagged for indefinite keeping

This commit is contained in:
Rostislav Raykov
2024-10-17 20:18:25 +03:00
parent 62dcfe4965
commit 9d9a3269d7

View File

@@ -96,7 +96,14 @@
<!-- Buttons Row -->
<div class="d-flex justify-content-between mt-3 border-top pt-3">
<form method="post" th:action="@{/file/extend/{id}(id=${file.id})}">
<a
class="btn btn-success"
th:href="@{/file/download/{id}(id=${file.id})}"
>
Download
</a>
<form method="post" th:action="@{/file/extend/{id}(id=${file.id})}"
th:if="${file.keepIndefinitely == false}">
<input
th:name="${_csrf.parameterName}"
th:value="${_csrf.token}"
@@ -104,12 +111,6 @@
/>
<button class="btn btn-primary" type="submit">Renew File Lifetime</button>
</form>
<a
class="btn btn-success"
th:href="@{/file/download/{id}(id=${file.id})}"
>
Download
</a>
</div>
</div>
</div>