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

MISUV-8500 - Re-implement dynamic inset text #2619

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
8 changes: 8 additions & 0 deletions app/views/optOut/OptOutChooseTaxYear.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
controllers.optOut.routes.OptOutChooseTaxYearController.submit(isAgent)
}

@warningBlock = {
@govukInsetText(InsetText(id=Some("warning-inset"), content = HtmlContent(messages("optout.chooseOptOutTaxYear.submissions.deleted"))))
}

@formBlock = {
@formWithCSRF(action = confirmOptOutPostUrl, Symbol("id") -> "confirm-multi-year-opt-out-form") {
@govukRadios(Radios(
Expand Down Expand Up @@ -98,6 +102,10 @@
@messages("optout.chooseOptOutTaxYear.desc")
}

@if(submissionCounts.isQuarterlyUpdatesMade) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small comment, can we get a unit test in the OptOutChooseTaxYearViewSpec for the warning inset.
The test setup scenario at first glance looks like it should have a quarterly update so it should be present but it may need a new test scenario. not completely sure tho.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup I can look into that
the change was tested to ensure it was dynamic but it would probably be a good idea to have an actual written test for it - especially given the scoverage readings

@warningBlock
}

@formBlock

}
1 change: 1 addition & 0 deletions conf/messages
Original file line number Diff line number Diff line change
Expand Up @@ -2232,6 +2232,7 @@ optOut.confirmSingleYearOptOut.form.no-select.error = Select yes to opt
optOut.ConfirmOptOutMultiTaxYearChoice.form.no-select.error = Select the tax year you want to report annually from

# opt out choose tax year
optout.chooseOptOutTaxYear.submissions.deleted = Quarterly updates that you’ve submitted will be deleted from our records if you opt out from that tax year. You’ll need to include any income from these updates in your tax return.
optout.chooseOptOutTaxYear.heading = Opting out of quarterly reporting
optout.chooseOptOutTaxYear.desc = You can opt out from any of the tax years available and report annually from that year onwards. This means you’ll then report annually for all of your current businesses and any that you add in future.
optout.chooseOptOutTaxYear.whichTaxYear = Which tax year do you want to opt out from?
Expand Down
1 change: 1 addition & 0 deletions conf/messages.cy
Original file line number Diff line number Diff line change
Expand Up @@ -2172,6 +2172,7 @@ optOut.ConfirmOptOutMultiTaxYearChoice.form.no-select.error = Dewiswch y flwyddy

# opt out choose tax year
optout.chooseOptOutTaxYear.heading = Optio allan o adrodd yn chwarterol
optout.chooseOptOutTaxYear.submissions.deleted = Gallwch optio allan o unrhyw un o’r blynyddoedd treth sydd ar gael a chyflwyno adroddiadau yn flynyddol o’r flwyddyn dreth honno ymlaen.
optout.chooseOptOutTaxYear.desc = Gallwch optio allan o unrhyw un o’r blynyddoedd treth sydd ar gael a chyflwyno adroddiadau yn flynyddol o’r flwyddyn honno ymlaen. Mae hyn yn golygu y byddwch yn adrodd yn flynyddol ar gyfer pob un o’ch busnesau cyfredol ac unrhyw fusnesau eraill y byddwch yn eu hychwanegu yn y dyfodol.
optout.chooseOptOutTaxYear.whichTaxYear = eich cyfrif ar-lein CThEF meddalwedd cadw cofnodion sy’n cydweddu?
optout.chooseOptOutTaxYear.taxYearOnwards = {0} i {1} ymlaen
Expand Down