2023-08-25 00:23:25 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html th:lang="${#locale.toString()}" th:lang-direction="#{language.direction}" xmlns:th="http://www.thymeleaf.org">
|
|
|
|
|
|
|
|
<th:block th:insert="~{fragments/common :: head(title=#{autoRedact.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="#{autoRedact.header}"></h2>
|
2023-09-12 00:42:18 +02:00
|
|
|
<form action="api/v1/security/auto-redact" method="post" enctype="multipart/form-data">
|
2023-08-25 00:23:25 +02:00
|
|
|
<div class="mb-3">
|
|
|
|
<input type="file" class="form-control" id="fileInput" name="fileInput" required accept="application/pdf">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="mb-3">
|
2023-08-26 00:39:18 +02:00
|
|
|
<label for="listOfText" class="form-label" th:text="#{autoRedact.textsToRedactLabel}"></label>
|
|
|
|
<textarea class="form-control" id="listOfText" name="listOfText" rows="4" required th:placeholder="#{autoRedact.textsToRedactPlaceholder}"></textarea>
|
2023-08-25 00:23:25 +02:00
|
|
|
</div>
|
|
|
|
|
2023-08-30 23:52:38 +02:00
|
|
|
<div class="mb-3">
|
|
|
|
<label for="defaultColor" class="form-label" th:text="#{autoRedact.colorLabel}">Color</label>
|
|
|
|
<select class="form-control" id="defaultColor" name="defaultColor" onchange="handleColorChange(this.value)">
|
|
|
|
<option value="#000000" th:text="#{black}">Black</option>
|
|
|
|
<option value="#FFFFFF" th:text="#{white}">White</option>
|
|
|
|
<option value="#FF0000" th:text="#{red}">Red</option>
|
|
|
|
<option value="#00FF00" th:text="#{green}">Green</option>
|
|
|
|
<option value="#0000FF" th:text="#{blue}">Blue</option>
|
|
|
|
<option value="custom" th:text="#{custom}">Custom...</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Custom Color Input -->
|
|
|
|
<div class="mb-3" id="customColorContainer" style="display: none;">
|
|
|
|
<label for="customColor" class="form-label" th:text="#{autoRedact.colorLabel}">Custom Color</label>
|
|
|
|
<input type="text" class="form-control" id="customColor" name="redactColor" placeholder="#FF00FF">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
function handleColorChange(selectedValue) {
|
|
|
|
if (selectedValue === "custom") {
|
|
|
|
document.getElementById('customColorContainer').style.display = 'block';
|
|
|
|
} else {
|
|
|
|
document.getElementById('customColorContainer').style.display = 'none';
|
|
|
|
document.getElementById('customColor').value = selectedValue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-08-25 00:23:25 +02:00
|
|
|
<div class="mb-3 form-check">
|
|
|
|
<input type="checkbox" class="form-check-input" id="useRegex" name="useRegex">
|
2023-08-26 00:39:18 +02:00
|
|
|
<label class="form-check-label" for="useRegex" th:text="#{autoRedact.useRegexLabel}"></label>
|
2023-08-25 00:23:25 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="mb-3 form-check">
|
|
|
|
<input type="checkbox" class="form-check-input" id="wholeWordSearch" name="wholeWordSearch">
|
2023-08-26 00:39:18 +02:00
|
|
|
<label class="form-check-label" for="wholeWordSearch" th:text="#{autoRedact.wholeWordSearchLabel}"></label>
|
2023-08-25 00:23:25 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="mb-3">
|
2023-08-26 00:39:18 +02:00
|
|
|
<label for="customPadding" class="form-label" th:text="#{autoRedact.customPaddingLabel}"></label>
|
|
|
|
<input type="number" step="0.1" class="form-control" id="customPadding" name="customPadding" value="0.1">
|
2023-08-25 00:23:25 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="mb-3 form-check">
|
|
|
|
<input type="checkbox" class="form-check-input" id="convertPDFToImage" name="convertPDFToImage" checked>
|
2023-08-26 00:39:18 +02:00
|
|
|
<label class="form-check-label" for="convertPDFToImage" th:text="#{autoRedact.convertPDFToImageLabel}"></label>
|
2023-08-25 00:23:25 +02:00
|
|
|
</div>
|
|
|
|
|
2023-08-26 00:39:18 +02:00
|
|
|
<button type="submit" class="btn btn-primary" th:text="#{autoRedact.submitButton}"></button>
|
2023-08-25 00:23:25 +02:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div th:insert="~{fragments/footer.html :: footer}"></div>
|
|
|
|
</div>
|
|
|
|
</body>
|
2023-08-26 00:39:18 +02:00
|
|
|
</html>
|