added checkbox and corrected fall back for the other labels
This commit is contained in:
parent
2b2e267594
commit
e57c9d05b6
@ -131,6 +131,7 @@ public class MvcConfiguration extends WebMvcConfigurerAdapter {
|
|||||||
PluginMessages pluginMessages = new PluginMessages(messages, language);
|
PluginMessages pluginMessages = new PluginMessages(messages, language);
|
||||||
pluginMessages.setDefaultEncoding("UTF-8");
|
pluginMessages.setDefaultEncoding("UTF-8");
|
||||||
pluginMessages.setBasenames("i18n/WebGoatLabels");
|
pluginMessages.setBasenames("i18n/WebGoatLabels");
|
||||||
|
pluginMessages.setFallbackToSystemLocale(false);
|
||||||
return pluginMessages;
|
return pluginMessages;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,8 @@
|
|||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td><label>Password</label></td>
|
<td><label>Password</label></td>
|
||||||
<td><input name="password" value="" type="password" placeholder="Enter a secure password"/></td>
|
<td><input id="myInput" name="password" value="" type="password" placeholder="Enter a secure password"/></td>
|
||||||
|
<td><input type="checkbox" onclick="javascript:myFunction()"/>Show password</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><button type="SUBMIT">Submit</button></td>
|
<td><button type="SUBMIT">Submit</button></td>
|
||||||
@ -46,4 +47,16 @@
|
|||||||
<div class="adoc-content" th:replace="doc:SecurePasswords_4.adoc"></div>
|
<div class="adoc-content" th:replace="doc:SecurePasswords_4.adoc"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function myFunction() {
|
||||||
|
var x = document.getElementById("myInput");
|
||||||
|
if (x.type === "password") {
|
||||||
|
x.type = "text";
|
||||||
|
} else {
|
||||||
|
x.type = "password";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
</html>
|
</html>
|
@ -1,3 +1,4 @@
|
|||||||
secure-passwords.title=Secure Passwords
|
secure-passwords.title=Secure Passwords
|
||||||
securepassword-success=You have succeded! The password is secure enough.
|
securepassword-success=You have succeeded! The password is secure enough.
|
||||||
securepassword-failed=You have failed! Try to enter a secure password.
|
securepassword-failed=You have failed! Try to enter a secure password.
|
||||||
|
show-password=Show Password
|
@ -0,0 +1,4 @@
|
|||||||
|
secure-passwords.title=Veilige wachtwoorden
|
||||||
|
securepassword-success=Het is gelukt. Het wachtwoord is sterk genoeg.
|
||||||
|
securepassword-failed=Helaas, probeer een sterker wachtwoord!
|
||||||
|
show-password=Toon wachtwoord
|
Loading…
x
Reference in New Issue
Block a user