Lang setup (#35)

This commit is contained in:
Anthony Stirling
2023-02-05 12:54:48 +00:00
committed by GitHub
parent dd11cfab40
commit 6662115d10
22 changed files with 674 additions and 172 deletions

View File

@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<th:block th:insert="~{fragments/common :: head(title='Add Password')}"></th:block>
<th:block th:insert="~{fragments/common :: head(title=#{addPassword.title})}"></th:block>
<body> <div id="page-container">
<div id="content-wrap">
@@ -11,85 +11,78 @@
<div class="container">
<div class="row justify-content-center">
<div class="col-md-6">
<h2>Add password (Encrypt)</h2>
<h2 th:text="#{addPassword.header}"></h2>
<form action="add-password" method="post"
enctype="multipart/form-data">
<div class="form-group">
<label>Select PDF to encrypt</label>
<label th:text="#{addPassword.selectText.1}"></label>
<div class="custom-file">
<input type="file" class="custom-file-input" id="fileInput"
name="fileInput" required> <label
class="custom-file-label">Choose PDF</label>
class="custom-file-label" th:text="#{pdfPrompt}"></label>
</div>
</div>
<div class="form-group">
<label>Password</label> <input type="password"
<label th:text="#{addPassword.selectText.2}"></label> <input type="password"
class="form-control" id="password" name="password" required>
</div>
<div class="form-group">
<label>Encryption Key Length</label> <select class="form-control"
<label th:text="#{addPassword.selectText.3}"></label> <select class="form-control"
id="keyLength" name="keyLength">
<option value="40">40</option>
<option value="128">128</option>
<option value="256">256</option>
</select> <small class="form-text text-muted">Higher values are
stronger, but lower values have better compatibility.</small>
</select> <small class="form-text text-muted" th:text="#{addPassword.selectText.4}"></small>
</div>
<div class="form-group">
<label>Permissions to set</label>
<label th:text="#{addPassword.selectText.5}"></label>
<div class="form-check">
<input class="form-check-input" type="checkbox"
id="canAssembleDocument" name="canAssembleDocument"> <label
class="form-check-label" for="canAssembleDocument">
Prevent assembly of document </label>
class="form-check-label" for="canAssembleDocument" th:text="#{addPassword.selectText.6}"></label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox"
id="canExtractContent" name="canExtractContent"> <label
class="form-check-label" for="canExtractContent">
Prevent content extraction </label>
class="form-check-label" for="canExtractContent" th:text="#{addPassword.selectText.7}"></label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox"
id="canExtractForAccessibility"
name="canExtractForAccessibility"> <label
class="form-check-label" for="canExtractForAccessibility">
Prevent extraction for accessibility </label>
class="form-check-label" for="canExtractForAccessibility" th:text="#{addPassword.selectText.8}"></label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox"
id="canFillInForm" name="canFillInForm"> <label
class="form-check-label" for="canFillInForm"> Prevent
filling in form </label>
class="form-check-label" for="canFillInForm" th:text="#{addPassword.selectText.9}"></label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="canModify"
name="canModify"> <label class="form-check-label"
for="canModify"> Prevent modification </label>
for="canModify" th:text="#{addPassword.selectText.10}"></label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox"
id="canModifyAnnotations" name="canModifyAnnotations"> <label
class="form-check-label" for="canModifyAnnotations">
Prevent annotation modification </label>
class="form-check-label" for="canModifyAnnotations" th:text="#{addPassword.selectText.11}"></label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="canPrint"
name="canPrint"> <label class="form-check-label"
for="canPrint"> Prevent printing </label>
for="canPrint" th:text="#{addPassword.selectText.12}"></label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox"
id="canPrintFaithful" name="canPrintFaithful"> <label
class="form-check-label" for="canPrintFaithful"> Prevent
printing different formats </label>
class="form-check-label" for="canPrintFaithful" th:text="#{addPassword.selectText.13}"></label>
</div>
</div>
<br />
<div class="form-group text-center">
<button type="submit" class="btn btn-primary">Encrypt</button>
<button type="submit" class="btn btn-primary" th:text="#{addPassword.submit}"></button>
</div>
</form>