Stirling-PDF/src/main/resources/templates/pdf-organizer.html

58 lines
2.8 KiB
HTML
Raw Normal View History

2023-01-27 19:23:40 +01:00
<!DOCTYPE html>
2023-04-03 00:59:22 +02:00
<html th:lang="${#locale.toString()}" th:lang-direction="#{language.direction}" xmlns:th="http://www.thymeleaf.org">
2023-01-27 19:23:40 +01:00
2023-02-05 13:54:48 +01:00
<th:block th:insert="~{fragments/common :: head(title=#{pdfOrganiser.title})}"></th:block>
<body>
<div id="page-container">
<div id="content-wrap">
<div th:insert="~{fragments/navbar.html :: navbar}"></div>
<br> <br>
<div class="container">
<div class="row justify-content-center">
<div class="col-md-6">
<h2 th:text="#{pdfOrganiser.header}"></h2>
2023-01-27 19:23:40 +01:00
2023-09-12 00:19:50 +02:00
<form th:action="@{api/v1/general/rearrange-pages}" method="post" enctype="multipart/form-data">
<div th:replace="~{fragments/common :: fileSelector(name='fileInput', multiple=false, accept='application/pdf')}"></div>
2023-08-20 22:57:19 +02:00
<div class="mb-3">
2023-05-27 00:53:11 +02:00
<label for="customMode">Mode</label>
<select class="form-control" id="customMode" name="customMode">
<option value="">Custom Page Order</option>
<option value="REVERSE_ORDER">Reverse Order</option>
<option value="DUPLEX_SORT">Duplex Sort</option>
<option value="BOOKLET_SORT">Booklet Sort</option>
2023-09-05 19:48:16 +02:00
<option value="SIDE_STITCH_BOOKLET_SORT">Side Stitch Booklet Sort</option>
2023-05-27 00:53:11 +02:00
<option value="ODD_EVEN_SPLIT">Odd-Even Split</option>
<option value="REMOVE_FIRST">Remove First</option>
<option value="REMOVE_LAST">Remove Last</option>
<option value="REMOVE_FIRST_AND_LAST">Remove First and Last</option>
</select>
</div>
2023-08-20 22:57:19 +02:00
<div class="mb-3">
<label for="pageOrder" th:text="#{pageOrderPrompt}"></label>
<input type="text" class="form-control" id="pageOrder" name="pageNumbers" placeholder="(e.g. 1,3,2 or 4-8,2,10-12 or 2n-1)" required>
</div>
2023-05-27 00:53:11 +02:00
2023-04-02 12:51:07 +02:00
<button type="submit" id="submitBtn" class="btn btn-primary" th:text="#{pdfOrganiser.submit}"></button>
</form>
2023-05-27 00:53:11 +02:00
<script>
document.getElementById('customMode').addEventListener('change', function () {
var pageOrderInput = document.getElementById('pageOrder');
if (this.value === "") {
pageOrderInput.disabled = false;
} else {
pageOrderInput.disabled = true;
}
});
</script>
</div>
</div>
</div>
</div>
<div th:insert="~{fragments/footer.html :: footer}"></div>
</div>
2023-01-27 19:23:40 +01:00
</body>
2023-09-05 19:48:16 +02:00
</html>