Fixed copying mechanism

This commit is contained in:
2020-12-06 23:31:44 +01:00
parent 75ccf7d28e
commit 32894e5469
2 changed files with 67 additions and 22 deletions

View File

@@ -46,3 +46,48 @@
2020-12-06 01:12:38,348 INFO [SpringContextShutdownHook] Closing JPA EntityManagerFactory for persistence unit 'default' 2020-12-06 01:12:38,348 INFO [SpringContextShutdownHook] Closing JPA EntityManagerFactory for persistence unit 'default'
2020-12-06 01:12:38,351 INFO [SpringContextShutdownHook] HikariPool-1 - Shutdown initiated... 2020-12-06 01:12:38,351 INFO [SpringContextShutdownHook] HikariPool-1 - Shutdown initiated...
2020-12-06 01:12:38,359 INFO [SpringContextShutdownHook] HikariPool-1 - Shutdown completed. 2020-12-06 01:12:38,359 INFO [SpringContextShutdownHook] HikariPool-1 - Shutdown completed.
2020-12-06 12:41:18,879 INFO [restartedMain] Starting AbizeitungVotingSystemApplication on bitecoding-System-Product-Name with PID 6506 (/home/bitecoding/Code/GitHub/AbizeitungVotingSystem/target/classes started by bitecoding in /home/bitecoding/Code/GitHub/AbizeitungVotingSystem)
2020-12-06 12:41:18,882 INFO [restartedMain] No active profile set, falling back to default profiles: default
2020-12-06 12:41:18,956 INFO [restartedMain] Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2020-12-06 12:41:18,957 INFO [restartedMain] For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2020-12-06 12:41:19,457 INFO [restartedMain] Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2020-12-06 12:41:19,509 INFO [restartedMain] Finished Spring Data repository scanning in 44ms. Found 5 JPA repository interfaces.
2020-12-06 12:41:20,285 INFO [restartedMain] Tomcat initialized with port(s): 8000 (http)
2020-12-06 12:41:20,294 INFO [restartedMain] Initializing ProtocolHandler ["http-nio-8000"]
2020-12-06 12:41:20,295 INFO [restartedMain] Starting service [Tomcat]
2020-12-06 12:41:20,296 INFO [restartedMain] Starting Servlet engine: [Apache Tomcat/9.0.38]
2020-12-06 12:41:20,367 INFO [restartedMain] Initializing Spring embedded WebApplicationContext
2020-12-06 12:41:20,368 INFO [restartedMain] Root WebApplicationContext: initialization completed in 1410 ms
2020-12-06 12:41:20,565 INFO [restartedMain] HHH000204: Processing PersistenceUnitInfo [name: default]
2020-12-06 12:41:20,612 INFO [restartedMain] HHH000412: Hibernate ORM core version 5.4.21.Final
2020-12-06 12:41:20,733 INFO [restartedMain] HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
2020-12-06 12:41:20,818 INFO [restartedMain] HikariPool-1 - Starting...
2020-12-06 12:41:21,256 INFO [restartedMain] HikariPool-1 - Start completed.
2020-12-06 12:41:21,287 INFO [restartedMain] HHH000400: Using dialect: org.hibernate.dialect.MySQL8Dialect
2020-12-06 12:41:21,935 INFO [restartedMain] HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2020-12-06 12:41:21,941 INFO [restartedMain] Initialized JPA EntityManagerFactory for persistence unit 'default'
2020-12-06 12:41:21,961 INFO [restartedMain] LiveReload server is running on port 35729
2020-12-06 12:41:22,499 WARN [restartedMain] spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2020-12-06 12:41:22,613 INFO [restartedMain] Initializing ExecutorService 'applicationTaskExecutor'
2020-12-06 12:41:22,788 INFO [restartedMain] Starting ProtocolHandler ["http-nio-8000"]
2020-12-06 12:41:22,815 INFO [restartedMain] Tomcat started on port(s): 8000 (http) with context path ''
2020-12-06 12:41:22,826 INFO [restartedMain] Started AbizeitungVotingSystemApplication in 4.283 seconds (JVM running for 4.905)
2020-12-06 12:48:39,824 INFO [http-nio-8000-exec-1] Initializing Spring DispatcherServlet 'dispatcherServlet'
2020-12-06 12:48:39,824 INFO [http-nio-8000-exec-1] Initializing Servlet 'dispatcherServlet'
2020-12-06 12:48:39,833 INFO [http-nio-8000-exec-1] Completed initialization in 8 ms
2020-12-06 12:48:51,666 WARN [http-nio-8000-exec-3] simon.bussmann@adolfinum.de
2020-12-06 12:51:08,705 WARN [http-nio-8000-exec-8] simon.bussmann@adolfinum.de
2020-12-06 12:56:51,960 WARN [http-nio-8000-exec-8] simon.bussmann@adolfinum.de
2020-12-06 12:57:36,888 WARN [http-nio-8000-exec-2] simon.bussmann@adolfinum.de
2020-12-06 12:59:15,922 WARN [http-nio-8000-exec-7] simon.bussmann@adolfinum.de
2020-12-06 13:00:22,511 WARN [http-nio-8000-exec-2] simon.bussmann@adolfinum.de
2020-12-06 13:01:29,021 WARN [http-nio-8000-exec-7] simon.bussmann@adolfinum.de
2020-12-06 13:01:43,211 WARN [http-nio-8000-exec-1] matched
2020-12-06 13:01:49,446 WARN [http-nio-8000-exec-5] simon.bussmann@adolfinum.de
2020-12-06 13:02:22,101 WARN [http-nio-8000-exec-9] matched
2020-12-06 16:12:57,054 WARN [http-nio-8000-exec-5] simon.bussmann@adolfinum.de
2020-12-06 16:13:09,363 WARN [http-nio-8000-exec-7] matched
2020-12-06 16:15:48,842 INFO [SpringContextShutdownHook] Shutting down ExecutorService 'applicationTaskExecutor'
2020-12-06 16:15:48,844 INFO [SpringContextShutdownHook] Closing JPA EntityManagerFactory for persistence unit 'default'
2020-12-06 16:15:48,847 INFO [SpringContextShutdownHook] HikariPool-1 - Shutdown initiated...
2020-12-06 16:15:48,853 INFO [SpringContextShutdownHook] HikariPool-1 - Shutdown completed.

View File

@@ -10,12 +10,33 @@
<body class="center-screen"> <body class="center-screen">
<h1 th:text="|Dir wurde ein Code an ${name} gesendet!|"></h1>
<h2>Bitte gebe den Authentifizierungscode ein</h2>
<form action="#" id="passForm" th:action="@{/vote}" method="post">
<input id="voterName" type="hidden" name="name" th:value="${name}" />
<input id="authCode" type="hidden" name="code" value="" />
<input type="text" placeholder="•" class="passInput" name="pass[]" maxlength="1" autocomplete="off" required pattern="\d{1}" autofocus>
<input type="text" placeholder="•" class="passInput" name="pass[]" maxlength="1" autocomplete="off" required pattern="\d{1}">
<input type="text" placeholder="•" class="passInput" name="pass[]" maxlength="1" autocomplete="off" required pattern="\d{1}">
<input type="text" placeholder="•" class="passInput" name="pass[]" maxlength="1" autocomplete="off" required pattern="\d{1}">
<input type="text" placeholder="•" class="passInput" name="pass[]" maxlength="1" autocomplete="off" required pattern="\d{1}">
<input type="text" placeholder="•" class="passInput" name="pass[]" maxlength="1" autocomplete="off" required pattern="\d{1}">
</form>
<button class="submitButton" id="signup_button" onclick="getCode()">Abstimmen</button>
<div th:if="${codeExpired}">
<h2 class="errorCode">Der Code ist nicht mehr gültig!<br>Fordere einen neuen an</h2>
</div>
<div th:if="${codeFalse}">
<h2 class="errorCode">Der eingegebene Code ist falsch</h2>
</div>
<script> <script>
const $inp = $(".passInput"); const $inp = $(".passInput");
$inp.on({ $inp.on({
paste(ev) { // Handle Pasting paste(ev) { // Handle Pasting
const clip = ev.originalEvent.clipboardData.getData('text').trim(); const clip = ev.originalEvent.clipboardData.getData('text').trim();
// Allow numbers only // Allow numbers only
if (!/\d{6}/.test(clip)) return ev.preventDefault(); // Invalid. Exit here if (!/\d{6}/.test(clip)) return ev.preventDefault(); // Invalid. Exit here
@@ -50,27 +71,6 @@
} }
</script> </script>
<h1 th:text="|Dir wurde ein Code an ${name} gesendet!|"></h1>
<h2>Bitte gebe den Authentifizierungscode ein</h2>
<form action="#" id="passForm" th:action="@{/vote}" method="post">
<input id="voterName" type="hidden" name="name" th:value="${name}" />
<input id="authCode" type="hidden" name="code" value="" />
<input type="text" placeholder="•" class="passInput" name="pass[]" maxlength="1" autocomplete="off" required pattern="\d{1}" autofocus>
<input type="text" placeholder="•" class="passInput" name="pass[]" maxlength="1" autocomplete="off" required pattern="\d{1}">
<input type="text" placeholder="•" class="passInput" name="pass[]" maxlength="1" autocomplete="off" required pattern="\d{1}">
<input type="text" placeholder="•" class="passInput" name="pass[]" maxlength="1" autocomplete="off" required pattern="\d{1}">
<input type="text" placeholder="•" class="passInput" name="pass[]" maxlength="1" autocomplete="off" required pattern="\d{1}">
<input type="text" placeholder="•" class="passInput" name="pass[]" maxlength="1" autocomplete="off" required pattern="\d{1}">
</form>
<button class="submitButton" id="signup_button" onclick="getCode()">Abstimmen</button>
<div th:if="${codeExpired}">
<h2 class="errorCode">Der Code ist nicht mehr gültig!<br>Fordere einen neuen an</h2>
</div>
<div th:if="${codeFalse}">
<h2 class="errorCode">Der eingegebene Code ist falsch</h2>
</div>
</body> </body>