Skip to content

Commit

Permalink
Merge pull request #433 from hmrc/DL-13828-2
Browse files Browse the repository at this point in the history
DL-13828-2: upgraded play-frontend-hmrc to 10.1.0
  • Loading branch information
paulanderson1234 authored Jun 18, 2024
2 parents 27aa9e7 + 6a734f9 commit be68652
Show file tree
Hide file tree
Showing 20 changed files with 26 additions and 67 deletions.
2 changes: 1 addition & 1 deletion app/views/editLiability/bankDetails.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ <h1 class="govuk-heading-xl govuk-!-margin-bottom-3">

@govukButton(Button(
content = Text(messages("ated.save-and-continue")),
attributes = Map("type" -> "submit", "id" -> "submit")
attributes = Map("id" -> "submit")
))
}

Expand Down
12 changes: 2 additions & 10 deletions app/views/editLiability/dataOfDisposal.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@
request: Request[AnyContent],
appConfig: ApplicationConfig)

@dateItems = @{
Seq(InputItem(attributes = Map("maxLength" -> "2")),
InputItem(attributes = Map("maxLength" -> "2")),
InputItem(attributes = Map("maxLength" -> "4"))
)
}

@backLinkHtml = {
@if(backLink.isDefined) {
@govukBackLink(BackLink(
Expand All @@ -67,16 +60,15 @@
hint = Some(Hint(
content = Text(messages("ated.date.hint"))
)),
items = dateItems
).withFormField(disposeLiabilityForm("dateOfDisposal"))
).withDayMonthYearFormField(disposeLiabilityForm("dateOfDisposal"))
.withHeadingAndSectionCaption(
heading = Text(messages("ated.dispose-property.disposal-date.header")),
sectionCaption = Text(messages("ated.property-details.pre-header-dispose"))
))

@govukButton(Button(
content = Text(messages("ated.save-and-continue")),
attributes = Map("type" -> "submit", "id" -> "submit")
attributes = Map("id" -> "submit")
))
<input type="hidden" name="periodKey" id="id" value=@disposeLiabilityForm("periodKey").value>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ <h1 class="govuk-heading-xl govuk-!-margin-bottom-3">

@govukButton(Button(
content = Text(messages("ated.save-and-continue")),
attributes = Map("type" -> "submit", "id" -> "submit")
attributes = Map("id" -> "submit")
))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ <h1 class="govuk-heading-xl govuk-!-margin-bottom-5">
@formHelper(action = controllers.editLiability.routes.DisposeLiabilityDeclarationController.submit(oldFormBundleNum)) {
@govukButton(Button(
content = Text(messages("ated.edit-liability.declaration.submit.amend")),
attributes = Map("type" -> "submit", "id" -> "submit")
attributes = Map("id" -> "submit")
))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

@govukButton(Button(
content = Text(messages("ated.save-and-continue")),
attributes = Map("type" -> "submit", "id" -> "submit")
attributes = Map("id" -> "submit")
))
}

Expand Down
2 changes: 1 addition & 1 deletion app/views/editLiability/disposeLiabilitySummary.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ <h2 id="return-status-header" class="govuk-heading-m govuk-!-padding-bottom-4">@
@formHelper(action = controllers.editLiability.routes.DisposeLiabilitySummaryController.submit(disposeLiability.id.toString)) {
@govukButton(Button(
content = Text(messages("ated.confirm-and-continue")),
attributes = Map("type" -> "submit", "id" -> "submit")
attributes = Map("id" -> "submit")
))
}
}
Expand Down
4 changes: 2 additions & 2 deletions app/views/editLiability/editLiability.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

@govukButton(Button(
content = Text(messages("ated.save-and-continue")),
attributes = Map("type" -> "submit", "id" -> "submit")
attributes = Map("id" -> "submit")
))
} else {

Expand All @@ -102,7 +102,7 @@ <h1 class="govuk-heading-xl govuk-!-margin-bottom-5">

@govukButton(Button(
content = Text(messages("ated.edit-liability.return-type.no-edit-legend4")),
attributes = Map("type" -> "submit", "id" -> "reportDisposeLink")
attributes = Map("id" -> "reportDisposeLink")
))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ <h1 class="govuk-heading-xl govuk-!-margin-bottom-5">

@govukButton(Button(
content = Text(messages("ated.save-and-continue")),
attributes = Map("type" -> "submit", "id" -> "submit")
attributes = Map("id" -> "submit")
))

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ <h1 class="govuk-heading-xl govuk-!-margin-bottom-5">
@formHelper(action = controllers.editLiability.routes.EditLiabilityDeclarationController.submit(oldFormBundleNum)) {
@govukButton(Button(
content = Text(messages(printSubmitMsg(returnType))),
attributes = Map("type" -> "submit", "id" -> "submit")
attributes = Map("id" -> "submit")
))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ <h1 class="govuk-heading-xl govuk-!-margin-bottom-5">

@govukButton(Button(
content = Text(messages("ated.save-and-continue")),
attributes = Map("type" -> "submit", "id" -> "submit")
attributes = Map("id" -> "submit")
))
}

Expand Down
2 changes: 1 addition & 1 deletion app/views/editLiability/editLiabilitySummary.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ <h2 id="return-status-header" class="govuk-heading-m govuk-!-padding-bottom-4">@

@govukButton(Button(
content = Text(messages("ated.continue")),
attributes = Map("type" -> "submit", "id" -> "submit")
attributes = Map("id" -> "submit")
))

}
Expand Down
2 changes: 1 addition & 1 deletion app/views/editLiability/hasBankDetails.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ <h1 class="govuk-heading-xl govuk-!-margin-bottom-5">

@govukButton(Button(
content = Text(messages("ated.save-and-continue")),
attributes = Map("type" -> "submit", "id" -> "submit")
attributes = Map("id" -> "submit")
))
}
}
10 changes: 1 addition & 9 deletions app/views/propertyDetails/dateCouncilRegistered.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@

@(id: String, periodKey: Int, propertyDetailsForm: Form[DateCouncilRegistered], mode: Option[String], serviceInfoContent: Html = HtmlFormat.empty, backLink: Option[String])(implicit authContext: StandardAuthRetrievals, messages: Messages, request: Request[AnyContent], appConfig: ApplicationConfig)

@dateItems = @{
Seq(InputItem(attributes = Map("maxLength" -> "2")),
InputItem(attributes = Map("maxLength" -> "2")),
InputItem(attributes = Map("maxLength" -> "4"))
)
}

@backLinkHtml = {
@if(backLink.isDefined) {
@govukBackLink(BackLink(
Expand Down Expand Up @@ -84,8 +77,7 @@ <h1 class="govuk-heading-xl govuk-!-margin-bottom-5">
classes = "govuk-visually-hidden"
))
)),
items = dateItems
).withFormField(propertyDetailsForm("dateCouncilRegistered")))
).withDayMonthYearFormField(propertyDetailsForm("dateCouncilRegistered")))

@govukButton(Button(
content = Text(messages("ated.save-and-continue")),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ <h1 class="govuk-heading-xl govuk-!-margin-bottom-5">
@formHelper(action = controllers.propertyDetails.routes.DateCouncilRegisteredKnownController.save(id, mode)) {

@govukRadios(Radios(
classes = "govuk-radios--inline",
fieldset = Some(Fieldset(
legend = Some(Legend(
content = Text(messages("ated.property-details.council-registered-known.header")),
Expand All @@ -79,7 +78,8 @@ <h1 class="govuk-heading-xl govuk-!-margin-bottom-5">
value = Some("true")),
RadioItem(
content = Text(messages("ated.property-details-value.no")),
value = Some("false")))
value = Some("false"))),
classes = "govuk-radios--inline"
).withFormField(dateCouncilRegisteredKnownForm("isDateCouncilRegisteredKnown"))
)

Expand Down
10 changes: 1 addition & 9 deletions app/views/propertyDetails/dateFirstOccupied.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@

@(id: String, periodKey: Int, propertyDetailsForm: Form[DateFirstOccupied], mode: Option[String], serviceInfoContent: Html = HtmlFormat.empty, backLink: Option[String])(implicit authContext: StandardAuthRetrievals, messages: Messages, request: Request[AnyContent], appConfig: ApplicationConfig)

@dateItems = @{
Seq(InputItem(attributes = Map("maxLength" -> "2")),
InputItem(attributes = Map("maxLength" -> "2")),
InputItem(attributes = Map("maxLength" -> "4"))
)
}

@backLinkHtml = {
@if(backLink.isDefined) {
@govukBackLink(BackLink(
Expand Down Expand Up @@ -84,8 +77,7 @@ <h1 class="govuk-heading-xl govuk-!-margin-bottom-5">
classes = "govuk-visually-hidden"
))
)),
items = dateItems
).withFormField(propertyDetailsForm("dateFirstOccupied")))
).withDayMonthYearFormField(propertyDetailsForm("dateFirstOccupied")))

@govukButton(Button(
content = Text(messages("ated.save-and-continue")),
Expand Down
4 changes: 2 additions & 2 deletions app/views/propertyDetails/dateFirstOccupiedKnown.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ <h1 class="govuk-heading-xl govuk-!-margin-bottom-5">
@formHelper(action = controllers.propertyDetails.routes.DateFirstOccupiedKnownController.save(id, mode)) {

@govukRadios(Radios(
classes = "govuk-radios--inline",
fieldset = Some(Fieldset(
legend = Some(Legend(
content = Text(messages("ated.property-details.first-occupied-known.header")),
Expand All @@ -79,7 +78,8 @@ <h1 class="govuk-heading-xl govuk-!-margin-bottom-5">
value = Some("true")),
RadioItem(
content = Text(messages("ated.property-details-value.no")),
value = Some("false")))
value = Some("false"))),
classes = "govuk-radios--inline"
).withFormField(dateFirstOccupiedKnownForm("isDateFirstOccupiedKnown"))
)

Expand Down
13 changes: 2 additions & 11 deletions app/views/propertyDetails/propertyDetailsRevalued.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,17 @@
}
}

@dateItems = @{
Seq(InputItem(attributes = Map("maxLength" -> "2")),
InputItem(attributes = Map("maxLength" -> "2")),
InputItem(attributes = Map("maxLength" -> "4"))
)
}

@conditionalYes = {
@govukDateInput(DateInput(
hint = Some(Hint(
content = Text(messages("ated.property-details-value.partAcqDispDate.hint", PeriodUtils.periodEndDate(periodKey).toString(messages("ated.date-format.numeric"))))
)),
items = dateItems,
fieldset = Some(Fieldset(
legend = Some(Legend(
content = Text(messages("ated.property-details-value.partAcqDispDate"))
))
))
).withFormField(propertyDetailsForm("partAcqDispDate")))
).withDayMonthYearFormField(propertyDetailsForm("partAcqDispDate")))

@govukInput(Input(
classes = "govuk-input--width-10",
Expand All @@ -83,13 +75,12 @@
hint = Some(Hint(
content = Text(messages("ated.property-details-value.revaluedDate.hint", PeriodUtils.periodEndDate(periodKey).toString(messages("ated.date-format.numeric"))))
)),
items = dateItems,
fieldset = Some(Fieldset(
legend = Some(Legend(
content = Text(messages("ated.property-details-value.revaluedDate"))
))
))
).withFormField(propertyDetailsForm("revaluedDate")))
).withDayMonthYearFormField(propertyDetailsForm("revaluedDate")))

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,6 @@
}
}

@dateItems = @{
Seq(InputItem(attributes = Map("maxLength" -> "2")),
InputItem(attributes = Map("maxLength" -> "2")),
InputItem(attributes = Map("maxLength" -> "4"))
)
}

@newMain(title = titleBuilder(messages("ated.property-details-value.whenAcquired.title"), Some(propertyDetailsForm)),
serviceInfoContent = serviceInfoContent) {

Expand All @@ -63,8 +56,7 @@
hint = Some(Hint(
content = Text(messages("ated.property-details-value.newBuildDates.exampleDate"))
)),
items = dateItems
).withFormField(propertyDetailsForm("acquiredDate"))
).withDayMonthYearFormField(propertyDetailsForm("acquiredDate"))
.withHeadingAndSectionCaption(
heading = Text(messages("ated.property-details-value.whenAcquired.header", PeriodUtils.calculateLowerTaxYearBoundary(periodKey).getYear.toString)),
sectionCaption = Text(messages(AtedUtils.getPropertyDetailsPreHeader(mode)))
Expand Down
4 changes: 2 additions & 2 deletions app/views/reliefs/avoidanceSchemeBeingUsed.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ <h1 class="govuk-heading-xl govuk-!-margin-bottom-5">
@govukRadios(
Radios(
fieldset = Some(Fieldset(
classes = "govuk-radios--inline",
legend = Some(Legend(
content = Text(messages("ated.choose-reliefs.avoidance-title")),
classes = "govuk-visually-hidden"
Expand All @@ -111,7 +110,8 @@ <h1 class="govuk-heading-xl govuk-!-margin-bottom-5">
value = Some("false")
)
),
errorMessage = if(isTaxAvoidanceForm.hasErrors) Some(ErrorMessage(content = Text(messages(isTaxAvoidanceForm.errors.map(e => e.message))))) else None
errorMessage = if(isTaxAvoidanceForm.hasErrors) Some(ErrorMessage(content = Text(messages(isTaxAvoidanceForm.errors.map(e => e.message))))) else None,
classes = "govuk-radios--inline",
).withFormField(isTaxAvoidanceForm("isAvoidanceScheme")))

<div class="govuk-form-group">
Expand Down
2 changes: 1 addition & 1 deletion project/AppDependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ object AppDependencies {
"uk.gov.hmrc" %% "play-partials-play-30" % "9.1.0",
"uk.gov.hmrc" %% "domain-play-30" % "9.0.0",
"uk.gov.hmrc" %% "http-caching-client-play-30" % "11.2.0",
"uk.gov.hmrc" %% "play-frontend-hmrc-play-30" % "9.11.0"
"uk.gov.hmrc" %% "play-frontend-hmrc-play-30" % "10.1.0"
)

val test: Seq[ModuleID] = Seq(
Expand Down

0 comments on commit be68652

Please sign in to comment.