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

fix for back button not sticking to just under the header #224

Closed
wants to merge 5 commits into from
Closed
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 @@ -8,9 +8,11 @@
await Html.RenderPartialAsync("Partials/BackButton", Model.BackButton);
}

<div class="govuk-grid-row">
<div class="govuk-grid-column-full govuk-grid-column-two-thirds-from-desktop">
<h1 id="accessibility-statement-heading" class="govuk-heading-xl">@Model.Heading</h1>
<div id="accessibility-statement-body" class="govuk-body">@Html.Raw(Model.BodyContent)</div>
<main class="govuk-main-wrapper pb-3" role="main">
<div class="govuk-grid-row">
<div class="govuk-grid-column-full govuk-grid-column-two-thirds-from-desktop">
<h1 id="accessibility-statement-heading" class="govuk-heading-xl">@Model.Heading</h1>
<div id="accessibility-statement-body" class="govuk-body">@Html.Raw(Model.BodyContent)</div>
</div>
</div>
</div>
</main>
12 changes: 7 additions & 5 deletions src/Dfe.EarlyYearsQualification.Web/Views/Advice/Advice.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
await Html.RenderPartialAsync("Partials/BackButton", Model.BackButton);
}

<div class="govuk-grid-row">
<div class="govuk-grid-column-full govuk-grid-column-two-thirds-from-desktop">
<h1 class="govuk-heading-xl" id="advice-page-heading">@Model.Heading</h1>
<div class="govuk-body" id="advice-page-body">@Html.Raw(Model.BodyContent)</div>
<main class="govuk-main-wrapper pb-3" role="main">
<div class="govuk-grid-row">
<div class="govuk-grid-column-full govuk-grid-column-two-thirds-from-desktop">
<h1 class="govuk-heading-xl" id="advice-page-heading">@Model.Heading</h1>
<div class="govuk-body" id="advice-page-body">@Html.Raw(Model.BodyContent)</div>
</div>
</div>
</div>
</main>
Original file line number Diff line number Diff line change
Expand Up @@ -8,87 +8,89 @@
await Html.RenderPartialAsync("Partials/BackButton", Model.BackButton);
}

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds-from-desktop">
@if (Model.HasErrors)
{
<div id="error-banner" class="govuk-error-summary" data-module="govuk-error-summary">
<div role="alert">
<h2 class="govuk-error-summary__title">
@Model.ErrorBannerHeading
</h2>
<div class="govuk-error-summary__body">
<ul class="govuk-list govuk-error-summary__list">
<li>
<a id="error-banner-link" href="#confirm-qualification-choice-error">@Model.ErrorBannerLink</a>
</li>
</ul>
<main class="govuk-main-wrapper pb-3" role="main">
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds-from-desktop">
@if (Model.HasErrors)
{
<div id="error-banner" class="govuk-error-summary" data-module="govuk-error-summary">
<div role="alert">
<h2 class="govuk-error-summary__title">
@Model.ErrorBannerHeading
</h2>
<div class="govuk-error-summary__body">
<ul class="govuk-list govuk-error-summary__list">
<li>
<a id="error-banner-link" href="#confirm-qualification-choice-error">@Model.ErrorBannerLink</a>
</li>
</ul>
</div>
</div>
</div>
</div>
}
<h1 id="heading" class="govuk-heading-xl">@Model.Heading</h1>
<dl class="govuk-summary-list">
<div id="qualification-name-row" class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">
@Model.QualificationLabel
</dt>
<dd class="govuk-summary-list__value">
@Model.QualificationName
</dd>
</div>
<div id="qualification-level-row" class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">
@Model.LevelLabel
</dt>
<dd class="govuk-summary-list__value">
@Model.QualificationLevel
</dd>
</div>
<div id="qualification-org-row" class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">
@Model.AwardingOrganisationLabel
</dt>
<dd class="govuk-summary-list__value">
@Model.QualificationAwardingOrganisation
</dd>
</div>
<div id="qualification-date-added-row" class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">
@Model.DateAddedLabel
</dt>
<dd class="govuk-summary-list__value">
@Model.QualificationDateAdded
</dd>
</div>
</dl>
<form id="confirm-qualification" asp-controller="ConfirmQualification" asp-action="Confirm" method="post">
<input type="hidden" name="qualificationId" value="@Model.QualificationId">
<div id="confirm-qualification-form-group" class="govuk-form-group @(Model.HasErrors ? "govuk-form-group--error" : "")">
<h4 id="radio-heading" class="govuk-heading-m">@Model.RadioHeading</h4>
<fieldset class="govuk-fieldset" role="group" aria-describedby="confirm-qualification-choice-error">
@if (Model.HasErrors)
{
<p id="confirm-qualification-choice-error" class="govuk-error-message">
<span class="govuk-visually-hidden">Error:</span> @Model.ErrorText
</p>
}
@foreach (var option in Model.Options)
{
<div class="govuk-radios__item">
@Html.RadioButtonFor(x => x.ConfirmQualificationAnswer, option.Value, new { @class = "govuk-radios__input", id = option.Value })
<label class="govuk-label govuk-radios__label" for="@option.Value">
@option.Label
</label>
</div>
}
</fieldset>
</div>
<div class="govuk-form-group">
<button id="confirm-qualification-button" class="govuk-button" data-module="govuk-button">
@Model.ButtonText
</button>
</div>
</form>
}
<h1 id="heading" class="govuk-heading-xl">@Model.Heading</h1>
<dl class="govuk-summary-list">
<div id="qualification-name-row" class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">
@Model.QualificationLabel
</dt>
<dd class="govuk-summary-list__value">
@Model.QualificationName
</dd>
</div>
<div id="qualification-level-row" class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">
@Model.LevelLabel
</dt>
<dd class="govuk-summary-list__value">
@Model.QualificationLevel
</dd>
</div>
<div id="qualification-org-row" class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">
@Model.AwardingOrganisationLabel
</dt>
<dd class="govuk-summary-list__value">
@Model.QualificationAwardingOrganisation
</dd>
</div>
<div id="qualification-date-added-row" class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">
@Model.DateAddedLabel
</dt>
<dd class="govuk-summary-list__value">
@Model.QualificationDateAdded
</dd>
</div>
</dl>
<form id="confirm-qualification" asp-controller="ConfirmQualification" asp-action="Confirm" method="post">
<input type="hidden" name="qualificationId" value="@Model.QualificationId">
<div id="confirm-qualification-form-group" class="govuk-form-group @(Model.HasErrors ? "govuk-form-group--error" : "")">
<h4 id="radio-heading" class="govuk-heading-m">@Model.RadioHeading</h4>
<fieldset class="govuk-fieldset" role="group" aria-describedby="confirm-qualification-choice-error">
@if (Model.HasErrors)
{
<p id="confirm-qualification-choice-error" class="govuk-error-message">
<span class="govuk-visually-hidden">Error:</span> @Model.ErrorText
</p>
}
@foreach (var option in Model.Options)
{
<div class="govuk-radios__item">
@Html.RadioButtonFor(x => x.ConfirmQualificationAnswer, option.Value, new { @class = "govuk-radios__input", id = option.Value })
<label class="govuk-label govuk-radios__label" for="@option.Value">
@option.Label
</label>
</div>
}
</fieldset>
</div>
<div class="govuk-form-group">
<button id="confirm-qualification-button" class="govuk-button" data-module="govuk-button">
@Model.ButtonText
</button>
</div>
</form>
</div>
</div>
</div>
</main>
Original file line number Diff line number Diff line change
Expand Up @@ -25,51 +25,53 @@
await Html.RenderPartialAsync("Partials/BackButton", Model.BackButton);
}

<div class="govuk-grid-row">
<div class="govuk-grid-column-full govuk-grid-column-two-thirds-from-desktop">
@{
var userPreferenceSet = TempData["UserPreferenceRecorded"] as bool? ?? false;
if (userPreferenceSet)
{
<div id="cookies-set-banner" class="govuk-notification-banner govuk-notification-banner--success" role="alert" aria-labelledby="govuk-notification-banner-title" data-module="govuk-notification-banner">
<div class="govuk-notification-banner__header">
<h2 id="cookies-set-banner-heading" class="govuk-notification-banner__title" id="govuk-notification-banner-title">
@Model.SuccessBannerHeading
</h2>
</div>
<div class="govuk-notification-banner__content">
<p id="cookies-set-banner-content" class="govuk-notification-banner__heading">
@Html.Raw(Model.SuccessBannerContent)
</p>
<main class="govuk-main-wrapper pb-3" role="main">
<div class="govuk-grid-row">
<div class="govuk-grid-column-full govuk-grid-column-two-thirds-from-desktop">
@{
var userPreferenceSet = TempData["UserPreferenceRecorded"] as bool? ?? false;
if (userPreferenceSet)
{
<div id="cookies-set-banner" class="govuk-notification-banner govuk-notification-banner--success" role="alert" aria-labelledby="govuk-notification-banner-title" data-module="govuk-notification-banner">
<div class="govuk-notification-banner__header">
<h2 id="cookies-set-banner-heading" class="govuk-notification-banner__title" id="govuk-notification-banner-title">
@Model.SuccessBannerHeading
</h2>
</div>
<div class="govuk-notification-banner__content">
<p id="cookies-set-banner-content" class="govuk-notification-banner__heading">
@Html.Raw(Model.SuccessBannerContent)
</p>
</div>
</div>
</div>
}
}
}

<h2 id="cookies-heading" class="govuk-heading-xl">@Model.Heading</h2>
<div id="cookies-body">@Html.Raw(Model.BodyContent)</div>
<form id="cookies-form" asp-controller="CookiesPreference" asp-action="CookiePreference" method="post">
<div id="cookies-form-group" class="govuk-form-group">
<fieldset class="govuk-fieldset" role="group" aria-describedby="cookies-choice-error">
<p id="cookies-choice-error" class="govuk-error-message" hidden>
<span class="govuk-visually-hidden">Error:</span> @Model.ErrorText
</p>
@foreach (var option in Model.Options)
{
<div class="govuk-radios__item">
@Html.RadioButtonFor(x => x.CookiesAnswer, option.Value, new { @class = "govuk-radios__input", id = option.Value })
<label class="govuk-label govuk-radios__label" for="@option.Value">
@option.Label
</label>
</div>
}
</fieldset>
</div>
<div class="govuk-form-group">
<button id="cookies-button" class="govuk-button" data-module="govuk-button">
@Model.ButtonText
</button>
</div>
</form>
<h2 id="cookies-heading" class="govuk-heading-xl">@Model.Heading</h2>
<div id="cookies-body">@Html.Raw(Model.BodyContent)</div>
<form id="cookies-form" asp-controller="CookiesPreference" asp-action="CookiePreference" method="post">
<div id="cookies-form-group" class="govuk-form-group">
<fieldset class="govuk-fieldset" role="group" aria-describedby="cookies-choice-error">
<p id="cookies-choice-error" class="govuk-error-message" hidden>
<span class="govuk-visually-hidden">Error:</span> @Model.ErrorText
</p>
@foreach (var option in Model.Options)
{
<div class="govuk-radios__item">
@Html.RadioButtonFor(x => x.CookiesAnswer, option.Value, new { @class = "govuk-radios__input", id = option.Value })
<label class="govuk-label govuk-radios__label" for="@option.Value">
@option.Label
</label>
</div>
}
</fieldset>
</div>
<div class="govuk-form-group">
<button id="cookies-button" class="govuk-button" data-module="govuk-button">
@Model.ButtonText
</button>
</div>
</form>
</div>
</div>
</div>
</main>
47 changes: 24 additions & 23 deletions src/Dfe.EarlyYearsQualification.Web/Views/Home/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,28 @@
@{
ViewData["Title"] = "Start";
}

<div class="govuk-grid-row">
<div class="govuk-grid-column-full govuk-grid-column-two-thirds-from-desktop">
<h1 class="govuk-heading-xl">@Model.Header</h1>
<div id="pre-cta-content" class="govuk-body">@Html.Raw(Model.PreCtaButtonContent)</div>
<a href="@Url.Action("WhereWasTheQualificationAwarded", "Questions")" role="button" draggable="false" class="govuk-button govuk-button--start" data-module="govuk-button">
@Model.CtaButtonText
<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"/>
</svg>
</a>
<div id="post-cta-content" class="govuk-body">@Html.Raw(Model.PostCtaButtonContent)</div>
</div>
<div class="govuk-grid-column-full govuk-grid-column-one-third-from-desktop">
<aside role="complementary">
<h2 id="right-hand-content-header" class="govuk-heading-m" id="subsection-title">
@Model.RightHandSideContentHeader
</h2>
<nav id="right-hand-content" role="navigation" aria-labelledby="subsection-title">
@Html.Raw(Model.RightHandSideContent)
</nav>
</aside>
<main class="govuk-main-wrapper pb-3" role="main">
<div class="govuk-grid-row">
<div class="govuk-grid-column-full govuk-grid-column-two-thirds-from-desktop">
<h1 class="govuk-heading-xl">@Model.Header</h1>
<div id="pre-cta-content" class="govuk-body">@Html.Raw(Model.PreCtaButtonContent)</div>
<a href="@Url.Action("WhereWasTheQualificationAwarded", "Questions")" role="button" draggable="false" class="govuk-button govuk-button--start" data-module="govuk-button">
@Model.CtaButtonText
<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"/>
</svg>
</a>
<div id="post-cta-content" class="govuk-body">@Html.Raw(Model.PostCtaButtonContent)</div>
</div>
<div class="govuk-grid-column-full govuk-grid-column-one-third-from-desktop">
<aside role="complementary">
<h2 id="right-hand-content-header" class="govuk-heading-m" id="subsection-title">
@Model.RightHandSideContentHeader
</h2>
<nav id="right-hand-content" role="navigation" aria-labelledby="subsection-title">
@Html.Raw(Model.RightHandSideContent)
</nav>
</aside>
</div>
</div>
</div>
</main>
Loading
Loading