-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sign in page consistent with prototype
There's an issue with using arbitrary action urls and govuk_button_to or button_to when passing a block: url_for is called to generate the form action. It seems passing an aribtrary path and a block is not possible. Hence the form plain HTML to render the Sign in button with an SVG inside it.
- Loading branch information
Showing
2 changed files
with
27 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,26 @@ | ||
<% if DfESignIn.bypass? %> | ||
<%= | ||
govuk_button_to( | ||
"Sign in with DSI bypass", | ||
"/auth/developer", | ||
method: :post | ||
) | ||
%> | ||
<% else %> | ||
<%= | ||
govuk_button_to( | ||
"Sign in with DSI", | ||
"/auth/dfe", | ||
method: :post | ||
) | ||
%> | ||
<% end %> | ||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<h1 class="govuk-heading-l">Sign in</h1> | ||
|
||
<p class="govuk-body"> | ||
You can use this service if you’re: | ||
</p> | ||
<ul class="govuk-list govuk-list--bullet"> | ||
<li> | ||
waiting for the result of a DBS check for a new employee | ||
</li> | ||
<li> | ||
checking the status of an employee who worked in a school or college less than 3 months ago | ||
</li> | ||
</ul> | ||
|
||
<%= form_with url: (DfESignIn.bypass? ? "/auth/developer" : "/auth/dfe") do |f| %> | ||
<button type="submit" class="govuk-button govuk-button--start"> | ||
<%= DfESignIn.bypass? ? "Sign in with DSI bypass" : "Sign in" %> | ||
<svg class="govuk-button__start-icon" xmlns="http://www.w3.org/2000/svg" width="17.5" height="19" viewBox="0 0 33 40" aria-hidden="true" focusable="false"> | ||
<path fill="currentColor" d="M0 0h13l20 20-20 20H0l20-20z"></path> | ||
</svg> | ||
</button> | ||
<% end %> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters