Skip to content

Commit

Permalink
Merge pull request #2509 from Ludy87/btn_standardize
Browse files Browse the repository at this point in the history
standardize the submit button
  • Loading branch information
Frooodle authored Dec 20, 2024
2 parents 30bcdbd + a9e2505 commit a71cb7f
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/main/resources/templates/addUsers.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@
<td style="align-content: center;">
<form th:action="@{'/api/v1/user/admin/changeUserEnabled/' + ${user.username}}" method="post" onsubmit="return confirmChangeUserStatus()">
<input type="hidden" name="enabled" th:value="!${user.enabled}" />
<button th:if="${user.enabled}" th:title="#{adminUserSettings.enabledUser}" type="submit" class="btn btn-success btn-sm">
<button type="submit" th:if="${user.enabled}" th:title="#{adminUserSettings.enabledUser}" class="btn btn-success btn-sm">
<span class="material-symbols-rounded">person</span>
</button>
<button th:unless="${user.enabled}" th:title="#{adminUserSettings.disabledUser}" type="submit" class="btn btn-danger btn-sm">
<button type="submit" th:unless="${user.enabled}" th:title="#{adminUserSettings.disabledUser}" class="btn btn-danger btn-sm">
<span class="material-symbols-rounded">person_off</span>
</button>
</form>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/convert/pdf-to-csv.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<form id="PDFToCSVForm" th:action="@{'/api/v1/convert/pdf/csv'}" method="post" enctype="multipart/form-data">
<input id="pageId" type="hidden" name="pageId">
<div th:replace="~{fragments/common :: fileSelector(name='fileInput', multipleInputsForSingleRequest=false, accept='application/pdf')}"></div>
<button type="submit" class="btn btn-primary" th:text="#{PDFToCSV.submit}" id="submitBtn"></button>
<button type="submit" id="submitBtn" class="btn btn-primary" th:text="#{PDFToCSV.submit}"></button>
</form>
<p id="instruction-text" style="margin: 0; display: none" th:text="#{PDFToCSV.prompt}"></p>

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/crop.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<input id="y" type="hidden" name="y">
<input id="width" type="hidden" name="width">
<input id="height" type="hidden" name="height">
<button id="submitBtn" type="submit" class="btn btn-primary" th:text="#{crop.submit}"></button>
<button type="submit" id="submitBtn" class="btn btn-primary" th:text="#{crop.submit}"></button>
</form>
<div id="canvasesContainer" style="position: relative; margin: 20px 0; width: auto;">
<canvas id="cropPdfCanvas" style="width: 100%"></canvas>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ <h2 class="h5 mb-3 fw-normal" th:text="#{login.signinTitle}">Please sign in</h2>
<input type="checkbox" name="remember-me" id="remember-me">
<label for="remember-me" th:text="#{login.rememberme}"></label>
</div>
<button class="w-100 btn btn-lg btn-primary" type="submit" th:text="#{login.signin}">Sign in</button>
<button type="submit" class="w-100 btn btn-lg btn-primary" th:text="#{login.signin}">Sign in</button>
</form>
<div class="mt-3"> <!-- Added a margin-top for spacing -->
<div class="dropdown text-center">
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/misc/change-metadata.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ <h3 th:text="#{changeMetadata.selectText.4}"></h3>
<button type="button" class="btn btn-secondary" id="addMetadataBtn" th:text="#{changeMetadata.selectText.5}"></button>
<br>
<br>
<button class="btn btn-primary" type="submit" id="submitBtn" th:text="#{changeMetadata.submit}"></button>
<button type="submit" id="submitBtn" class="btn btn-primary" th:text="#{changeMetadata.submit}"></button>
<script type="module" th:src="@{'/pdfjs-legacy/pdf.mjs'}"></script>
<script type="module" th:src="@{'/js/pages/change-metadata.js'}">
</script>
Expand Down
5 changes: 2 additions & 3 deletions src/main/resources/templates/remove-image-pdf.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<html th:lang="${#locale.language}" th:dir="#{language.direction}" th:data-language="${#locale.toString()}"
xmlns:th="https://www.thymeleaf.org">
<head>
<th:block
th:insert="~{fragments/common :: head(title=#{removeImage.title}, header=#{removeImage.header})}"></th:block>
<th:block th:insert="~{fragments/common :: head(title=#{removeImage.title}, header=#{removeImage.header})}"></th:block>
<link rel="stylesheet" th:href="@{'/css/removeImage.css'}">
</head>

Expand All @@ -20,7 +19,7 @@
<span class="material-symbols-rounded tool-header-icon word">remove_selection</span>
<span class="tool-header-text" th:text="#{removeImage.header}"></span>
</div>
<form th:action="@{'api/v1/general/remove-image-pdf'}" method="post" enctype="multipart/form-data">
<form th:action="@{'api/v1/general/remove-image-pdf'}" method="post" enctype="multipart/form-data">
<div th:replace="~{fragments/common :: fileSelector(name='fileInput', multipleInputsForSingleRequest=false, accept='application/pdf')}"></div>

<br>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/security/add-watermark.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
<label for="convertPDFToImage" th:text="#{watermark.selectText.10}"></label>
</div>
<div class="mb-3 text-left">
<input type="submit" id="submitBtn" th:value="#{watermark.submit}" class="btn btn-primary">
<button type="submit" id="submitBtn" class="btn btn-primary" th:text="#{watermark.submit}"></button>
</div>
</form>

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/security/auto-redact.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<label for="convertPDFToImage" th:text="#{autoRedact.convertPDFToImageLabel}"></label>
</div>

<button type="submit" class="btn btn-primary" th:text="#{autoRedact.submitButton}"></button>
<button type="submit" id="submitBtn" class="btn btn-primary" th:text="#{autoRedact.submitButton}"></button>
</form>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<input type="text" id="watermarkText" name="watermarkText" class="form-control" placeholder="Stirling-PDF" required />
</div>
<div class="mb-3 text-center">
<input type="submit" id="submitBtn" th:value="#{remove-watermark.submit}" class="btn btn-primary" />
<button type="submit" id="submitBtn" class="btn btn-primary" th:text="#{remove-watermark.submit}"></button>
</div>
</form>
</div>
Expand Down

0 comments on commit a71cb7f

Please sign in to comment.