Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove trailing spaces in default UIs #15791

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public void loginPageThenDefaultLoginPageIsRendered() throws Exception {
<div class="content">
<form class="login-form" method="post" action="/login">
<h2>Please sign in</h2>
\s

<p>
<label for="username" class="screenreader">Username</label>
<input type="text" id="username" name="username" placeholder="Username" required autofocus>
Expand Down Expand Up @@ -160,7 +160,7 @@ public void loginPageWhenErrorThenDefaultLoginPageWithError() throws Exception {
<div class="content">
<form class="login-form" method="post" action="/login">
<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>
Expand Down Expand Up @@ -219,7 +219,7 @@ public void loginPageWhenLoggedOutThenDefaultLoginPageWithLogoutMessage() throws
<div class="content">
<form class="login-form" method="post" action="/login">
<h2>Please sign in</h2>
<div class="alert alert-success" role="alert">You have been signed out</div>
<div class="alert alert-success" role="alert">You have been signed out</div>
<p>
<label for="username" class="screenreader">Username</label>
<input type="text" id="username" name="username" placeholder="Username" required autofocus>
Expand Down Expand Up @@ -286,7 +286,7 @@ public void loginPageWhenRememberConfigureThenDefaultLoginPageWithRememberMeChec
<div class="content">
<form class="login-form" method="post" action="/login">
<h2>Please sign in</h2>
\s

<p>
<label for="username" class="screenreader">Username</label>
<input type="text" id="username" name="username" placeholder="Username" required autofocus>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ void oneTimeTokenWhenFormLoginConfiguredThenRendersRequestTokenForm() throws Exc
<div class="content">
<form class="login-form" method="post" action="/login">
<h2>Please sign in</h2>
\s

<p>
<label for="username" class="screenreader">Username</label>
<input type="text" id="username" name="username" placeholder="Username" required autofocus>
Expand All @@ -165,12 +165,12 @@ void oneTimeTokenWhenFormLoginConfiguredThenRendersRequestTokenForm() throws Exc
</form>
<form id="ott-form" class="login-form" method="post" action="/ott/generate">
<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>
<input name="_csrf" type="hidden" value="%s" />
<input name="_csrf" type="hidden" value="%s" />
<button class="primary" type="submit" form="ott-form">Send Token</button>
</form>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void getLoginWhenAutoConfigThenShowsDefaultLoginPage() throws Exception {
<div class="content">
<form class="login-form" method="post" action="/login">
<h2>Please sign in</h2>
\s

<p>
<label for="username" class="screenreader">Username</label>
<input type="text" id="username" name="username" placeholder="Username" required autofocus>
Expand Down Expand Up @@ -115,7 +115,7 @@ public void getLoginWhenConfiguredWithCustomAttributesThenLoginPageReflects() th
<div class="content">
<form class="login-form" method="post" action="/signin">
<h2>Please sign in</h2>
\s

<p>
<label for="username" class="screenreader">Username</label>
<input type="text" id="username" name="custom_user" placeholder="Username" required autofocus>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ private boolean matches(HttpServletRequest request, String url) {
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>
Expand Down Expand Up @@ -450,12 +450,12 @@ private boolean matches(HttpServletRequest request, String url) {
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>
""";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,12 @@ public void generateWhenOneTimeTokenLoginThenOttForm() throws Exception {
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>
""");
Expand Down Expand Up @@ -244,7 +244,7 @@ void generatesThenRenders() throws ServletException, IOException {
<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>
Expand Down