Skip to content

Commit

Permalink
ADR-1416: Removes radio button for single spr selection (#213)
Browse files Browse the repository at this point in the history
* ADR-1416 Removes radio button for single spr selection

* ADR-1416 css constant added
  • Loading branch information
sini-george authored Nov 18, 2024
1 parent 397d181 commit 26e905d
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions app/views/declareDuty/TellUsAboutMultipleSPRRateView.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,31 @@
content = Text(messages("tellUsAboutMultipleSPRRate.warning", messages(s"return.regime.$regime")))
))

@govukRadios(
RadiosViewModel(
field = form("volumesWithRate.taxType"),
fieldset = FieldsetViewModel(LegendViewModel(messages("tellUsAboutMultipleSPRRate.radioHeading", messages(s"return.regime.$regime"))).withSize(LegendSize.Medium)),
items = rateBandRadioItems,
errorMessageField = form("volumesWithRate_taxType")
@if(rateBandRadioItems.size > 1){
@govukRadios(
RadiosViewModel(
field = form("volumesWithRate.taxType"),
fieldset = FieldsetViewModel(LegendViewModel(messages("tellUsAboutMultipleSPRRate.radioHeading", messages(s"return.regime.$regime"))).withSize(LegendSize.Medium)),
items = rateBandRadioItems,
errorMessageField = form("volumesWithRate_taxType")
)
)
)
@subHeading(messages(s"tellUsAboutMultipleSPRRate.h3.$regime"), classes = Css.headingMCssClass)
}

@subHeading(messages(s"tellUsAboutMultipleSPRRate.h3.$regime"), classes = Css.headingMCssClass)
@if(rateBandRadioItems.size == 1){
@subHeading(rateBandRadioItems.head.content.asHtml.toString(), classes = Css.headingMCssClass)

@govukInput(
InputViewModel(
field = form("volumesWithRate"),
key = "taxType",
label = LabelViewModel(Text("")),
errorMessageField = form("volumesWithRate_taxType"),
value = rateBandRadioItems.head.value
).hidden
)
}

@govukInput(
InputViewModel(
Expand Down

0 comments on commit 26e905d

Please sign in to comment.