Remove trailing spaces in default UIs
- Default UIs had blank lines with only spaces. These get deleted by the spring-javaformat plugin. In order to avoid this behavior, an extra \s had been inserted in the tests. The reason for those \s is not obvious. - This commit cleans up the \s but changing the HTML templates.
This commit is contained in:
committed by
Rob Winch
parent
85693b2806
commit
7e41785dfc
@@ -407,7 +407,7 @@ public class DefaultLoginPageGeneratingFilter extends GenericFilterBean {
|
||||
private static final String LOGIN_FORM_TEMPLATE = """
|
||||
<form class="login-form" method="post" action="{{loginUrl}}">
|
||||
<h2>Please sign in</h2>
|
||||
{{errorMessage}}{{logoutMessage}}
|
||||
{{errorMessage}}{{logoutMessage}}
|
||||
<p>
|
||||
<label for="username" class="screenreader">Username</label>
|
||||
<input type="text" id="username" name="{{usernameParameter}}" placeholder="Username" required autofocus>
|
||||
@@ -450,12 +450,12 @@ public class DefaultLoginPageGeneratingFilter extends GenericFilterBean {
|
||||
private static final String ONE_TIME_TEMPLATE = """
|
||||
<form id="ott-form" class="login-form" method="post" action="{{generateOneTimeTokenUrl}}">
|
||||
<h2>Request a One-Time Token</h2>
|
||||
{{errorMessage}}{{logoutMessage}}
|
||||
{{errorMessage}}{{logoutMessage}}
|
||||
<p>
|
||||
<label for="ott-username" class="screenreader">Username</label>
|
||||
<input type="text" id="ott-username" name="username" placeholder="Username" required>
|
||||
</p>
|
||||
{{hiddenInputs}}
|
||||
{{hiddenInputs}}
|
||||
<button class="primary" type="submit" form="ott-form">Send Token</button>
|
||||
</form>
|
||||
""";
|
||||
|
||||
@@ -199,12 +199,12 @@ public class DefaultLoginPageGeneratingFilterTests {
|
||||
assertThat(response.getContentAsString()).contains("""
|
||||
<form id="ott-form" class="login-form" method="post" action="/ott/authenticate">
|
||||
<h2>Request a One-Time Token</h2>
|
||||
\s
|
||||
|
||||
<p>
|
||||
<label for="ott-username" class="screenreader">Username</label>
|
||||
<input type="text" id="ott-username" name="username" placeholder="Username" required>
|
||||
</p>
|
||||
\s
|
||||
|
||||
<button class="primary" type="submit" form="ott-form">Send Token</button>
|
||||
</form>
|
||||
""");
|
||||
@@ -244,7 +244,7 @@ public class DefaultLoginPageGeneratingFilterTests {
|
||||
<div class="content">
|
||||
<form class="login-form" method="post" action="null">
|
||||
<h2>Please sign in</h2>
|
||||
<div class="alert alert-danger" role="alert">Bad credentials</div>
|
||||
<div class="alert alert-danger" role="alert">Bad credentials</div>
|
||||
<p>
|
||||
<label for="username" class="screenreader">Username</label>
|
||||
<input type="text" id="username" name="username" placeholder="Username" required autofocus>
|
||||
|
||||
Reference in New Issue
Block a user