<div th:remove="tag" th:fragment="form">
    <script src="/webjars/jsencrypt/3.3.2/bin/jsencrypt.min.js" defer></script>
    <script th:inline="javascript" type="text/javascript">
        const publicKey = /*[[${publicKey}]]*/ "";

        // Encrypt function
        function encryptPassword(password) {
            const encrypt = new JSEncrypt();
            encrypt.setPublicKey(publicKey);
            return encrypt.encrypt(password);
        }

        document.addEventListener("DOMContentLoaded", functi