Skip to content

Instantly share code, notes, and snippets.

@oscarduignan
Last active November 25, 2024 10:40
Show Gist options
  • Select an option

  • Save oscarduignan/1c5b35488d3feb5c910827c2ff26f5d0 to your computer and use it in GitHub Desktop.

Select an option

Save oscarduignan/1c5b35488d3feb5c910827c2ff26f5d0 to your computer and use it in GitHub Desktop.
Find usages of play-frontend-hmrc components in twirl templates, doesn't handle all cases- just a proof of concept approach
//> using scala 2.13
//> using dep "org.scalameta::scalameta:4.7.7"
//> using dep "com.lihaoyi::pprint:0.9.0"
//> using dep "org.eclipse.jgit:org.eclipse.jgit:6.10.0.202406032230-r"
//> using dep "org.eclipse.jgit:org.eclipse.jgit.ssh.apache.agent:6.10.0.202406032230-r"
//> using toolkit 0.5.0
import java.nio.file._
import scala.meta.internal.semanticdb.{Locator, MethodSignature, SymbolInformation, TypeRef, ValueSignature}
import scala.io.Source
import scala.meta.internal.semanticdb.SymbolInformation.Kind.METHOD
import scala.util.Using
import scala.sys.process._
import org.eclipse.jgit.api.Git
import org.eclipse.jgit.storage.file.FileRepositoryBuilder
object FindUsages {
private val localGitRepos = Path.of("local-git-repos")
private val hmrcRepos = List("contact-frontend", "help-frontend", "tracking-consent-frontend", "accessibility-statement-frontend", "address-lookup-frontend", "amls-frontend")
private val defaultBranches = Map.empty[String, String] // not using "main" as their default branch
private def compileWithSemanticdb(path: Path): String =
Process("sbt 'set semanticdbEnabled := true; clean; compile'", cwd=path.toFile).!!
private def findUsagesIn(template: String, variableName: String): Seq[String] =
s"""(?s)@?${variableName}(?=\\()(?:(?=.*?\\((?!.*?\\1)(.*\\)(?!.*\\2).*))(?=.*?\\)(?!.*?\\2)(.*)).)+?.*?(?=\\1)[^(]*(?=\\2$$)""".stripMargin.r.findAllMatchIn(template).map(_.group(0)).toList
def main(args: Array[String]): Unit = {
val jsonLinesOutput = os.pwd / "usages.jsonl"
os.write.over(jsonLinesOutput, "", createFolders=true)
hmrcRepos.foreach((repo) => {
val localRepo = localGitRepos.resolve(repo)
if (!Files.exists(localRepo)) {
Files.createDirectories(localRepo)
Git
.cloneRepository()
.setURI(s"[email protected]:hmrc/$repo.git")
.setDirectory(localRepo.toFile)
.call()
println(s"Cloned hmrc/$repo")
} else if (sys.env.get("UPDATE_GIT_REPOS").contains("true")) {
new Git(
new FileRepositoryBuilder()
.setGitDir(localRepo.resolve(".git").toFile)
.readEnvironment()
.findGitDir()
.build()
)
.pull()
.setRemote("origin")
.setRemoteBranchName(defaultBranches.getOrElse(repo, "main"))
.call()
println(s"Updated hmrc/$repo")
}
compileWithSemanticdb(localRepo)
val usages = collection.mutable.ListBuffer[(String, String, String)]()
Locator(localRepo.resolve("target"))((path, result) => {
pprint.pprintln(path)
usages ++= result.documents.flatMap((document) => {
document.symbols.collect {
case SymbolInformation(_, _, METHOD, _, displayName, signature, _, _, _, _) =>
signature match {
case ValueSignature(tpe: TypeRef) if tpe.symbol.matches("""^uk/gov/hmrc/(?:govuk|hmrc)frontend/views/html.*$""") =>
Some((document.uri, displayName, tpe.symbol))
case MethodSignature(_, _, returnType: TypeRef) if returnType.symbol.matches("""^uk/gov/hmrc/(?:govuk|hmrc)frontend/views/html.*$""") =>
Some((document.uri, displayName, returnType.symbol))
case _ => None
}
case _ => None
}.flatten
})
})
println(s"found ${usages.length} templates with play-frontend-hmrc components injected")
val mappedUsages = usages.map((usage) => {
val (compiledPath, variableName, component) = usage
val twirlPath = compiledPath
.replaceFirst("^.*/main/", "app/")
.replaceFirst("/html/", "/")
.replaceFirst("template.scala", "scala.html")
val twirlText = Using(Source.fromFile(localRepo.resolve(twirlPath).toFile))(_.mkString)
.getOrElse("unable to read twirl template")
ujson.Obj(
"repoName" -> localRepo.getFileName.toString,
"templatePath" -> twirlPath,
"component" -> component,
"variableName" -> variableName,
"templateText" -> twirlText,
"usages" -> findUsagesIn(twirlText, variableName)
)
})
mappedUsages.foreach(usage =>
os.write.append(jsonLinesOutput, ujson.write(usage) + "\n"))
})
}
}
This file has been truncated, but you can view the full file.
{"repoName":"contact-frontend","templatePath":"app/views/AccessibilityProblemConfirmationPage.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukPanel#","variableName":"govukPanel","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import views.html.components.{Layout, Heading2, Paragraph}\n\n@this(govukPanel: GovukPanel, mainLayout: Layout, h2: Heading2, p: Paragraph)\n@()(implicit request: RequestHeader, messages: Messages, appConfig: AppConfig)\n\n@mainLayout(pageTitle = Messages(\"accessibility.title\")) {\n @govukPanel(Panel(title = Text(Messages(\"accessibility.confirmation.title\"))))\n @h2(content = Text(messages(\"accessibility.confirmation.subheading\")))\n @p(content = Text(messages(\"accessibility.confirmation.paragraph\")))\n}\n","usages":["@govukPanel(Panel(title = Text(Messages(\"accessibility.confirmation.title\"))))"]}
{"repoName":"contact-frontend","templatePath":"app/views/AccessibilityProblemPage.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukButton#","variableName":"govukButton","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.FormWithCSRF as PlayFrontendFormWithCSRF\n@import uk.gov.hmrc.hmrcfrontend.views.html.components.implicits.*\n@import model.AccessibilityForm\n@import views.html.components.{Layout, InputText, InputHidden, InputCharacterCount, Heading1, Heading2, Paragraph}\n\n@this(\n inputCharacterCount: InputCharacterCount,\n inputHidden: InputHidden,\n inputText: InputText,\n govukButton: GovukButton,\n govukErrorSummary: GovukErrorSummary,\n formWithCSRF: PlayFrontendFormWithCSRF,\n mainLayout: Layout,\n h1: Heading1,\n h2: Heading2,\n p: Paragraph\n)\n@(accessibilityForm: Form[AccessibilityForm], action: Call)(implicit request: RequestHeader, messages: Messages, appConfig: AppConfig)\n\n@pageTitle = @{\n if(accessibilityForm.hasErrors){Messages(\"error.browser.title.prefix\")+\" \"+Messages(\"accessibility.title\")} else Messages(\"accessibility.title\")\n}\n\n@mainLayout(pageTitle) {\n @if(accessibilityForm.errors.nonEmpty) {\n @govukErrorSummary(ErrorSummary().withFormErrorsAsText(accessibilityForm))\n }\n @h1(content = Text(messages(\"accessibility.heading\")))\n @p(content = Text(messages(\"accessibility.message.para1\")))\n @p(content = Text(messages(\"accessibility.message.para2\")))\n @formWithCSRF(action, Symbol(\"id\") -> \"accessibility-form\") {\n @inputHidden(accessibilityForm(\"service\"))\n @inputHidden(accessibilityForm(\"referrer\"))\n @inputHidden(accessibilityForm(\"userAction\"))\n @inputCharacterCount(\n accessibilityForm(\"problemDescription\"),\n label = messages(\"accessibility.problem.label\"),\n labelClasses = \"govuk-label--s\",\n maxLength = Some(2000)\n )\n @inputText(\n accessibilityForm(\"name\"),\n label = messages(\"accessibility.name.label\"),\n labelClasses = \"govuk-label--s\",\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"name\")\n )\n @inputText(\n accessibilityForm(\"email\"),\n inputType = \"email\",\n label = messages(\"accessibility.email.label\"),\n labelClasses = \"govuk-label--s\",\n hint = Some(messages(\"accessibility.email.hint\")),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"email\")\n )\n @govukButton(Button(\n content = Text(messages(\"accessibility.button\")),\n inputType = Some(\"submit\"),\n preventDoubleClick = Some(true)\n ))\n }\n}\n","usages":["@govukButton(Button(\n content = Text(messages(\"accessibility.button\")),\n inputType = Some(\"submit\"),\n preventDoubleClick = Some(true)\n ))"]}
{"repoName":"contact-frontend","templatePath":"app/views/AccessibilityProblemPage.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukErrorSummary#","variableName":"govukErrorSummary","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.FormWithCSRF as PlayFrontendFormWithCSRF\n@import uk.gov.hmrc.hmrcfrontend.views.html.components.implicits.*\n@import model.AccessibilityForm\n@import views.html.components.{Layout, InputText, InputHidden, InputCharacterCount, Heading1, Heading2, Paragraph}\n\n@this(\n inputCharacterCount: InputCharacterCount,\n inputHidden: InputHidden,\n inputText: InputText,\n govukButton: GovukButton,\n govukErrorSummary: GovukErrorSummary,\n formWithCSRF: PlayFrontendFormWithCSRF,\n mainLayout: Layout,\n h1: Heading1,\n h2: Heading2,\n p: Paragraph\n)\n@(accessibilityForm: Form[AccessibilityForm], action: Call)(implicit request: RequestHeader, messages: Messages, appConfig: AppConfig)\n\n@pageTitle = @{\n if(accessibilityForm.hasErrors){Messages(\"error.browser.title.prefix\")+\" \"+Messages(\"accessibility.title\")} else Messages(\"accessibility.title\")\n}\n\n@mainLayout(pageTitle) {\n @if(accessibilityForm.errors.nonEmpty) {\n @govukErrorSummary(ErrorSummary().withFormErrorsAsText(accessibilityForm))\n }\n @h1(content = Text(messages(\"accessibility.heading\")))\n @p(content = Text(messages(\"accessibility.message.para1\")))\n @p(content = Text(messages(\"accessibility.message.para2\")))\n @formWithCSRF(action, Symbol(\"id\") -> \"accessibility-form\") {\n @inputHidden(accessibilityForm(\"service\"))\n @inputHidden(accessibilityForm(\"referrer\"))\n @inputHidden(accessibilityForm(\"userAction\"))\n @inputCharacterCount(\n accessibilityForm(\"problemDescription\"),\n label = messages(\"accessibility.problem.label\"),\n labelClasses = \"govuk-label--s\",\n maxLength = Some(2000)\n )\n @inputText(\n accessibilityForm(\"name\"),\n label = messages(\"accessibility.name.label\"),\n labelClasses = \"govuk-label--s\",\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"name\")\n )\n @inputText(\n accessibilityForm(\"email\"),\n inputType = \"email\",\n label = messages(\"accessibility.email.label\"),\n labelClasses = \"govuk-label--s\",\n hint = Some(messages(\"accessibility.email.hint\")),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"email\")\n )\n @govukButton(Button(\n content = Text(messages(\"accessibility.button\")),\n inputType = Some(\"submit\"),\n preventDoubleClick = Some(true)\n ))\n }\n}\n","usages":["@govukErrorSummary(ErrorSummary().withFormErrorsAsText(accessibilityForm))"]}
{"repoName":"contact-frontend","templatePath":"app/views/AccessibilityProblemPage.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formWithCSRF","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.FormWithCSRF as PlayFrontendFormWithCSRF\n@import uk.gov.hmrc.hmrcfrontend.views.html.components.implicits.*\n@import model.AccessibilityForm\n@import views.html.components.{Layout, InputText, InputHidden, InputCharacterCount, Heading1, Heading2, Paragraph}\n\n@this(\n inputCharacterCount: InputCharacterCount,\n inputHidden: InputHidden,\n inputText: InputText,\n govukButton: GovukButton,\n govukErrorSummary: GovukErrorSummary,\n formWithCSRF: PlayFrontendFormWithCSRF,\n mainLayout: Layout,\n h1: Heading1,\n h2: Heading2,\n p: Paragraph\n)\n@(accessibilityForm: Form[AccessibilityForm], action: Call)(implicit request: RequestHeader, messages: Messages, appConfig: AppConfig)\n\n@pageTitle = @{\n if(accessibilityForm.hasErrors){Messages(\"error.browser.title.prefix\")+\" \"+Messages(\"accessibility.title\")} else Messages(\"accessibility.title\")\n}\n\n@mainLayout(pageTitle) {\n @if(accessibilityForm.errors.nonEmpty) {\n @govukErrorSummary(ErrorSummary().withFormErrorsAsText(accessibilityForm))\n }\n @h1(content = Text(messages(\"accessibility.heading\")))\n @p(content = Text(messages(\"accessibility.message.para1\")))\n @p(content = Text(messages(\"accessibility.message.para2\")))\n @formWithCSRF(action, Symbol(\"id\") -> \"accessibility-form\") {\n @inputHidden(accessibilityForm(\"service\"))\n @inputHidden(accessibilityForm(\"referrer\"))\n @inputHidden(accessibilityForm(\"userAction\"))\n @inputCharacterCount(\n accessibilityForm(\"problemDescription\"),\n label = messages(\"accessibility.problem.label\"),\n labelClasses = \"govuk-label--s\",\n maxLength = Some(2000)\n )\n @inputText(\n accessibilityForm(\"name\"),\n label = messages(\"accessibility.name.label\"),\n labelClasses = \"govuk-label--s\",\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"name\")\n )\n @inputText(\n accessibilityForm(\"email\"),\n inputType = \"email\",\n label = messages(\"accessibility.email.label\"),\n labelClasses = \"govuk-label--s\",\n hint = Some(messages(\"accessibility.email.hint\")),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"email\")\n )\n @govukButton(Button(\n content = Text(messages(\"accessibility.button\")),\n inputType = Some(\"submit\"),\n preventDoubleClick = Some(true)\n ))\n }\n}\n","usages":["@formWithCSRF(action, Symbol(\"id\") -> \"accessibility-form\")"]}
{"repoName":"contact-frontend","templatePath":"app/views/components/InputCharacterCount.scala.html","component":"uk/gov/hmrc/hmrcfrontend/views/html/components/HmrcCharacterCount#","variableName":"hmrcCharacterCount","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.hmrcfrontend.views.html.components.implicits.*\n@import uk.gov.hmrc.hmrcfrontend.views.viewmodels.charactercount.CharacterCount\n\n@this(hmrcCharacterCount: HmrcCharacterCount)\n\n@(\n field: Field,\n label: String,\n labelClasses: String = \"\",\n maxLength: Option[Int] = None,\n hint: Option[String] = None,\n classes: String = \"\"\n)(implicit messages: Messages)\n@hmrcCharacterCount(CharacterCount(\n label = Label(classes = labelClasses, content = Text(label)),\n hint = hint.map(h => Hint(content = Text(h))),\n maxLength = maxLength,\n classes = classes).withFormField(field)\n)\n","usages":["@hmrcCharacterCount(CharacterCount(\n label = Label(classes = labelClasses, content = Text(label)),\n hint = hint.map(h => Hint(content = Text(h))),\n maxLength = maxLength,\n classes = classes).withFormField(field)\n)"]}
{"repoName":"contact-frontend","templatePath":"app/views/components/InputRadios.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukRadios#","variableName":"govukRadios","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.implicits.*\n\n@this(govukRadios: GovukRadios)\n\n@(\n field: Field,\n legend: String,\n items: Seq[(String, String)]\n)(implicit messages: Messages)\n@govukRadios(Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(legend)\n ))\n )),\n items = items map { case (value: String, label: String) =>\n RadioItem(\n content = Text(label),\n value = Some(value)\n )\n }).withFormField(field)\n)\n","usages":["@govukRadios(Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(legend)\n ))\n )),\n items = items map { case (value: String, label: String) =>\n RadioItem(\n content = Text(label),\n value = Some(value)\n )\n }).withFormField(field)\n)"]}
{"repoName":"contact-frontend","templatePath":"app/views/components/InputText.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukInput#","variableName":"govukInput","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.implicits.*\n\n@this(govukInput: GovukInput)\n\n@(\n field: Field,\n inputType: String = \"text\",\n label: String,\n labelClasses: String = \"\",\n hint: Option[String] = None,\n classes: String = \"\",\n spellcheck: Option[Boolean] = None,\n autocomplete: Option[String] = None\n)(implicit messages: Messages)\n@govukInput(Input(\n inputType = inputType,\n label = Label(classes = labelClasses, content = Text(label)),\n hint = hint.map(h => Hint(content = Text(h))),\n classes = classes,\n spellcheck = spellcheck,\n autocomplete = autocomplete).withFormField(field)\n)\n","usages":["@govukInput(Input(\n inputType = inputType,\n label = Label(classes = labelClasses, content = Text(label)),\n hint = hint.map(h => Hint(content = Text(h))),\n classes = classes,\n spellcheck = spellcheck,\n autocomplete = autocomplete).withFormField(field)\n)"]}
{"repoName":"contact-frontend","templatePath":"app/views/components/Layout.scala.html","component":"uk/gov/hmrc/hmrcfrontend/views/html/helpers/HmrcStandardPage#","variableName":"hmrcStandardPage","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcStandardPage\n@import uk.gov.hmrc.hmrcfrontend.views.viewmodels.hmrcstandardpage.*\n\n@this(hmrcStandardPage: HmrcStandardPage)\n\n@(pageTitle: String, isWelshTranslationAvailable: Boolean = true, backLink: Option[String] = None)(contentBlock: Html)(implicit request: RequestHeader, messages: Messages)\n\n@hmrcStandardPage(\n HmrcStandardPageParams(\n banners = Banners(displayHmrcBanner = true),\n isWelshTranslationAvailable = isWelshTranslationAvailable,\n pageTitle = Some(pageTitle),\n backLink = backLink.map(url => BackLink.withDefaultText(href = url))\n )\n)(contentBlock)\n\n","usages":["@hmrcStandardPage(\n HmrcStandardPageParams(\n banners = Banners(displayHmrcBanner = true),\n isWelshTranslationAvailable = isWelshTranslationAvailable,\n pageTitle = Some(pageTitle),\n backLink = backLink.map(url => BackLink.withDefaultText(href = url))\n )\n)"]}
{"repoName":"contact-frontend","templatePath":"app/views/components/ReportTechnicalIssue.scala.html","component":"uk/gov/hmrc/hmrcfrontend/views/html/components/HmrcReportTechnicalIssue#","variableName":"hmrcReportTechnicalIssue","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@this(hmrcReportTechnicalIssue: HmrcReportTechnicalIssue)\n\n@(serviceId: Option[String])(implicit appConfig: AppConfig, messages: Messages)\[email protected] { s =>\n @hmrcReportTechnicalIssue(ReportTechnicalIssue.apply(\n serviceId = s,\n language = if (messages.lang.code == \"cy\") Cy else En\n ))\n}\n","usages":["@hmrcReportTechnicalIssue(ReportTechnicalIssue.apply(\n serviceId = s,\n language = if (messages.lang.code == \"cy\") Cy else En\n ))"]}
{"repoName":"contact-frontend","templatePath":"app/views/ContactHmrcConfirmationPage.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukPanel#","variableName":"govukPanel","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import views.html.components.{Layout, Heading1, Heading2, Paragraph}\n\n@this(\n mainLayout: Layout,\n h2: Heading2,\n p: Paragraph,\n govukPanel: GovukPanel\n)\n@()(implicit request: RequestHeader, messages: Messages, appConfig: AppConfig)\n\n@mainLayout(Messages(\"contact.title\")) {\n\n @govukPanel(Panel(title = Text(messages(\"contact.confirmation.panel.title\"))))\n\n @p(content = Text(messages(\"contact.confirmation.paragraph\")))\n\n @h2(content = Text(messages(\"contact.confirmation.next.heading\")))\n @p(content = Text(messages(\"contact.confirmation.next.paragraph\")))\n}\n","usages":["@govukPanel(Panel(title = Text(messages(\"contact.confirmation.panel.title\"))))"]}
{"repoName":"contact-frontend","templatePath":"app/views/ContactHmrcPage.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukInput#","variableName":"govukInput","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.FormWithCSRF as PlayFrontendFormWithCSRF\n@import uk.gov.hmrc.hmrcfrontend.views.html.components.implicits.*\n@import views.html.components.{Layout, InputText, InputHidden, InputCharacterCount, Heading1, Heading2, Paragraph}\n@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcNewTabLinkHelper\n@import uk.gov.hmrc.hmrcfrontend.views.viewmodels.newtablinkhelper.NewTabLinkHelper\n\n@this(\n inputCharacterCount: InputCharacterCount,\n govukInput: GovukInput,\n inputHidden: InputHidden,\n inputText: InputText,\n govukButton: GovukButton,\n govukFieldset: GovukFieldset,\n govukErrorSummary: GovukErrorSummary,\n formWithCSRF: PlayFrontendFormWithCSRF,\n mainLayout: Layout,\n h1: Heading1,\n h2: Heading2,\n p: Paragraph,\n link: HmrcNewTabLinkHelper\n)\n@(contactForm: Form[ContactForm], action: Call)(implicit request: RequestHeader, messages: Messages, appConfig: AppConfig)\n\n@pageTitle = @{\n if(contactForm.hasErrors){Messages(\"error.browser.title.prefix\") + \" \" + Messages(\"contact.title\")}\n else Messages(\"contact.title\")\n}\n\n@contactHmrcLink = @{\n link(NewTabLinkHelper(text = messages(\"contact.hmrc.link\"), href = Some(messages(\"contact.hmrc.url\"))))\n}\n\n@mainLayout(pageTitle) {\n @if(contactForm.errors.nonEmpty) {\n @govukErrorSummary(ErrorSummary().withFormErrorsAsText(contactForm))\n }\n @h1(content = Text(messages(\"contact.heading\")))\n @p(content = HtmlContent(messages(\"contact.form.para1\") + \" \" + contactHmrcLink + messages(\"common.fullstop\")))\n @p(content = Text(messages(\"contact.form.para2\")))\n @h2(content = Text(messages(\"contact.form.heading2\")))\n @p(content = Text(messages(\"contact.form.para3\")))\n\n @formWithCSRF(action, Symbol(\"id\") -> \"contact-hmrc-form\") {\n @inputHidden(contactForm(\"service\"))\n @inputHidden(contactForm(\"referrer\"))\n @inputHidden(contactForm(\"userAction\"))\n @inputText(\n contactForm(\"contact-name\"),\n label = messages(\"contact.name.label\"),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"name\")\n )\n @inputText(\n contactForm(\"contact-email\"),\n inputType = \"email\",\n label = messages(\"contact.email.label\"),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"email\")\n )\n @inputCharacterCount(\n contactForm(\"contact-comments\"),\n label = messages(\"contact.comments.label\"),\n maxLength = Some(2000)\n )\n @govukButton(Button(\n content = Text(messages(\"contact.button\")),\n inputType = Some(\"submit\"),\n preventDoubleClick = Some(true)\n ))\n }\n}\n","usages":[]}
{"repoName":"contact-frontend","templatePath":"app/views/ContactHmrcPage.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukButton#","variableName":"govukButton","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.FormWithCSRF as PlayFrontendFormWithCSRF\n@import uk.gov.hmrc.hmrcfrontend.views.html.components.implicits.*\n@import views.html.components.{Layout, InputText, InputHidden, InputCharacterCount, Heading1, Heading2, Paragraph}\n@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcNewTabLinkHelper\n@import uk.gov.hmrc.hmrcfrontend.views.viewmodels.newtablinkhelper.NewTabLinkHelper\n\n@this(\n inputCharacterCount: InputCharacterCount,\n govukInput: GovukInput,\n inputHidden: InputHidden,\n inputText: InputText,\n govukButton: GovukButton,\n govukFieldset: GovukFieldset,\n govukErrorSummary: GovukErrorSummary,\n formWithCSRF: PlayFrontendFormWithCSRF,\n mainLayout: Layout,\n h1: Heading1,\n h2: Heading2,\n p: Paragraph,\n link: HmrcNewTabLinkHelper\n)\n@(contactForm: Form[ContactForm], action: Call)(implicit request: RequestHeader, messages: Messages, appConfig: AppConfig)\n\n@pageTitle = @{\n if(contactForm.hasErrors){Messages(\"error.browser.title.prefix\") + \" \" + Messages(\"contact.title\")}\n else Messages(\"contact.title\")\n}\n\n@contactHmrcLink = @{\n link(NewTabLinkHelper(text = messages(\"contact.hmrc.link\"), href = Some(messages(\"contact.hmrc.url\"))))\n}\n\n@mainLayout(pageTitle) {\n @if(contactForm.errors.nonEmpty) {\n @govukErrorSummary(ErrorSummary().withFormErrorsAsText(contactForm))\n }\n @h1(content = Text(messages(\"contact.heading\")))\n @p(content = HtmlContent(messages(\"contact.form.para1\") + \" \" + contactHmrcLink + messages(\"common.fullstop\")))\n @p(content = Text(messages(\"contact.form.para2\")))\n @h2(content = Text(messages(\"contact.form.heading2\")))\n @p(content = Text(messages(\"contact.form.para3\")))\n\n @formWithCSRF(action, Symbol(\"id\") -> \"contact-hmrc-form\") {\n @inputHidden(contactForm(\"service\"))\n @inputHidden(contactForm(\"referrer\"))\n @inputHidden(contactForm(\"userAction\"))\n @inputText(\n contactForm(\"contact-name\"),\n label = messages(\"contact.name.label\"),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"name\")\n )\n @inputText(\n contactForm(\"contact-email\"),\n inputType = \"email\",\n label = messages(\"contact.email.label\"),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"email\")\n )\n @inputCharacterCount(\n contactForm(\"contact-comments\"),\n label = messages(\"contact.comments.label\"),\n maxLength = Some(2000)\n )\n @govukButton(Button(\n content = Text(messages(\"contact.button\")),\n inputType = Some(\"submit\"),\n preventDoubleClick = Some(true)\n ))\n }\n}\n","usages":["@govukButton(Button(\n content = Text(messages(\"contact.button\")),\n inputType = Some(\"submit\"),\n preventDoubleClick = Some(true)\n ))"]}
{"repoName":"contact-frontend","templatePath":"app/views/ContactHmrcPage.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukFieldset#","variableName":"govukFieldset","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.FormWithCSRF as PlayFrontendFormWithCSRF\n@import uk.gov.hmrc.hmrcfrontend.views.html.components.implicits.*\n@import views.html.components.{Layout, InputText, InputHidden, InputCharacterCount, Heading1, Heading2, Paragraph}\n@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcNewTabLinkHelper\n@import uk.gov.hmrc.hmrcfrontend.views.viewmodels.newtablinkhelper.NewTabLinkHelper\n\n@this(\n inputCharacterCount: InputCharacterCount,\n govukInput: GovukInput,\n inputHidden: InputHidden,\n inputText: InputText,\n govukButton: GovukButton,\n govukFieldset: GovukFieldset,\n govukErrorSummary: GovukErrorSummary,\n formWithCSRF: PlayFrontendFormWithCSRF,\n mainLayout: Layout,\n h1: Heading1,\n h2: Heading2,\n p: Paragraph,\n link: HmrcNewTabLinkHelper\n)\n@(contactForm: Form[ContactForm], action: Call)(implicit request: RequestHeader, messages: Messages, appConfig: AppConfig)\n\n@pageTitle = @{\n if(contactForm.hasErrors){Messages(\"error.browser.title.prefix\") + \" \" + Messages(\"contact.title\")}\n else Messages(\"contact.title\")\n}\n\n@contactHmrcLink = @{\n link(NewTabLinkHelper(text = messages(\"contact.hmrc.link\"), href = Some(messages(\"contact.hmrc.url\"))))\n}\n\n@mainLayout(pageTitle) {\n @if(contactForm.errors.nonEmpty) {\n @govukErrorSummary(ErrorSummary().withFormErrorsAsText(contactForm))\n }\n @h1(content = Text(messages(\"contact.heading\")))\n @p(content = HtmlContent(messages(\"contact.form.para1\") + \" \" + contactHmrcLink + messages(\"common.fullstop\")))\n @p(content = Text(messages(\"contact.form.para2\")))\n @h2(content = Text(messages(\"contact.form.heading2\")))\n @p(content = Text(messages(\"contact.form.para3\")))\n\n @formWithCSRF(action, Symbol(\"id\") -> \"contact-hmrc-form\") {\n @inputHidden(contactForm(\"service\"))\n @inputHidden(contactForm(\"referrer\"))\n @inputHidden(contactForm(\"userAction\"))\n @inputText(\n contactForm(\"contact-name\"),\n label = messages(\"contact.name.label\"),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"name\")\n )\n @inputText(\n contactForm(\"contact-email\"),\n inputType = \"email\",\n label = messages(\"contact.email.label\"),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"email\")\n )\n @inputCharacterCount(\n contactForm(\"contact-comments\"),\n label = messages(\"contact.comments.label\"),\n maxLength = Some(2000)\n )\n @govukButton(Button(\n content = Text(messages(\"contact.button\")),\n inputType = Some(\"submit\"),\n preventDoubleClick = Some(true)\n ))\n }\n}\n","usages":[]}
{"repoName":"contact-frontend","templatePath":"app/views/ContactHmrcPage.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukErrorSummary#","variableName":"govukErrorSummary","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.FormWithCSRF as PlayFrontendFormWithCSRF\n@import uk.gov.hmrc.hmrcfrontend.views.html.components.implicits.*\n@import views.html.components.{Layout, InputText, InputHidden, InputCharacterCount, Heading1, Heading2, Paragraph}\n@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcNewTabLinkHelper\n@import uk.gov.hmrc.hmrcfrontend.views.viewmodels.newtablinkhelper.NewTabLinkHelper\n\n@this(\n inputCharacterCount: InputCharacterCount,\n govukInput: GovukInput,\n inputHidden: InputHidden,\n inputText: InputText,\n govukButton: GovukButton,\n govukFieldset: GovukFieldset,\n govukErrorSummary: GovukErrorSummary,\n formWithCSRF: PlayFrontendFormWithCSRF,\n mainLayout: Layout,\n h1: Heading1,\n h2: Heading2,\n p: Paragraph,\n link: HmrcNewTabLinkHelper\n)\n@(contactForm: Form[ContactForm], action: Call)(implicit request: RequestHeader, messages: Messages, appConfig: AppConfig)\n\n@pageTitle = @{\n if(contactForm.hasErrors){Messages(\"error.browser.title.prefix\") + \" \" + Messages(\"contact.title\")}\n else Messages(\"contact.title\")\n}\n\n@contactHmrcLink = @{\n link(NewTabLinkHelper(text = messages(\"contact.hmrc.link\"), href = Some(messages(\"contact.hmrc.url\"))))\n}\n\n@mainLayout(pageTitle) {\n @if(contactForm.errors.nonEmpty) {\n @govukErrorSummary(ErrorSummary().withFormErrorsAsText(contactForm))\n }\n @h1(content = Text(messages(\"contact.heading\")))\n @p(content = HtmlContent(messages(\"contact.form.para1\") + \" \" + contactHmrcLink + messages(\"common.fullstop\")))\n @p(content = Text(messages(\"contact.form.para2\")))\n @h2(content = Text(messages(\"contact.form.heading2\")))\n @p(content = Text(messages(\"contact.form.para3\")))\n\n @formWithCSRF(action, Symbol(\"id\") -> \"contact-hmrc-form\") {\n @inputHidden(contactForm(\"service\"))\n @inputHidden(contactForm(\"referrer\"))\n @inputHidden(contactForm(\"userAction\"))\n @inputText(\n contactForm(\"contact-name\"),\n label = messages(\"contact.name.label\"),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"name\")\n )\n @inputText(\n contactForm(\"contact-email\"),\n inputType = \"email\",\n label = messages(\"contact.email.label\"),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"email\")\n )\n @inputCharacterCount(\n contactForm(\"contact-comments\"),\n label = messages(\"contact.comments.label\"),\n maxLength = Some(2000)\n )\n @govukButton(Button(\n content = Text(messages(\"contact.button\")),\n inputType = Some(\"submit\"),\n preventDoubleClick = Some(true)\n ))\n }\n}\n","usages":["@govukErrorSummary(ErrorSummary().withFormErrorsAsText(contactForm))"]}
{"repoName":"contact-frontend","templatePath":"app/views/ContactHmrcPage.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formWithCSRF","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.FormWithCSRF as PlayFrontendFormWithCSRF\n@import uk.gov.hmrc.hmrcfrontend.views.html.components.implicits.*\n@import views.html.components.{Layout, InputText, InputHidden, InputCharacterCount, Heading1, Heading2, Paragraph}\n@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcNewTabLinkHelper\n@import uk.gov.hmrc.hmrcfrontend.views.viewmodels.newtablinkhelper.NewTabLinkHelper\n\n@this(\n inputCharacterCount: InputCharacterCount,\n govukInput: GovukInput,\n inputHidden: InputHidden,\n inputText: InputText,\n govukButton: GovukButton,\n govukFieldset: GovukFieldset,\n govukErrorSummary: GovukErrorSummary,\n formWithCSRF: PlayFrontendFormWithCSRF,\n mainLayout: Layout,\n h1: Heading1,\n h2: Heading2,\n p: Paragraph,\n link: HmrcNewTabLinkHelper\n)\n@(contactForm: Form[ContactForm], action: Call)(implicit request: RequestHeader, messages: Messages, appConfig: AppConfig)\n\n@pageTitle = @{\n if(contactForm.hasErrors){Messages(\"error.browser.title.prefix\") + \" \" + Messages(\"contact.title\")}\n else Messages(\"contact.title\")\n}\n\n@contactHmrcLink = @{\n link(NewTabLinkHelper(text = messages(\"contact.hmrc.link\"), href = Some(messages(\"contact.hmrc.url\"))))\n}\n\n@mainLayout(pageTitle) {\n @if(contactForm.errors.nonEmpty) {\n @govukErrorSummary(ErrorSummary().withFormErrorsAsText(contactForm))\n }\n @h1(content = Text(messages(\"contact.heading\")))\n @p(content = HtmlContent(messages(\"contact.form.para1\") + \" \" + contactHmrcLink + messages(\"common.fullstop\")))\n @p(content = Text(messages(\"contact.form.para2\")))\n @h2(content = Text(messages(\"contact.form.heading2\")))\n @p(content = Text(messages(\"contact.form.para3\")))\n\n @formWithCSRF(action, Symbol(\"id\") -> \"contact-hmrc-form\") {\n @inputHidden(contactForm(\"service\"))\n @inputHidden(contactForm(\"referrer\"))\n @inputHidden(contactForm(\"userAction\"))\n @inputText(\n contactForm(\"contact-name\"),\n label = messages(\"contact.name.label\"),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"name\")\n )\n @inputText(\n contactForm(\"contact-email\"),\n inputType = \"email\",\n label = messages(\"contact.email.label\"),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"email\")\n )\n @inputCharacterCount(\n contactForm(\"contact-comments\"),\n label = messages(\"contact.comments.label\"),\n maxLength = Some(2000)\n )\n @govukButton(Button(\n content = Text(messages(\"contact.button\")),\n inputType = Some(\"submit\"),\n preventDoubleClick = Some(true)\n ))\n }\n}\n","usages":["@formWithCSRF(action, Symbol(\"id\") -> \"contact-hmrc-form\")"]}
{"repoName":"contact-frontend","templatePath":"app/views/ContactHmrcPage.scala.html","component":"uk/gov/hmrc/hmrcfrontend/views/html/helpers/HmrcNewTabLinkHelper#","variableName":"link","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.FormWithCSRF as PlayFrontendFormWithCSRF\n@import uk.gov.hmrc.hmrcfrontend.views.html.components.implicits.*\n@import views.html.components.{Layout, InputText, InputHidden, InputCharacterCount, Heading1, Heading2, Paragraph}\n@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcNewTabLinkHelper\n@import uk.gov.hmrc.hmrcfrontend.views.viewmodels.newtablinkhelper.NewTabLinkHelper\n\n@this(\n inputCharacterCount: InputCharacterCount,\n govukInput: GovukInput,\n inputHidden: InputHidden,\n inputText: InputText,\n govukButton: GovukButton,\n govukFieldset: GovukFieldset,\n govukErrorSummary: GovukErrorSummary,\n formWithCSRF: PlayFrontendFormWithCSRF,\n mainLayout: Layout,\n h1: Heading1,\n h2: Heading2,\n p: Paragraph,\n link: HmrcNewTabLinkHelper\n)\n@(contactForm: Form[ContactForm], action: Call)(implicit request: RequestHeader, messages: Messages, appConfig: AppConfig)\n\n@pageTitle = @{\n if(contactForm.hasErrors){Messages(\"error.browser.title.prefix\") + \" \" + Messages(\"contact.title\")}\n else Messages(\"contact.title\")\n}\n\n@contactHmrcLink = @{\n link(NewTabLinkHelper(text = messages(\"contact.hmrc.link\"), href = Some(messages(\"contact.hmrc.url\"))))\n}\n\n@mainLayout(pageTitle) {\n @if(contactForm.errors.nonEmpty) {\n @govukErrorSummary(ErrorSummary().withFormErrorsAsText(contactForm))\n }\n @h1(content = Text(messages(\"contact.heading\")))\n @p(content = HtmlContent(messages(\"contact.form.para1\") + \" \" + contactHmrcLink + messages(\"common.fullstop\")))\n @p(content = Text(messages(\"contact.form.para2\")))\n @h2(content = Text(messages(\"contact.form.heading2\")))\n @p(content = Text(messages(\"contact.form.para3\")))\n\n @formWithCSRF(action, Symbol(\"id\") -> \"contact-hmrc-form\") {\n @inputHidden(contactForm(\"service\"))\n @inputHidden(contactForm(\"referrer\"))\n @inputHidden(contactForm(\"userAction\"))\n @inputText(\n contactForm(\"contact-name\"),\n label = messages(\"contact.name.label\"),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"name\")\n )\n @inputText(\n contactForm(\"contact-email\"),\n inputType = \"email\",\n label = messages(\"contact.email.label\"),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"email\")\n )\n @inputCharacterCount(\n contactForm(\"contact-comments\"),\n label = messages(\"contact.comments.label\"),\n maxLength = Some(2000)\n )\n @govukButton(Button(\n content = Text(messages(\"contact.button\")),\n inputType = Some(\"submit\"),\n preventDoubleClick = Some(true)\n ))\n }\n}\n","usages":["link(NewTabLinkHelper(text = messages(\"contact.hmrc.link\"), href = Some(messages(\"contact.hmrc.url\"))))"]}
{"repoName":"contact-frontend","templatePath":"app/views/FeedbackConfirmationPage.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukPanel#","variableName":"govukPanel","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model.Aliases.BackUrl\n@import views.html.components.Layout\n\n@this(govukPanel: GovukPanel, mainLayout: Layout)\n@(backUrl: Option[BackUrl] = None)(implicit request: RequestHeader, messages: Messages, appConfig: AppConfig)\n\n@mainLayout(pageTitle = messages(\"feedback.title\"), backLink = backUrl) {\n @govukPanel(Panel(title = Text(messages(\"feedback.confirmation.panel.title\"))))\n}\n","usages":["@govukPanel(Panel(title = Text(messages(\"feedback.confirmation.panel.title\"))))"]}
{"repoName":"contact-frontend","templatePath":"app/views/FeedbackPage.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukButton#","variableName":"govukButton","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.FormWithCSRF as PlayFrontendFormWithCSRF\n@import uk.gov.hmrc.hmrcfrontend.views.html.components.implicits.*\n@import model.FeedbackForm\n@import views.html.components.{Layout, InputText, InputRadios, InputHidden, InputCharacterCount, Heading1, Paragraph, ReportTechnicalIssue}\n\n@this(\n inputCharacterCount: InputCharacterCount,\n inputHidden: InputHidden,\n inputText: InputText,\n inputRadios: InputRadios,\n govukButton: GovukButton,\n govukErrorSummary: GovukErrorSummary,\n formWithCSRF: PlayFrontendFormWithCSRF,\n mainLayout: Layout,\n h1: Heading1,\n p: Paragraph,\n reportTechnicalIssue: ReportTechnicalIssue\n)\n@(feedbackForm: Form[FeedbackForm], action: Call)(implicit request: RequestHeader, messages: Messages, appConfig: AppConfig)\n\n@pageTitle = @{\n if(feedbackForm.hasErrors){Messages(\"error.browser.title.prefix\")+\" \"+Messages(\"feedback.title\")} else Messages(\"feedback.title\")\n}\n\n@mainLayout(pageTitle) {\n @if(feedbackForm.errors.nonEmpty) {\n @govukErrorSummary(ErrorSummary().withFormErrorsAsText(feedbackForm))\n }\n @h1(content = Text(messages(\"feedback.heading\")))\n @p(content = Text(messages(\"form.online.services.data\")))\n @formWithCSRF(action, Symbol(\"id\") -> \"feedback-form\") {\n @inputHidden(feedbackForm(\"service\"))\n @inputHidden(feedbackForm(\"referrer\"))\n @inputHidden(feedbackForm(\"canOmitComments\"))\n @defining(feedbackForm(\"backUrl\")) { backUrlField =>\n @if(backUrlField.value.isDefined) {\n @inputHidden(backUrlField)\n }\n }\n @inputRadios(\n feedbackForm(\"feedback-rating\"),\n legend = Messages(\"form.online.services\"),\n items = Seq(\n (\"5\", Messages(\"form.online.services.very_good\")),\n (\"4\", Messages(\"form.online.services.good\")),\n (\"3\", Messages(\"form.online.services.neutral\")),\n (\"2\", Messages(\"form.online.services.bad\")),\n (\"1\", Messages(\"form.online.services.very_bad\"))\n )\n )\n @inputText(\n feedbackForm(\"feedback-name\"),\n label = messages(\"feedback.name.label\"),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"name\")\n )\n @inputText(\n feedbackForm(\"feedback-email\"),\n inputType = \"email\",\n label = messages(\"feedback.email.label\"),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"email\")\n )\n @inputCharacterCount(\n feedbackForm(\"feedback-comments\"),\n hint = Some(messages(\"feedback.comments.hint\")),\n label = messages(\"form.comments\"),\n maxLength = Some(2000)\n )\n @govukButton(Button(\n content = Text(messages(\"feedback.send\")),\n inputType = Some(\"submit\"),\n preventDoubleClick = Some(true)\n ))\n }\n @reportTechnicalIssue(feedbackForm(\"service\").value)\n}\n","usages":["@govukButton(Button(\n content = Text(messages(\"feedback.send\")),\n inputType = Some(\"submit\"),\n preventDoubleClick = Some(true)\n ))"]}
{"repoName":"contact-frontend","templatePath":"app/views/FeedbackPage.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukErrorSummary#","variableName":"govukErrorSummary","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.FormWithCSRF as PlayFrontendFormWithCSRF\n@import uk.gov.hmrc.hmrcfrontend.views.html.components.implicits.*\n@import model.FeedbackForm\n@import views.html.components.{Layout, InputText, InputRadios, InputHidden, InputCharacterCount, Heading1, Paragraph, ReportTechnicalIssue}\n\n@this(\n inputCharacterCount: InputCharacterCount,\n inputHidden: InputHidden,\n inputText: InputText,\n inputRadios: InputRadios,\n govukButton: GovukButton,\n govukErrorSummary: GovukErrorSummary,\n formWithCSRF: PlayFrontendFormWithCSRF,\n mainLayout: Layout,\n h1: Heading1,\n p: Paragraph,\n reportTechnicalIssue: ReportTechnicalIssue\n)\n@(feedbackForm: Form[FeedbackForm], action: Call)(implicit request: RequestHeader, messages: Messages, appConfig: AppConfig)\n\n@pageTitle = @{\n if(feedbackForm.hasErrors){Messages(\"error.browser.title.prefix\")+\" \"+Messages(\"feedback.title\")} else Messages(\"feedback.title\")\n}\n\n@mainLayout(pageTitle) {\n @if(feedbackForm.errors.nonEmpty) {\n @govukErrorSummary(ErrorSummary().withFormErrorsAsText(feedbackForm))\n }\n @h1(content = Text(messages(\"feedback.heading\")))\n @p(content = Text(messages(\"form.online.services.data\")))\n @formWithCSRF(action, Symbol(\"id\") -> \"feedback-form\") {\n @inputHidden(feedbackForm(\"service\"))\n @inputHidden(feedbackForm(\"referrer\"))\n @inputHidden(feedbackForm(\"canOmitComments\"))\n @defining(feedbackForm(\"backUrl\")) { backUrlField =>\n @if(backUrlField.value.isDefined) {\n @inputHidden(backUrlField)\n }\n }\n @inputRadios(\n feedbackForm(\"feedback-rating\"),\n legend = Messages(\"form.online.services\"),\n items = Seq(\n (\"5\", Messages(\"form.online.services.very_good\")),\n (\"4\", Messages(\"form.online.services.good\")),\n (\"3\", Messages(\"form.online.services.neutral\")),\n (\"2\", Messages(\"form.online.services.bad\")),\n (\"1\", Messages(\"form.online.services.very_bad\"))\n )\n )\n @inputText(\n feedbackForm(\"feedback-name\"),\n label = messages(\"feedback.name.label\"),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"name\")\n )\n @inputText(\n feedbackForm(\"feedback-email\"),\n inputType = \"email\",\n label = messages(\"feedback.email.label\"),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"email\")\n )\n @inputCharacterCount(\n feedbackForm(\"feedback-comments\"),\n hint = Some(messages(\"feedback.comments.hint\")),\n label = messages(\"form.comments\"),\n maxLength = Some(2000)\n )\n @govukButton(Button(\n content = Text(messages(\"feedback.send\")),\n inputType = Some(\"submit\"),\n preventDoubleClick = Some(true)\n ))\n }\n @reportTechnicalIssue(feedbackForm(\"service\").value)\n}\n","usages":["@govukErrorSummary(ErrorSummary().withFormErrorsAsText(feedbackForm))"]}
{"repoName":"contact-frontend","templatePath":"app/views/FeedbackPage.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formWithCSRF","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.FormWithCSRF as PlayFrontendFormWithCSRF\n@import uk.gov.hmrc.hmrcfrontend.views.html.components.implicits.*\n@import model.FeedbackForm\n@import views.html.components.{Layout, InputText, InputRadios, InputHidden, InputCharacterCount, Heading1, Paragraph, ReportTechnicalIssue}\n\n@this(\n inputCharacterCount: InputCharacterCount,\n inputHidden: InputHidden,\n inputText: InputText,\n inputRadios: InputRadios,\n govukButton: GovukButton,\n govukErrorSummary: GovukErrorSummary,\n formWithCSRF: PlayFrontendFormWithCSRF,\n mainLayout: Layout,\n h1: Heading1,\n p: Paragraph,\n reportTechnicalIssue: ReportTechnicalIssue\n)\n@(feedbackForm: Form[FeedbackForm], action: Call)(implicit request: RequestHeader, messages: Messages, appConfig: AppConfig)\n\n@pageTitle = @{\n if(feedbackForm.hasErrors){Messages(\"error.browser.title.prefix\")+\" \"+Messages(\"feedback.title\")} else Messages(\"feedback.title\")\n}\n\n@mainLayout(pageTitle) {\n @if(feedbackForm.errors.nonEmpty) {\n @govukErrorSummary(ErrorSummary().withFormErrorsAsText(feedbackForm))\n }\n @h1(content = Text(messages(\"feedback.heading\")))\n @p(content = Text(messages(\"form.online.services.data\")))\n @formWithCSRF(action, Symbol(\"id\") -> \"feedback-form\") {\n @inputHidden(feedbackForm(\"service\"))\n @inputHidden(feedbackForm(\"referrer\"))\n @inputHidden(feedbackForm(\"canOmitComments\"))\n @defining(feedbackForm(\"backUrl\")) { backUrlField =>\n @if(backUrlField.value.isDefined) {\n @inputHidden(backUrlField)\n }\n }\n @inputRadios(\n feedbackForm(\"feedback-rating\"),\n legend = Messages(\"form.online.services\"),\n items = Seq(\n (\"5\", Messages(\"form.online.services.very_good\")),\n (\"4\", Messages(\"form.online.services.good\")),\n (\"3\", Messages(\"form.online.services.neutral\")),\n (\"2\", Messages(\"form.online.services.bad\")),\n (\"1\", Messages(\"form.online.services.very_bad\"))\n )\n )\n @inputText(\n feedbackForm(\"feedback-name\"),\n label = messages(\"feedback.name.label\"),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"name\")\n )\n @inputText(\n feedbackForm(\"feedback-email\"),\n inputType = \"email\",\n label = messages(\"feedback.email.label\"),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"email\")\n )\n @inputCharacterCount(\n feedbackForm(\"feedback-comments\"),\n hint = Some(messages(\"feedback.comments.hint\")),\n label = messages(\"form.comments\"),\n maxLength = Some(2000)\n )\n @govukButton(Button(\n content = Text(messages(\"feedback.send\")),\n inputType = Some(\"submit\"),\n preventDoubleClick = Some(true)\n ))\n }\n @reportTechnicalIssue(feedbackForm(\"service\").value)\n}\n","usages":["@formWithCSRF(action, Symbol(\"id\") -> \"feedback-form\")"]}
{"repoName":"contact-frontend","templatePath":"app/views/ReportProblemConfirmationPage.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukPanel#","variableName":"govukPanel","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import views.html.components.{Layout, Heading1, Heading2, Paragraph}\n\n@this(\n mainLayout: Layout,\n h2: Heading2,\n p: Paragraph,\n govukPanel: GovukPanel\n)\n@()(implicit request: RequestHeader, messages: Messages, appConfig: AppConfig)\n\n@mainLayout(Messages(\"problem_report.title\")) {\n\n @govukPanel(Panel(title = Text(messages(\"problem_report.confirmation.panel.title\"))))\n\n @p(content = Text(messages(\"problem_report.confirmation.paragraph\")))\n\n @h2(content = Text(messages(\"problem_report.confirmation.next.heading\")))\n @p(content = Text(messages(\"problem_report.confirmation.next.paragraph\")))\n\n}\n","usages":["@govukPanel(Panel(title = Text(messages(\"problem_report.confirmation.panel.title\"))))"]}
{"repoName":"contact-frontend","templatePath":"app/views/ReportProblemPage.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukInput#","variableName":"govukInput","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.FormWithCSRF as PlayFrontendFormWithCSRF\n@import uk.gov.hmrc.hmrcfrontend.views.html.components.implicits.*\n@import model.ReportProblemForm\n@import views.html.components.{Layout, InputText, InputHidden, InputCharacterCount, Heading1, Heading2, Paragraph}\n\n@this(\n inputCharacterCount: InputCharacterCount,\n govukInput: GovukInput,\n inputHidden: InputHidden,\n inputText: InputText,\n govukButton: GovukButton,\n govukFieldset: GovukFieldset,\n govukErrorSummary: GovukErrorSummary,\n formWithCSRF: PlayFrontendFormWithCSRF,\n mainLayout: Layout,\n h1: Heading1,\n h2: Heading2,\n p: Paragraph\n)\n@(problemReportForm: Form[ReportProblemForm], action: Call)(implicit request: RequestHeader, messages: Messages, appConfig: AppConfig)\n\n@pageTitle = @{\n if(problemReportForm.hasErrors){Messages(\"error.browser.title.prefix\") + \" \" + Messages(\"problem_report.title\")}\n else Messages(\"problem_report.title\")\n}\n\n@mainLayout(pageTitle) {\n @if(problemReportForm.errors.nonEmpty) {\n @govukErrorSummary(ErrorSummary().withFormErrorsAsText(problemReportForm))\n }\n @h1(content = Text(messages(\"problem_report.heading\")))\n @p(content = Text(messages(\"problem_report.paragraph.1\")))\n @p(content = Text(messages(\"problem_report.paragraph.2\")))\n @formWithCSRF(action, Symbol(\"id\") -> \"error-feedback-form\") {\n @inputHidden(problemReportForm(\"service\"))\n @inputHidden(problemReportForm(\"referrer\"))\n @inputHidden(problemReportForm(\"userAction\"))\n @inputText(\n problemReportForm(\"report-name\"),\n label = messages(\"problem_report.name.label\"),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"name\")\n )\n @inputText(\n problemReportForm(\"report-email\"),\n inputType = \"email\",\n label = messages(\"problem_report.email.label\"),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"email\")\n )\n @inputCharacterCount(\n problemReportForm(\"report-action\"),\n label = messages(\"problem_report.action.label\"),\n classes = \"govuk-!-width-two-thirds\",\n maxLength = Some(1000)\n )\n @inputCharacterCount(\n problemReportForm(\"report-error\"),\n label = messages(\"problem_report.error.label\"),\n classes = \"govuk-!-width-two-thirds\",\n maxLength = Some(1000)\n )\n @govukButton(Button(\n content = Text(messages(\"problem_report.button\")),\n inputType = Some(\"submit\"),\n preventDoubleClick = Some(true)\n ))\n }\n}\n","usages":[]}
{"repoName":"contact-frontend","templatePath":"app/views/ReportProblemPage.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukButton#","variableName":"govukButton","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.FormWithCSRF as PlayFrontendFormWithCSRF\n@import uk.gov.hmrc.hmrcfrontend.views.html.components.implicits.*\n@import model.ReportProblemForm\n@import views.html.components.{Layout, InputText, InputHidden, InputCharacterCount, Heading1, Heading2, Paragraph}\n\n@this(\n inputCharacterCount: InputCharacterCount,\n govukInput: GovukInput,\n inputHidden: InputHidden,\n inputText: InputText,\n govukButton: GovukButton,\n govukFieldset: GovukFieldset,\n govukErrorSummary: GovukErrorSummary,\n formWithCSRF: PlayFrontendFormWithCSRF,\n mainLayout: Layout,\n h1: Heading1,\n h2: Heading2,\n p: Paragraph\n)\n@(problemReportForm: Form[ReportProblemForm], action: Call)(implicit request: RequestHeader, messages: Messages, appConfig: AppConfig)\n\n@pageTitle = @{\n if(problemReportForm.hasErrors){Messages(\"error.browser.title.prefix\") + \" \" + Messages(\"problem_report.title\")}\n else Messages(\"problem_report.title\")\n}\n\n@mainLayout(pageTitle) {\n @if(problemReportForm.errors.nonEmpty) {\n @govukErrorSummary(ErrorSummary().withFormErrorsAsText(problemReportForm))\n }\n @h1(content = Text(messages(\"problem_report.heading\")))\n @p(content = Text(messages(\"problem_report.paragraph.1\")))\n @p(content = Text(messages(\"problem_report.paragraph.2\")))\n @formWithCSRF(action, Symbol(\"id\") -> \"error-feedback-form\") {\n @inputHidden(problemReportForm(\"service\"))\n @inputHidden(problemReportForm(\"referrer\"))\n @inputHidden(problemReportForm(\"userAction\"))\n @inputText(\n problemReportForm(\"report-name\"),\n label = messages(\"problem_report.name.label\"),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"name\")\n )\n @inputText(\n problemReportForm(\"report-email\"),\n inputType = \"email\",\n label = messages(\"problem_report.email.label\"),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"email\")\n )\n @inputCharacterCount(\n problemReportForm(\"report-action\"),\n label = messages(\"problem_report.action.label\"),\n classes = \"govuk-!-width-two-thirds\",\n maxLength = Some(1000)\n )\n @inputCharacterCount(\n problemReportForm(\"report-error\"),\n label = messages(\"problem_report.error.label\"),\n classes = \"govuk-!-width-two-thirds\",\n maxLength = Some(1000)\n )\n @govukButton(Button(\n content = Text(messages(\"problem_report.button\")),\n inputType = Some(\"submit\"),\n preventDoubleClick = Some(true)\n ))\n }\n}\n","usages":["@govukButton(Button(\n content = Text(messages(\"problem_report.button\")),\n inputType = Some(\"submit\"),\n preventDoubleClick = Some(true)\n ))"]}
{"repoName":"contact-frontend","templatePath":"app/views/ReportProblemPage.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukFieldset#","variableName":"govukFieldset","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.FormWithCSRF as PlayFrontendFormWithCSRF\n@import uk.gov.hmrc.hmrcfrontend.views.html.components.implicits.*\n@import model.ReportProblemForm\n@import views.html.components.{Layout, InputText, InputHidden, InputCharacterCount, Heading1, Heading2, Paragraph}\n\n@this(\n inputCharacterCount: InputCharacterCount,\n govukInput: GovukInput,\n inputHidden: InputHidden,\n inputText: InputText,\n govukButton: GovukButton,\n govukFieldset: GovukFieldset,\n govukErrorSummary: GovukErrorSummary,\n formWithCSRF: PlayFrontendFormWithCSRF,\n mainLayout: Layout,\n h1: Heading1,\n h2: Heading2,\n p: Paragraph\n)\n@(problemReportForm: Form[ReportProblemForm], action: Call)(implicit request: RequestHeader, messages: Messages, appConfig: AppConfig)\n\n@pageTitle = @{\n if(problemReportForm.hasErrors){Messages(\"error.browser.title.prefix\") + \" \" + Messages(\"problem_report.title\")}\n else Messages(\"problem_report.title\")\n}\n\n@mainLayout(pageTitle) {\n @if(problemReportForm.errors.nonEmpty) {\n @govukErrorSummary(ErrorSummary().withFormErrorsAsText(problemReportForm))\n }\n @h1(content = Text(messages(\"problem_report.heading\")))\n @p(content = Text(messages(\"problem_report.paragraph.1\")))\n @p(content = Text(messages(\"problem_report.paragraph.2\")))\n @formWithCSRF(action, Symbol(\"id\") -> \"error-feedback-form\") {\n @inputHidden(problemReportForm(\"service\"))\n @inputHidden(problemReportForm(\"referrer\"))\n @inputHidden(problemReportForm(\"userAction\"))\n @inputText(\n problemReportForm(\"report-name\"),\n label = messages(\"problem_report.name.label\"),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"name\")\n )\n @inputText(\n problemReportForm(\"report-email\"),\n inputType = \"email\",\n label = messages(\"problem_report.email.label\"),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"email\")\n )\n @inputCharacterCount(\n problemReportForm(\"report-action\"),\n label = messages(\"problem_report.action.label\"),\n classes = \"govuk-!-width-two-thirds\",\n maxLength = Some(1000)\n )\n @inputCharacterCount(\n problemReportForm(\"report-error\"),\n label = messages(\"problem_report.error.label\"),\n classes = \"govuk-!-width-two-thirds\",\n maxLength = Some(1000)\n )\n @govukButton(Button(\n content = Text(messages(\"problem_report.button\")),\n inputType = Some(\"submit\"),\n preventDoubleClick = Some(true)\n ))\n }\n}\n","usages":[]}
{"repoName":"contact-frontend","templatePath":"app/views/ReportProblemPage.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukErrorSummary#","variableName":"govukErrorSummary","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.FormWithCSRF as PlayFrontendFormWithCSRF\n@import uk.gov.hmrc.hmrcfrontend.views.html.components.implicits.*\n@import model.ReportProblemForm\n@import views.html.components.{Layout, InputText, InputHidden, InputCharacterCount, Heading1, Heading2, Paragraph}\n\n@this(\n inputCharacterCount: InputCharacterCount,\n govukInput: GovukInput,\n inputHidden: InputHidden,\n inputText: InputText,\n govukButton: GovukButton,\n govukFieldset: GovukFieldset,\n govukErrorSummary: GovukErrorSummary,\n formWithCSRF: PlayFrontendFormWithCSRF,\n mainLayout: Layout,\n h1: Heading1,\n h2: Heading2,\n p: Paragraph\n)\n@(problemReportForm: Form[ReportProblemForm], action: Call)(implicit request: RequestHeader, messages: Messages, appConfig: AppConfig)\n\n@pageTitle = @{\n if(problemReportForm.hasErrors){Messages(\"error.browser.title.prefix\") + \" \" + Messages(\"problem_report.title\")}\n else Messages(\"problem_report.title\")\n}\n\n@mainLayout(pageTitle) {\n @if(problemReportForm.errors.nonEmpty) {\n @govukErrorSummary(ErrorSummary().withFormErrorsAsText(problemReportForm))\n }\n @h1(content = Text(messages(\"problem_report.heading\")))\n @p(content = Text(messages(\"problem_report.paragraph.1\")))\n @p(content = Text(messages(\"problem_report.paragraph.2\")))\n @formWithCSRF(action, Symbol(\"id\") -> \"error-feedback-form\") {\n @inputHidden(problemReportForm(\"service\"))\n @inputHidden(problemReportForm(\"referrer\"))\n @inputHidden(problemReportForm(\"userAction\"))\n @inputText(\n problemReportForm(\"report-name\"),\n label = messages(\"problem_report.name.label\"),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"name\")\n )\n @inputText(\n problemReportForm(\"report-email\"),\n inputType = \"email\",\n label = messages(\"problem_report.email.label\"),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"email\")\n )\n @inputCharacterCount(\n problemReportForm(\"report-action\"),\n label = messages(\"problem_report.action.label\"),\n classes = \"govuk-!-width-two-thirds\",\n maxLength = Some(1000)\n )\n @inputCharacterCount(\n problemReportForm(\"report-error\"),\n label = messages(\"problem_report.error.label\"),\n classes = \"govuk-!-width-two-thirds\",\n maxLength = Some(1000)\n )\n @govukButton(Button(\n content = Text(messages(\"problem_report.button\")),\n inputType = Some(\"submit\"),\n preventDoubleClick = Some(true)\n ))\n }\n}\n","usages":["@govukErrorSummary(ErrorSummary().withFormErrorsAsText(problemReportForm))"]}
{"repoName":"contact-frontend","templatePath":"app/views/ReportProblemPage.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formWithCSRF","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.FormWithCSRF as PlayFrontendFormWithCSRF\n@import uk.gov.hmrc.hmrcfrontend.views.html.components.implicits.*\n@import model.ReportProblemForm\n@import views.html.components.{Layout, InputText, InputHidden, InputCharacterCount, Heading1, Heading2, Paragraph}\n\n@this(\n inputCharacterCount: InputCharacterCount,\n govukInput: GovukInput,\n inputHidden: InputHidden,\n inputText: InputText,\n govukButton: GovukButton,\n govukFieldset: GovukFieldset,\n govukErrorSummary: GovukErrorSummary,\n formWithCSRF: PlayFrontendFormWithCSRF,\n mainLayout: Layout,\n h1: Heading1,\n h2: Heading2,\n p: Paragraph\n)\n@(problemReportForm: Form[ReportProblemForm], action: Call)(implicit request: RequestHeader, messages: Messages, appConfig: AppConfig)\n\n@pageTitle = @{\n if(problemReportForm.hasErrors){Messages(\"error.browser.title.prefix\") + \" \" + Messages(\"problem_report.title\")}\n else Messages(\"problem_report.title\")\n}\n\n@mainLayout(pageTitle) {\n @if(problemReportForm.errors.nonEmpty) {\n @govukErrorSummary(ErrorSummary().withFormErrorsAsText(problemReportForm))\n }\n @h1(content = Text(messages(\"problem_report.heading\")))\n @p(content = Text(messages(\"problem_report.paragraph.1\")))\n @p(content = Text(messages(\"problem_report.paragraph.2\")))\n @formWithCSRF(action, Symbol(\"id\") -> \"error-feedback-form\") {\n @inputHidden(problemReportForm(\"service\"))\n @inputHidden(problemReportForm(\"referrer\"))\n @inputHidden(problemReportForm(\"userAction\"))\n @inputText(\n problemReportForm(\"report-name\"),\n label = messages(\"problem_report.name.label\"),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"name\")\n )\n @inputText(\n problemReportForm(\"report-email\"),\n inputType = \"email\",\n label = messages(\"problem_report.email.label\"),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false),\n autocomplete = Some(\"email\")\n )\n @inputCharacterCount(\n problemReportForm(\"report-action\"),\n label = messages(\"problem_report.action.label\"),\n classes = \"govuk-!-width-two-thirds\",\n maxLength = Some(1000)\n )\n @inputCharacterCount(\n problemReportForm(\"report-error\"),\n label = messages(\"problem_report.error.label\"),\n classes = \"govuk-!-width-two-thirds\",\n maxLength = Some(1000)\n )\n @govukButton(Button(\n content = Text(messages(\"problem_report.button\")),\n inputType = Some(\"submit\"),\n preventDoubleClick = Some(true)\n ))\n }\n}\n","usages":["@formWithCSRF(action, Symbol(\"id\") -> \"error-feedback-form\")"]}
{"repoName":"contact-frontend","templatePath":"app/views/SurveyConfirmationPage.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukPanel#","variableName":"govukPanel","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import views.html.components.Layout\n\n@this(govukPanel: GovukPanel, govukBackLink: GovukBackLink, mainLayout: Layout)\n@()(implicit request: RequestHeader, messages: Messages, appConfig: AppConfig)\n@mainLayout(pageTitle = messages(\"survey.title\")) {\n @govukPanel(Panel(title = Text(messages(\"survey.confirmation.title\"))))\n}\n","usages":["@govukPanel(Panel(title = Text(messages(\"survey.confirmation.title\"))))"]}
{"repoName":"contact-frontend","templatePath":"app/views/SurveyConfirmationPage.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukBackLink#","variableName":"govukBackLink","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import views.html.components.Layout\n\n@this(govukPanel: GovukPanel, govukBackLink: GovukBackLink, mainLayout: Layout)\n@()(implicit request: RequestHeader, messages: Messages, appConfig: AppConfig)\n@mainLayout(pageTitle = messages(\"survey.title\")) {\n @govukPanel(Panel(title = Text(messages(\"survey.confirmation.title\"))))\n}\n","usages":[]}
{"repoName":"contact-frontend","templatePath":"app/views/SurveyPage.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukButton#","variableName":"govukButton","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.FormWithCSRF as PlayFrontendFormWithCSRF\n@import uk.gov.hmrc.hmrcfrontend.views.html.components.implicits.*\n@import model.SurveyForm\n@import views.html.components.{Layout, InputRadios, InputHidden, InputCharacterCount, Heading1}\n\n@this(\n inputCharacterCount: InputCharacterCount,\n inputHidden: InputHidden,\n inputRadios: InputRadios,\n govukButton: GovukButton,\n govukErrorSummary: GovukErrorSummary,\n formWithCSRF: PlayFrontendFormWithCSRF,\n mainLayout: Layout,\n h1: Heading1\n)\n@(surveyForm: Form[SurveyForm], action: Call)(implicit request: RequestHeader, messages: Messages, appConfig: AppConfig)\n\n@pageTitle = @{\n if(surveyForm.hasErrors){messages(\"error.browser.title.prefix\")+\" \"+messages(\"survey.title\")} else messages(\"survey.title\")\n}\n\n@mainLayout(pageTitle) {\n @if(surveyForm.errors.nonEmpty) {\n @govukErrorSummary(ErrorSummary().withFormErrorsAsText(surveyForm))\n }\n @h1(content = Text(messages(\"survey.heading\")))\n @formWithCSRF(action, Symbol(\"id\") -> \"survey-form\") {\n @inputHidden(surveyForm(\"service-id\"))\n @inputHidden(surveyForm(\"ticket-id\"))\n @defining(Seq(\n (\"5\", messages(\"survey.strongly.agree.response\")),\n (\"4\", messages(\"survey.agree.response\")),\n (\"3\", messages(\"survey.neutral.response\")),\n (\"2\", messages(\"survey.disagree.response\")),\n (\"1\", messages(\"survey.strongly.disagree.response\"))\n )) { items =>\n @inputRadios(\n surveyForm(\"helpful\"),\n legend = messages(\"survey.was.answer.helpful.question\"),\n items = items\n )\n @inputRadios(\n surveyForm(\"speed\"),\n legend = messages(\"survey.satisfied.with.speed.question\"),\n items = items\n )\n }\n @inputCharacterCount(\n surveyForm(\"improve\"),\n label = messages(\"survey.tell.us.how.we.can.improve\"),\n maxLength = Some(2500)\n )\n @govukButton(Button(\n content = Text(messages(\"survey.submit\")),\n inputType = Some(\"submit\"),\n preventDoubleClick = Some(true)\n ))\n }\n}\n","usages":["@govukButton(Button(\n content = Text(messages(\"survey.submit\")),\n inputType = Some(\"submit\"),\n preventDoubleClick = Some(true)\n ))"]}
{"repoName":"contact-frontend","templatePath":"app/views/SurveyPage.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukErrorSummary#","variableName":"govukErrorSummary","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.FormWithCSRF as PlayFrontendFormWithCSRF\n@import uk.gov.hmrc.hmrcfrontend.views.html.components.implicits.*\n@import model.SurveyForm\n@import views.html.components.{Layout, InputRadios, InputHidden, InputCharacterCount, Heading1}\n\n@this(\n inputCharacterCount: InputCharacterCount,\n inputHidden: InputHidden,\n inputRadios: InputRadios,\n govukButton: GovukButton,\n govukErrorSummary: GovukErrorSummary,\n formWithCSRF: PlayFrontendFormWithCSRF,\n mainLayout: Layout,\n h1: Heading1\n)\n@(surveyForm: Form[SurveyForm], action: Call)(implicit request: RequestHeader, messages: Messages, appConfig: AppConfig)\n\n@pageTitle = @{\n if(surveyForm.hasErrors){messages(\"error.browser.title.prefix\")+\" \"+messages(\"survey.title\")} else messages(\"survey.title\")\n}\n\n@mainLayout(pageTitle) {\n @if(surveyForm.errors.nonEmpty) {\n @govukErrorSummary(ErrorSummary().withFormErrorsAsText(surveyForm))\n }\n @h1(content = Text(messages(\"survey.heading\")))\n @formWithCSRF(action, Symbol(\"id\") -> \"survey-form\") {\n @inputHidden(surveyForm(\"service-id\"))\n @inputHidden(surveyForm(\"ticket-id\"))\n @defining(Seq(\n (\"5\", messages(\"survey.strongly.agree.response\")),\n (\"4\", messages(\"survey.agree.response\")),\n (\"3\", messages(\"survey.neutral.response\")),\n (\"2\", messages(\"survey.disagree.response\")),\n (\"1\", messages(\"survey.strongly.disagree.response\"))\n )) { items =>\n @inputRadios(\n surveyForm(\"helpful\"),\n legend = messages(\"survey.was.answer.helpful.question\"),\n items = items\n )\n @inputRadios(\n surveyForm(\"speed\"),\n legend = messages(\"survey.satisfied.with.speed.question\"),\n items = items\n )\n }\n @inputCharacterCount(\n surveyForm(\"improve\"),\n label = messages(\"survey.tell.us.how.we.can.improve\"),\n maxLength = Some(2500)\n )\n @govukButton(Button(\n content = Text(messages(\"survey.submit\")),\n inputType = Some(\"submit\"),\n preventDoubleClick = Some(true)\n ))\n }\n}\n","usages":["@govukErrorSummary(ErrorSummary().withFormErrorsAsText(surveyForm))"]}
{"repoName":"contact-frontend","templatePath":"app/views/SurveyPage.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formWithCSRF","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.FormWithCSRF as PlayFrontendFormWithCSRF\n@import uk.gov.hmrc.hmrcfrontend.views.html.components.implicits.*\n@import model.SurveyForm\n@import views.html.components.{Layout, InputRadios, InputHidden, InputCharacterCount, Heading1}\n\n@this(\n inputCharacterCount: InputCharacterCount,\n inputHidden: InputHidden,\n inputRadios: InputRadios,\n govukButton: GovukButton,\n govukErrorSummary: GovukErrorSummary,\n formWithCSRF: PlayFrontendFormWithCSRF,\n mainLayout: Layout,\n h1: Heading1\n)\n@(surveyForm: Form[SurveyForm], action: Call)(implicit request: RequestHeader, messages: Messages, appConfig: AppConfig)\n\n@pageTitle = @{\n if(surveyForm.hasErrors){messages(\"error.browser.title.prefix\")+\" \"+messages(\"survey.title\")} else messages(\"survey.title\")\n}\n\n@mainLayout(pageTitle) {\n @if(surveyForm.errors.nonEmpty) {\n @govukErrorSummary(ErrorSummary().withFormErrorsAsText(surveyForm))\n }\n @h1(content = Text(messages(\"survey.heading\")))\n @formWithCSRF(action, Symbol(\"id\") -> \"survey-form\") {\n @inputHidden(surveyForm(\"service-id\"))\n @inputHidden(surveyForm(\"ticket-id\"))\n @defining(Seq(\n (\"5\", messages(\"survey.strongly.agree.response\")),\n (\"4\", messages(\"survey.agree.response\")),\n (\"3\", messages(\"survey.neutral.response\")),\n (\"2\", messages(\"survey.disagree.response\")),\n (\"1\", messages(\"survey.strongly.disagree.response\"))\n )) { items =>\n @inputRadios(\n surveyForm(\"helpful\"),\n legend = messages(\"survey.was.answer.helpful.question\"),\n items = items\n )\n @inputRadios(\n surveyForm(\"speed\"),\n legend = messages(\"survey.satisfied.with.speed.question\"),\n items = items\n )\n }\n @inputCharacterCount(\n surveyForm(\"improve\"),\n label = messages(\"survey.tell.us.how.we.can.improve\"),\n maxLength = Some(2500)\n )\n @govukButton(Button(\n content = Text(messages(\"survey.submit\")),\n inputType = Some(\"submit\"),\n preventDoubleClick = Some(true)\n ))\n }\n}\n","usages":["@formWithCSRF(action, Symbol(\"id\") -> \"survey-form\")"]}
{"repoName":"help-frontend","templatePath":"app/uk/gov/hmrc/helpfrontend/views/CookiesPage.scala.html","component":"uk/gov/hmrc/hmrcfrontend/views/html/helpers/HmrcNewTabLinkHelper#","variableName":"newTabLinkHelper","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.helpfrontend.config.AppConfig\n@import uk.gov.hmrc.helpfrontend.views.html.{CookiesTable, Layout}\n@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcNewTabLinkHelper\n@import uk.gov.hmrc.hmrcfrontend.views.viewmodels.newtablinkhelper.NewTabLinkHelper\n\n@this(layout: Layout, newTabLinkHelper: HmrcNewTabLinkHelper, cookiesTable: CookiesTable)\n\n@()(implicit request: Request[_], messages: Messages, appConfig: AppConfig)\n@surveyLink = {\n @newTabLinkHelper(NewTabLinkHelper(\n href = Some(messages(\"help.cookies.how_used.satisfaction_survey.link.url\")),\n text = messages(\"help.cookies.how_used.satisfaction_survey.link.text\"))\n )\n}\n@layout(pageTitle = Some(messages(\"help.cookies.title\"))) {\n <h1 class=\"govuk-heading-xl\" id=\"cookies-heading\">@messages(\"help.cookies.heading\")</h1>\n <p class=\"govuk-body\" id=\"cookies-info\">@messages(\"help.cookies.info\")</p>\n <p class=\"govuk-body\" id=\"cookies-usages\">@messages(\"help.cookies.usages.list_info\")</p>\n <ul class=\"govuk-list govuk-list--bullet\" id=\"cookies-usages-bullets\">\n <li id=\"cookies-usages-bullets1\" >@messages(\"help.cookies.usages.list_item.1\")</li>\n <li id=\"cookies-usages-bullets2\">@messages(\"help.cookies.usages.list_item.2\")</li>\n </ul>\n <div class=\"govuk-inset-text\" id=\"cookies-inset-text\">\n <p class=\"govuk-body\">@messages(\"help.cookies.notice\")</p>\n </div>\n <p class=\"govuk-body\" id=\"cookies-paragraph-1\">@messages(\"help.cookies.paragraph.1\")</p>\n <p class=\"govuk-body\" id=\"cookies-more-about\">\n @messages(\"help.cookies.paragraph.2\")\n @newTabLinkHelper(NewTabLinkHelper(\n href = Some(messages(\"help.cookies.link.manage_cookies.url\")),\n text = messages(\"help.cookies.link.manage_cookies.text\")\n ))@messages(\"general.fullstop\")\n </p>\n <h2 class=\"govuk-heading-l\" id=\"cookies-are-used\">@messages(\"help.cookies.how_used.heading\")</h2>\n\n <h3 class=\"govuk-heading-m\" id=\"cookies-website-usage\">@messages(\"help.cookies.how_used.measuring_usage.heading\")</h3>\n <p class=\"govuk-body\" id=\"cookies-analytics-paragraph-1\">@messages(\"help.cookies.how_used.measuring_usage.info\")</p>\n <p class=\"govuk-body\" id=\"cookies-analytics-paragraph-2\">@messages(\"help.cookies.how_used.measuring_usage.list_info\")</p>\n <ul class=\"govuk-list govuk-list--bullet\" id=\"cookies-analytics-bullets\">\n <li id=\"cookies-analytics-bullets1\">@messages(\"help.cookies.how_used.measuring_usage.list_item.1\")</li>\n <li id=\"cookies-analytics-bullets2\">@messages(\"help.cookies.how_used.measuring_usage.list_item.2\")</li>\n <li id=\"cookies-analytics-bullets3\">@messages(\"help.cookies.how_used.measuring_usage.list_item.3\")</li>\n </ul>\n <p class=\"govuk-body\" id=\"cookies-analytics-paragraph-3\">@messages(\"help.cookies.how_used.measuring_usage.paragraph.1\")</p>\n <div class=\"govuk-inset-text\" id=\"cookies-analytics-inset-text\">\n <p class=\"govuk-body\">@messages(\"help.cookies.how_used.measuring_usage.notice\")</p>\n </div>\n @cookiesTable(\n id = \"cookies-analytics-table\",\n section = \"measuring_usage\",\n cookieIds = Seq(\"gat\", \"gds\", \"ga\", \"nextpage\")\n )\n <p class=\"govuk-body\" id=\"cookies-analytics-opt-out\">\n @messages(\"help.cookies.how_used.measuring_usage.opt_out.info\")\n @newTabLinkHelper(NewTabLinkHelper(\n href = Some(messages(\"help.cookies.how_used.measuring_usage.opt_out.link.url\")),\n text = messages(\"help.cookies.how_used.measuring_usage.opt_out.link.text\")\n ))@messages(\"general.fullstop\")\n </p>\n\n <h3 class=\"govuk-heading-m\" id=\"cookies-versions-heading\">@messages(\"help.cookies.how_used.optimizely.heading\")</h3>\n <p class=\"govuk-body\" id=\"cookies-versions-paragraph-1\">@messages(\"help.cookies.how_used.optimizely.info\")</p>\n @cookiesTable(\n id = \"cookies-versions-table\",\n section = \"optimizely\",\n cookieIds = Seq(\"optimizelyEndUserId\", \"optimizelyRedirectData\", \"optimizelyOptOut\")\n )\n\n <h3 class=\"govuk-heading-m\" id=\"cookies-consent-heading\">@messages(\"help.cookies.how_used.userconsent.heading\")</h3>\n <p class=\"govuk-body\" id=\"cookies-consent-paragraph-1\">@messages(\"help.cookies.how_used.userconsent.info\")</p>\n @cookiesTable(\n id = \"cookies-consent-table\",\n section = \"userconsent\",\n cookieIds = Seq(\"userConsent\")\n )\n\n <h3 class=\"govuk-heading-m\" id=\"cookies-sessions-heading\">@messages(\"help.cookies.how_used.sessions.heading\")</h3>\n <p class=\"govuk-body\" id=\"cookies-sessions-paragraph\">@messages(\"help.cookies.how_used.sessions.info\")</p>\n @cookiesTable(\n id = \"cookies-sessions-table\",\n section = \"sessions\",\n cookieIds = Seq(\"mdtp\", \"mdtpp\", \"mdtpdf\", \"mdtprc\", \"PLAY_FLASH\", \"PLAY_LANG\", \"remme\", \"mdtpdi\")\n )\n\n <h3 class=\"govuk-heading-m\" id=\"cookies-introductory-heading\">@messages(\"help.cookies.how_used.intro_message.heading\")</h3>\n <p class=\"govuk-body\" id=\"cookies-introductory-paragraph\">@messages(\"help.cookies.how_used.intro_message.info\")</p>\n @cookiesTable(\n id = \"cookies-introductory-table\",\n section = \"intro_message\",\n cookieIds = Seq(\"seen_message\")\n )\n\n <h3 class=\"govuk-heading-m\" id=\"cookies-user-research-heading\">@messages(\"help.cookies.how_used.user_research_banner.heading\")</h3>\n <p class=\"govuk-body\" id=\"cookies-user-research-paragraph\">@messages(\"help.cookies.how_used.user_research_banner.info\")</p>\n @cookiesTable(\n id = \"cookies-user-research-table\",\n section = \"user_research_banner\",\n cookieIds = Seq(\"mdtpurr\")\n )\n\n <h3 class=\"govuk-heading-m\" id=\"cookies-satisfaction-survey-heading\">@messages(\"help.cookies.how_used.satisfaction_survey.heading\")</h3>\n <p class=\"govuk-body\" id=\"cookies-satisfaction-survey-paragraph\">\n @Html(messages(\"help.cookies.how_used.satisfaction_survey.info\", surveyLink))\n </p>\n @cookiesTable(\n id = \"cookies-satisfaction-survey-table\",\n section = \"satisfaction_survey\",\n cookieIds = Seq(\"mbox\", \"ssoe\", \"ts\", \"ep201\", \"ep202\")\n )\n\n <h3 class=\"govuk-heading-m\" id=\"cookies-digital-assistant-heading\">@messages(\"help.cookies.how_used.digital_assistant.heading\")</h3>\n <p class=\"govuk-body\" id=\"cookies-digital-assistant-paragraph\">@messages(\"help.cookies.how_used.digital_assistant.info\")</p>\n @cookiesTable(\n id = \"cookies-digital-assistant-table\",\n section = \"digital_assistant\",\n cookieIds = Seq(\"inqCA\", \"inqVital\", \"tcSrv\", \"inqSession\", \"inqState\", \"JSESSIONID\"),\n captionKey = None\n )\n\n <h3 class=\"govuk-heading-m\" id=\"cookies-javascript-detection-heading\">@messages(\"help.cookies.how_used.javascript_detection.heading\")</h3>\n <p class=\"govuk-body\" id=\"cookies-javascript-detection-paragraph\">@messages(\"help.cookies.how_used.javascript_detection.info\")</p>\n @cookiesTable(\n id = \"cookies-javascript-detection-table\",\n section = \"javascript_detection\",\n cookieIds = Seq(\"js_detection\")\n )\n\n <h3 class=\"govuk-heading-m\" id=\"cookies-tracking-consent-settings-heading\">@messages(\"help.cookies.settings.heading\")</h3>\n <p class=\"govuk-body\" id=\"cookies-tracking-consent-settings-paragraph\">\n @messages(\"help.cookies.settings.info\")\n @newTabLinkHelper(NewTabLinkHelper(\n href = Some(messages(\"help.cookies.settings.tracking_consent.url\")),\n text = messages(\"help.cookies.settings.tracking_consent.text\")\n ))@messages(\"general.fullstop\")\n </p>\n}\n","usages":["@newTabLinkHelper(NewTabLinkHelper(\n href = Some(messages(\"help.cookies.how_used.satisfaction_survey.link.url\")),\n text = messages(\"help.cookies.how_used.satisfaction_survey.link.text\"))\n )","@newTabLinkHelper(NewTabLinkHelper(\n href = Some(messages(\"help.cookies.link.manage_cookies.url\")),\n text = messages(\"help.cookies.link.manage_cookies.text\")\n ))","@newTabLinkHelper(NewTabLinkHelper(\n href = Some(messages(\"help.cookies.how_used.measuring_usage.opt_out.link.url\")),\n text = messages(\"help.cookies.how_used.measuring_usage.opt_out.link.text\")\n ))","@newTabLinkHelper(NewTabLinkHelper(\n href = Some(messages(\"help.cookies.settings.tracking_consent.url\")),\n text = messages(\"help.cookies.settings.tracking_consent.text\")\n ))"]}
{"repoName":"help-frontend","templatePath":"app/uk/gov/hmrc/helpfrontend/views/CookiesTable.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukTable#","variableName":"govukTable","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.helpfrontend.viewmodels.Cookie\n\n@this(govukTable: GovukTable)\n\n@(id: String, section: String, cookieIds: Seq[String], captionKey: Option[String] = Some(\"help.cookies.how_used.default.table.caption\"),\n captionClasses: String = \"\")(implicit messages: Messages)\n@cookies = @{\n for (cookieId <- cookieIds) yield\n Cookie(\n messages(s\"help.cookies.how_used.$section.table.$cookieId.name\"),\n messages(s\"help.cookies.how_used.$section.table.$cookieId.purpose\"),\n messages(s\"help.cookies.how_used.$section.table.$cookieId.expires\")\n )\n}\n@govukTable(Table(\n attributes = Map(\"id\" -> id),\n rows = for (cookie <- cookies) yield Seq(\n TableRow(content = Text(cookie.name)),\n TableRow(content = Text(cookie.purpose)),\n TableRow(content = Text(cookie.expires))\n ),\n head = Some(Seq(\n HeadCell(content = Text(messages(\"help.cookies.table.header.name\"))),\n HeadCell(content = Text(messages(\"help.cookies.table.header.purpose\"))),\n HeadCell(content = Text(messages(\"help.cookies.table.header.expires\")))\n )),\n caption = captionKey.map(messages(_)),\n captionClasses = captionClasses\n))\n","usages":["@govukTable(Table(\n attributes = Map(\"id\" -> id),\n rows = for (cookie <- cookies) yield Seq(\n TableRow(content = Text(cookie.name)),\n TableRow(content = Text(cookie.purpose)),\n TableRow(content = Text(cookie.expires))\n ),\n head = Some(Seq(\n HeadCell(content = Text(messages(\"help.cookies.table.header.name\"))),\n HeadCell(content = Text(messages(\"help.cookies.table.header.purpose\"))),\n HeadCell(content = Text(messages(\"help.cookies.table.header.expires\")))\n )),\n caption = captionKey.map(messages(_)),\n captionClasses = captionClasses\n))"]}
{"repoName":"help-frontend","templatePath":"app/uk/gov/hmrc/helpfrontend/views/Layout.scala.html","component":"uk/gov/hmrc/hmrcfrontend/views/html/helpers/HmrcReportTechnicalIssueHelper#","variableName":"hmrcReportTechnicalIssueHelper","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.helpfrontend.config.AppConfig\n@import uk.gov.hmrc.hmrcfrontend.views.viewmodels.hmrcstandardpage.{HmrcStandardPageParams, Banners, ServiceURLs}\n\n@this(\n hmrcReportTechnicalIssueHelper: HmrcReportTechnicalIssueHelper,\n hmrcLayout: HmrcStandardPage\n)\n@(pageTitle: Option[String] = None)(contentBlock: Html)(implicit request: RequestHeader, messages: Messages, appConfig: AppConfig)\n\n@content = {\n @contentBlock\n @hmrcReportTechnicalIssueHelper()\n}\n\n@hmrcLayout(HmrcStandardPageParams(\n pageTitle = pageTitle,\n banners = Banners(displayHmrcBanner = true),\n isWelshTranslationAvailable = true,\n serviceURLs = ServiceURLs(accessibilityStatementUrl = appConfig.accessibilityStatementUrl)\n))(content)\n","usages":["@hmrcReportTechnicalIssueHelper()"]}
{"repoName":"help-frontend","templatePath":"app/uk/gov/hmrc/helpfrontend/views/Layout.scala.html","component":"uk/gov/hmrc/hmrcfrontend/views/html/helpers/HmrcStandardPage#","variableName":"hmrcLayout","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.helpfrontend.config.AppConfig\n@import uk.gov.hmrc.hmrcfrontend.views.viewmodels.hmrcstandardpage.{HmrcStandardPageParams, Banners, ServiceURLs}\n\n@this(\n hmrcReportTechnicalIssueHelper: HmrcReportTechnicalIssueHelper,\n hmrcLayout: HmrcStandardPage\n)\n@(pageTitle: Option[String] = None)(contentBlock: Html)(implicit request: RequestHeader, messages: Messages, appConfig: AppConfig)\n\n@content = {\n @contentBlock\n @hmrcReportTechnicalIssueHelper()\n}\n\n@hmrcLayout(HmrcStandardPageParams(\n pageTitle = pageTitle,\n banners = Banners(displayHmrcBanner = true),\n isWelshTranslationAvailable = true,\n serviceURLs = ServiceURLs(accessibilityStatementUrl = appConfig.accessibilityStatementUrl)\n))(content)\n","usages":["@hmrcLayout(HmrcStandardPageParams(\n pageTitle = pageTitle,\n banners = Banners(displayHmrcBanner = true),\n isWelshTranslationAvailable = true,\n serviceURLs = ServiceURLs(accessibilityStatementUrl = appConfig.accessibilityStatementUrl)\n))"]}
{"repoName":"help-frontend","templatePath":"app/uk/gov/hmrc/helpfrontend/views/TermsAndConditionsPage.scala.html","component":"uk/gov/hmrc/hmrcfrontend/views/html/helpers/HmrcNewTabLinkHelper#","variableName":"hmrcNewTabLinkHelper","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.helpfrontend.config.AppConfig\n@import uk.gov.hmrc.helpfrontend.controllers.routes\n@import uk.gov.hmrc.helpfrontend.views.html.Layout\n@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcNewTabLinkHelper\n@import uk.gov.hmrc.hmrcfrontend.views.viewmodels.newtablinkhelper.NewTabLinkHelper\n\n@this(layout: Layout, hmrcNewTabLinkHelper: HmrcNewTabLinkHelper)\n\n@()(implicit request: Request[_], messages: Messages, appConfig: AppConfig)\n@* Privacy policy is no longer part of this service, but is served via a redirect in MDTP frontend routes *@\n@privacyLink = { <a class=\"govuk-link\" href=\"@{routes.HelpController.index.url}/privacy\">@messages(\"help.links.privacy_policy.text.lower_case\")</a> }\n@layout(pageTitle = Some(messages(\"help.terms_and_conditions.title\"))) {\n <h1 class=\"govuk-heading-xl\">@messages(\"help.terms_and_conditions.heading\")</h1>\n <h2 class=\"govuk-heading-l\" id=\"disclaimer\">@messages(\"help.terms_and_conditions.disclaimer.heading\")</h2>\n <p class=\"govuk-body\">\n @messages(\"help.terms_and_conditions.disclaimer.paragraph.1\")\n @privacyLink\n </p>\n <p class=\"govuk-body\">@messages(\"help.terms_and_conditions.disclaimer.paragraph.2\")</p>\n <p class=\"govuk-body\">@messages(\"help.terms_and_conditions.disclaimer.paragraph.3\")</p>\n <p class=\"govuk-body\">@messages(\"help.terms_and_conditions.disclaimer.paragraph.4\")</p>\n <h2 class=\"govuk-heading-l\" id=\"usage\">@messages(\"help.terms_and_conditions.usage.heading\")</h2>\n <p class=\"govuk-body\">@messages(\"help.terms_and_conditions.usage.paragraph.1\")</p>\n <p class=\"govuk-body\">@messages(\"help.terms_and_conditions.usage.paragraph.2\")</p>\n <p class=\"govuk-body\">@messages(\"help.terms_and_conditions.usage.paragraph.3\")</p>\n <p class=\"govuk-body\">\n @messages(\"help.terms_and_conditions.usage.paragraph.4\")\n <a href=\"#disclaimer\" class=\"govuk-link\">@messages(\"help.terms_and_conditions.disclaimer.link.text\")</a>@messages(\"general.fullstop\")\n </p>\n <h2 class=\"govuk-heading-l\" id=\"online-services\">@messages(\"help.terms_and_conditions.online_services.heading\")</h2>\n <p class=\"govuk-body\">\n @Html(messages(\"help.terms_and_conditions.online_services.paragraph.1\", hmrcNewTabLinkHelper(NewTabLinkHelper(\n href = Some(messages(\"help.links.hmrc.terms_and_conditions.url\")),\n text = messages(\"help.links.terms_and_conditions.text.lower_case\")\n ))))\n </p>\n <p class=\"govuk-body\">\n @messages(\"help.terms_and_conditions.online_services.paragraph.2\")\n @hmrcNewTabLinkHelper(NewTabLinkHelper(\n href = Some(messages(\"help.links.online_security.url\")),\n text = messages(\"help.links.online_security.text\")\n ))@messages(\"general.fullstop\")\n <h2 class=\"govuk-heading-l\" id=\"copyright\">@messages(\"help.terms_and_conditions.copyright.heading\")</h2>\n <p class=\"govuk-body\">\n @messages(\"help.terms_and_conditions.copyright.paragraph.1\")\n @hmrcNewTabLinkHelper(NewTabLinkHelper(\n href = Some(messages(\"help.links.copyright_notice.url\")),\n text = messages(\"help.links.copyright_notice.text\")\n ))@messages(\"general.fullstop\")\n </p>\n <p class=\"govuk-body\">@messages(\"help.terms_and_conditions.copyright.paragraph.2\")</p>\n <p class=\"govuk-body\">@messages(\"help.terms_and_conditions.copyright.paragraph.3\")</p>\n <p class=\"govuk-body\">\n @hmrcNewTabLinkHelper(NewTabLinkHelper(\n href = Some(messages(\"help.links.agents_as_authorised.url\")),\n text = messages(\"help.links.agents_as_authorised.text\")\n ))\n </p>\n <h2 class=\"govuk-heading-l\" id=\"linking\">@messages(\"help.terms_and_conditions.linking.heading\")</h2>\n <p class=\"govuk-body\">@messages(\"help.terms_and_conditions.linking.paragraph.1\")</p>\n <h2 class=\"govuk-heading-l\">@messages(\"help.terms_and_conditions.external_links.heading\")</h2>\n <p class=\"govuk-body\">@messages(\"help.terms_and_conditions.external_links.paragraph.1\")</p>\n <h2 class=\"govuk-heading-l\">@messages(\"help.terms_and_conditions.virus_protection.heading\")</h2>\n <p class=\"govuk-body\">@messages(\"help.terms_and_conditions.virus_protection.paragraph.1\")</p>\n <h2 class=\"govuk-heading-l\">@messages(\"help.terms_and_conditions.privacy_policy.heading\")</h2>\n <p class=\"govuk-body\">\n @Html(messages(\"help.terms_and_conditions.privacy_policy.paragraph.1\", privacyLink))\n </p>\n <h2 class=\"govuk-heading-l\">@messages(\"help.terms_and_conditions.governing_law.heading\")</h2>\n <p class=\"govuk-body\">@messages(\"help.terms_and_conditions.governing_law.paragraph.1\")</p>\n <p class=\"govuk-body\">@messages(\"help.terms_and_conditions.updated.text\")</p>\n}\n","usages":["hmrcNewTabLinkHelper(NewTabLinkHelper(\n href = Some(messages(\"help.links.hmrc.terms_and_conditions.url\")),\n text = messages(\"help.links.terms_and_conditions.text.lower_case\")\n ))","@hmrcNewTabLinkHelper(NewTabLinkHelper(\n href = Some(messages(\"help.links.online_security.url\")),\n text = messages(\"help.links.online_security.text\")\n ))","@hmrcNewTabLinkHelper(NewTabLinkHelper(\n href = Some(messages(\"help.links.copyright_notice.url\")),\n text = messages(\"help.links.copyright_notice.text\")\n ))","@hmrcNewTabLinkHelper(NewTabLinkHelper(\n href = Some(messages(\"help.links.agents_as_authorised.url\")),\n text = messages(\"help.links.agents_as_authorised.text\")\n ))"]}
{"repoName":"tracking-consent-frontend","templatePath":"app/uk/gov/hmrc/trackingconsentfrontend/views/components/Layout.scala.html","component":"uk/gov/hmrc/hmrcfrontend/views/html/helpers/HmrcStandardPage#","variableName":"hmrcStandardPage","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcStandardPage\n@import uk.gov.hmrc.hmrcfrontend.views.viewmodels.hmrcstandardpage.*\n\n@this(hmrcStandardPage: HmrcStandardPage)\n\n@(pageTitle: Option[String] = None,\n headBlock: Option[Html] = None,\n scriptsBlock: Option[Html] = None\n)(contentBlock: Html)(implicit request: RequestHeader, messages: Messages)\n\n@hmrcStandardPage(HmrcStandardPageParams(\n templateOverrides = TemplateOverrides(\n additionalHeadBlock = headBlock,\n additionalScriptsBlock = scriptsBlock\n ),\n pageTitle = pageTitle,\n isWelshTranslationAvailable = true\n))(contentBlock)\n","usages":["@hmrcStandardPage(HmrcStandardPageParams(\n templateOverrides = TemplateOverrides(\n additionalHeadBlock = headBlock,\n additionalScriptsBlock = scriptsBlock\n ),\n pageTitle = pageTitle,\n isWelshTranslationAvailable = true\n))"]}
{"repoName":"tracking-consent-frontend","templatePath":"app/uk/gov/hmrc/trackingconsentfrontend/views/MeasurementRadio.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukRadios#","variableName":"govukRadios","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@this(govukRadios : GovukRadios)\n\n@(messages: Messages, paragraph: Paragraph, h2: H2)\n\n@hintText = {\n @paragraph(content = Text(messages(\"cookieSettings.measurement.paragraph1\")))\n @paragraph(content = Text(messages(\"cookieSettings.measurement.paragraph2\")))\n <ul class=\"govuk-list govuk-list--bullet\">\n <li>@messages(\"cookieSettings.measurement.bullet1\")</li>\n <li>@messages(\"cookieSettings.measurement.bullet2\")</li>\n <li>@messages(\"cookieSettings.measurement.bullet3\")</li>\n </ul>\n}\n\n@govukRadios(Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = HtmlContent(h2(Text(messages(\"cookieSettings.measurement.title\")))),\n isPageHeading = false\n ))\n )),\n hint = Some(Hint(\n content = HtmlContent(hintText)\n )),\n idPrefix = Some(messages(\"cookieSettings.measurement.settingid\")),\n name = messages(\"cookieSettings.measurement.settingid\"),\n items = Seq(\n RadioItem(\n content = Text(messages(\"cookieSettings.measurement.settinglabel.on\")),\n value = Some(messages(\"cookieSettings.onValue\"))\n ),\n RadioItem(\n content = Text(messages(\"cookieSettings.measurement.settinglabel.off\")),\n value = Some(messages(\"cookieSettings.offValue\"))\n )\n )\n))","usages":["@govukRadios(Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = HtmlContent(h2(Text(messages(\"cookieSettings.measurement.title\")))),\n isPageHeading = false\n ))\n )),\n hint = Some(Hint(\n content = HtmlContent(hintText)\n )),\n idPrefix = Some(messages(\"cookieSettings.measurement.settingid\")),\n name = messages(\"cookieSettings.measurement.settingid\"),\n items = Seq(\n RadioItem(\n content = Text(messages(\"cookieSettings.measurement.settinglabel.on\")),\n value = Some(messages(\"cookieSettings.onValue\"))\n ),\n RadioItem(\n content = Text(messages(\"cookieSettings.measurement.settinglabel.off\")),\n value = Some(messages(\"cookieSettings.offValue\"))\n )\n )\n))"]}
{"repoName":"tracking-consent-frontend","templatePath":"app/uk/gov/hmrc/trackingconsentfrontend/views/SettingsRadio.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukRadios#","variableName":"govukRadios","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@this(govukRadios : GovukRadios)\n\n@(messages: Messages, paragraph: Paragraph, h2: H2)\n\n@settingsText = {\n <h2 class=\"govuk-heading-m\">@messages(\"cookieSettings.settings.title\")</h2>\n}\n\n@govukRadios(Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = HtmlContent(settingsText),\n isPageHeading = false\n ))\n )),\n hint = Some(Hint(\n content = Text(messages(\"cookieSettings.settings.paragraph1\"))\n )),\n idPrefix = Some(messages(\"cookieSettings.settings.settingid\")),\n name = messages(\"cookieSettings.settings.settingid\"),\n items = Seq(\n RadioItem(\n content = Text(messages(\"cookieSettings.settings.settinglabel.on\")),\n value = Some(messages(\"cookieSettings.onValue\"))\n ),\n RadioItem(\n content = Text(messages(\"cookieSettings.settings.settinglabel.off\")),\n value = Some(messages(\"cookieSettings.offValue\"))\n )\n )\n))","usages":["@govukRadios(Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = HtmlContent(settingsText),\n isPageHeading = false\n ))\n )),\n hint = Some(Hint(\n content = Text(messages(\"cookieSettings.settings.paragraph1\"))\n )),\n idPrefix = Some(messages(\"cookieSettings.settings.settingid\")),\n name = messages(\"cookieSettings.settings.settingid\"),\n items = Seq(\n RadioItem(\n content = Text(messages(\"cookieSettings.settings.settinglabel.on\")),\n value = Some(messages(\"cookieSettings.onValue\"))\n ),\n RadioItem(\n content = Text(messages(\"cookieSettings.settings.settinglabel.off\")),\n value = Some(messages(\"cookieSettings.offValue\"))\n )\n )\n))"]}
{"repoName":"tracking-consent-frontend","templatePath":"app/uk/gov/hmrc/trackingconsentfrontend/views/SupportedBrowser.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukButton#","variableName":"govukButton","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@this(\n h2: H2,\n paragraph: Paragraph,\n necessaryMessage: NecessaryMessage,\n measurementRadio: MeasurementRadio,\n settingsRadio: SettingsRadio,\n govukButton: GovukButton,\n findOutMoreLink: FindOutMoreLink)\n@()(implicit messages: Messages, appConfig: AppConfig)\n\n<div class=\"cookie-settings__supported-browser\">\n @paragraph(content = Text(messages(\"cookieSettings.intro.paragraph3\")))\n @* We include a /dummy action here to avoid warnings about HTTP Parameter Overrides in\n ZAP security tests *@\n <form action=\"/dummy\" data-module=\"cookie-settings\" data-on-value=\"@messages(\"cookieSettings.onValue\")\" data-off-value=\"@messages(\"cookieSettings.offValue\")\">\n @necessaryMessage(messages, paragraph, h2)\n @measurementRadio(messages, paragraph, h2)\n @settingsRadio(messages, paragraph, h2)\n @findOutMoreLink()\n @govukButton(Button(\n content = Text(messages(\"cookieSettings.saveButton\"))\n ))\n </form>\n</div>\n","usages":["@govukButton(Button(\n content = Text(messages(\"cookieSettings.saveButton\"))\n ))"]}
{"repoName":"accessibility-statement-frontend","templatePath":"app/uk/gov/hmrc/accessibilitystatementfrontend/views/Layout.scala.html","component":"uk/gov/hmrc/hmrcfrontend/views/html/helpers/HmrcStandardPage#","variableName":"hmrcLayout","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.hmrcfrontend.views.viewmodels.hmrcstandardpage.{HmrcStandardPageParams, Banners}\n\n@this(hmrcLayout: HmrcStandardPage)\n\n@(\n pageTitle: String,\n isWelshTranslationAvailable: Boolean)(\n contentBlock: Html)(implicit request: RequestHeader, messages: Messages)\n\n@hmrcLayout(HmrcStandardPageParams(\n pageTitle = Some(pageTitle),\n banners = Banners(displayHmrcBanner = true),\n isWelshTranslationAvailable = isWelshTranslationAvailable\n))(contentBlock)\n","usages":["@hmrcLayout(HmrcStandardPageParams(\n pageTitle = Some(pageTitle),\n banners = Banners(displayHmrcBanner = true),\n isWelshTranslationAvailable = isWelshTranslationAvailable\n))"]}
{"repoName":"accessibility-statement-frontend","templatePath":"app/uk/gov/hmrc/accessibilitystatementfrontend/views/StatementPage.scala.html","component":"uk/gov/hmrc/hmrcfrontend/views/html/helpers/HmrcReportTechnicalIssueHelper#","variableName":"hmrcReportTechnicalIssueHelper","templateText":"@*\n * Copyright 2023 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.accessibilitystatementfrontend.config.AppConfig\n@import uk.gov.hmrc.accessibilitystatementfrontend.views.html.layouts.*\n@import uk.gov.hmrc.accessibilitystatementfrontend.views.html.Layout\n@import uk.gov.hmrc.accessibilitystatementfrontend.models.*\n@import uk.gov.hmrc.accessibilitystatementfrontend.models.AccessibilityStatement\n\n@this(\n layout: Layout,\n hmrcStatementTemplate: StatementTemplate,\n voaStatementTemplate: VoaStatementTemplate,\n chgvStatementTemplate: ChgvStatementTemplate,\n mobileStatementTemplate: MobileStatementTemplate,\n hmrcReportTechnicalIssueHelper: HmrcReportTechnicalIssueHelper)\n\n@(statement: AccessibilityStatement, referrerUrl: Option[String], isWelshTranslationAvailable: Boolean)(\n implicit request: Request[?], messages: Messages, appConfig: AppConfig)\n\n@import statement.*\n\n@layout(pageTitle = platformSpecificMessage(\"general.page-title\", serviceName), isWelshTranslationAvailable) {\n @{statementTemplate match {\n case VOA => voaStatementTemplate(statement, referrerUrl)\n case CHGV => chgvStatementTemplate(statement, referrerUrl)\n case Ios => mobileStatementTemplate(statement, referrerUrl)\n case Android => mobileStatementTemplate(statement, referrerUrl)\n case _ => hmrcStatementTemplate(statement, referrerUrl)\n }}\n @hmrcReportTechnicalIssueHelper()\n}\n","usages":["@hmrcReportTechnicalIssueHelper()"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/confirm.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukRadios#","variableName":"radios","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import model._\n@import templates.{address_confirmation_display, page_template}\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput,\n radios: GovukRadios, select: GovukSelect, page: page_template)\n@(id: String, journeyData: JourneyDataV2, selectedAddress: Option[ConfirmableAddress], isWelsh: Boolean = false, isUKMode: Boolean = true)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@page(messages(\"confirmPage.title\"), None, journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{messages(\"confirmPage.heading\")}\n </h1>\n\n @if(selectedAddress.isDefined) {\n @form(controllers.routes.AbpAddressLookupController.handleConfirm(id)) {\n @if(resolvedConf.options.confirmPageConfig.showSubHeadingAndInfo) {\n <h2 class=\"govuk-heading-m\" id=\"infoSubheading\">@{messages(\"confirmPage.infoSubheading\")}</h2>\n <p class=\"govuk-body govuk-!-margin-bottom-6\" id=\"infoMessage\">@Html(messages(\"confirmPage.infoMessage\"))</p>\n }\n @address_confirmation_display(selectedAddress.get.address)\n\n @if(resolvedConf.options.confirmPageConfig.showSearchAgainLink) {\n <p>\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.lookup(id)}\" id=\"searchAgainLink\">@{messages(\"confirmPage.searchAgainLinkText\")}</a>\n </p>\n }\n\n @if(resolvedConf.options.confirmPageConfig.showChangeLink) {\n <p class=\"govuk-!-margin-bottom-7\">\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.edit(id, None)}\" id=\"changeLink\">@{messages(\"confirmPage.changeLinkText\")}</a>\n </p>\n }\n\n @if(resolvedConf.options.confirmPageConfig.showConfirmChangeText) {\n <p class=\"govuk-body\" id=\"confirmChangeText\">@messages(\"confirmPage.confirmChangeText\")</p>\n }\n\n @button(Button(content = HtmlContent(messages(\"confirmPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n } else {\n <p>@{\n messages(\"constants.confirmSelectedAddressError1\")\n } <a class=\"govuk-link\" href=\"@{\n routes.AbpAddressLookupController.lookup(id)\n }\" id=\"lookupLink\">@{\n messages(\"constants.confirmSelectedAddressError2\")\n }</a>.</p>\n }\n}\n <!--TODO: Remove unreachable redirect to the lookup page-->\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/confirm.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukTextarea#","variableName":"textarea","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import model._\n@import templates.{address_confirmation_display, page_template}\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput,\n radios: GovukRadios, select: GovukSelect, page: page_template)\n@(id: String, journeyData: JourneyDataV2, selectedAddress: Option[ConfirmableAddress], isWelsh: Boolean = false, isUKMode: Boolean = true)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@page(messages(\"confirmPage.title\"), None, journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{messages(\"confirmPage.heading\")}\n </h1>\n\n @if(selectedAddress.isDefined) {\n @form(controllers.routes.AbpAddressLookupController.handleConfirm(id)) {\n @if(resolvedConf.options.confirmPageConfig.showSubHeadingAndInfo) {\n <h2 class=\"govuk-heading-m\" id=\"infoSubheading\">@{messages(\"confirmPage.infoSubheading\")}</h2>\n <p class=\"govuk-body govuk-!-margin-bottom-6\" id=\"infoMessage\">@Html(messages(\"confirmPage.infoMessage\"))</p>\n }\n @address_confirmation_display(selectedAddress.get.address)\n\n @if(resolvedConf.options.confirmPageConfig.showSearchAgainLink) {\n <p>\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.lookup(id)}\" id=\"searchAgainLink\">@{messages(\"confirmPage.searchAgainLinkText\")}</a>\n </p>\n }\n\n @if(resolvedConf.options.confirmPageConfig.showChangeLink) {\n <p class=\"govuk-!-margin-bottom-7\">\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.edit(id, None)}\" id=\"changeLink\">@{messages(\"confirmPage.changeLinkText\")}</a>\n </p>\n }\n\n @if(resolvedConf.options.confirmPageConfig.showConfirmChangeText) {\n <p class=\"govuk-body\" id=\"confirmChangeText\">@messages(\"confirmPage.confirmChangeText\")</p>\n }\n\n @button(Button(content = HtmlContent(messages(\"confirmPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n } else {\n <p>@{\n messages(\"constants.confirmSelectedAddressError1\")\n } <a class=\"govuk-link\" href=\"@{\n routes.AbpAddressLookupController.lookup(id)\n }\" id=\"lookupLink\">@{\n messages(\"constants.confirmSelectedAddressError2\")\n }</a>.</p>\n }\n}\n <!--TODO: Remove unreachable redirect to the lookup page-->\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/confirm.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukInput#","variableName":"textInput","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import model._\n@import templates.{address_confirmation_display, page_template}\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput,\n radios: GovukRadios, select: GovukSelect, page: page_template)\n@(id: String, journeyData: JourneyDataV2, selectedAddress: Option[ConfirmableAddress], isWelsh: Boolean = false, isUKMode: Boolean = true)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@page(messages(\"confirmPage.title\"), None, journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{messages(\"confirmPage.heading\")}\n </h1>\n\n @if(selectedAddress.isDefined) {\n @form(controllers.routes.AbpAddressLookupController.handleConfirm(id)) {\n @if(resolvedConf.options.confirmPageConfig.showSubHeadingAndInfo) {\n <h2 class=\"govuk-heading-m\" id=\"infoSubheading\">@{messages(\"confirmPage.infoSubheading\")}</h2>\n <p class=\"govuk-body govuk-!-margin-bottom-6\" id=\"infoMessage\">@Html(messages(\"confirmPage.infoMessage\"))</p>\n }\n @address_confirmation_display(selectedAddress.get.address)\n\n @if(resolvedConf.options.confirmPageConfig.showSearchAgainLink) {\n <p>\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.lookup(id)}\" id=\"searchAgainLink\">@{messages(\"confirmPage.searchAgainLinkText\")}</a>\n </p>\n }\n\n @if(resolvedConf.options.confirmPageConfig.showChangeLink) {\n <p class=\"govuk-!-margin-bottom-7\">\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.edit(id, None)}\" id=\"changeLink\">@{messages(\"confirmPage.changeLinkText\")}</a>\n </p>\n }\n\n @if(resolvedConf.options.confirmPageConfig.showConfirmChangeText) {\n <p class=\"govuk-body\" id=\"confirmChangeText\">@messages(\"confirmPage.confirmChangeText\")</p>\n }\n\n @button(Button(content = HtmlContent(messages(\"confirmPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n } else {\n <p>@{\n messages(\"constants.confirmSelectedAddressError1\")\n } <a class=\"govuk-link\" href=\"@{\n routes.AbpAddressLookupController.lookup(id)\n }\" id=\"lookupLink\">@{\n messages(\"constants.confirmSelectedAddressError2\")\n }</a>.</p>\n }\n}\n <!--TODO: Remove unreachable redirect to the lookup page-->\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/confirm.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukButton#","variableName":"button","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import model._\n@import templates.{address_confirmation_display, page_template}\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput,\n radios: GovukRadios, select: GovukSelect, page: page_template)\n@(id: String, journeyData: JourneyDataV2, selectedAddress: Option[ConfirmableAddress], isWelsh: Boolean = false, isUKMode: Boolean = true)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@page(messages(\"confirmPage.title\"), None, journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{messages(\"confirmPage.heading\")}\n </h1>\n\n @if(selectedAddress.isDefined) {\n @form(controllers.routes.AbpAddressLookupController.handleConfirm(id)) {\n @if(resolvedConf.options.confirmPageConfig.showSubHeadingAndInfo) {\n <h2 class=\"govuk-heading-m\" id=\"infoSubheading\">@{messages(\"confirmPage.infoSubheading\")}</h2>\n <p class=\"govuk-body govuk-!-margin-bottom-6\" id=\"infoMessage\">@Html(messages(\"confirmPage.infoMessage\"))</p>\n }\n @address_confirmation_display(selectedAddress.get.address)\n\n @if(resolvedConf.options.confirmPageConfig.showSearchAgainLink) {\n <p>\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.lookup(id)}\" id=\"searchAgainLink\">@{messages(\"confirmPage.searchAgainLinkText\")}</a>\n </p>\n }\n\n @if(resolvedConf.options.confirmPageConfig.showChangeLink) {\n <p class=\"govuk-!-margin-bottom-7\">\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.edit(id, None)}\" id=\"changeLink\">@{messages(\"confirmPage.changeLinkText\")}</a>\n </p>\n }\n\n @if(resolvedConf.options.confirmPageConfig.showConfirmChangeText) {\n <p class=\"govuk-body\" id=\"confirmChangeText\">@messages(\"confirmPage.confirmChangeText\")</p>\n }\n\n @button(Button(content = HtmlContent(messages(\"confirmPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n } else {\n <p>@{\n messages(\"constants.confirmSelectedAddressError1\")\n } <a class=\"govuk-link\" href=\"@{\n routes.AbpAddressLookupController.lookup(id)\n }\" id=\"lookupLink\">@{\n messages(\"constants.confirmSelectedAddressError2\")\n }</a>.</p>\n }\n}\n <!--TODO: Remove unreachable redirect to the lookup page-->\n","usages":["@button(Button(content = HtmlContent(messages(\"confirmPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/confirm.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukSelect#","variableName":"select","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import model._\n@import templates.{address_confirmation_display, page_template}\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput,\n radios: GovukRadios, select: GovukSelect, page: page_template)\n@(id: String, journeyData: JourneyDataV2, selectedAddress: Option[ConfirmableAddress], isWelsh: Boolean = false, isUKMode: Boolean = true)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@page(messages(\"confirmPage.title\"), None, journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{messages(\"confirmPage.heading\")}\n </h1>\n\n @if(selectedAddress.isDefined) {\n @form(controllers.routes.AbpAddressLookupController.handleConfirm(id)) {\n @if(resolvedConf.options.confirmPageConfig.showSubHeadingAndInfo) {\n <h2 class=\"govuk-heading-m\" id=\"infoSubheading\">@{messages(\"confirmPage.infoSubheading\")}</h2>\n <p class=\"govuk-body govuk-!-margin-bottom-6\" id=\"infoMessage\">@Html(messages(\"confirmPage.infoMessage\"))</p>\n }\n @address_confirmation_display(selectedAddress.get.address)\n\n @if(resolvedConf.options.confirmPageConfig.showSearchAgainLink) {\n <p>\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.lookup(id)}\" id=\"searchAgainLink\">@{messages(\"confirmPage.searchAgainLinkText\")}</a>\n </p>\n }\n\n @if(resolvedConf.options.confirmPageConfig.showChangeLink) {\n <p class=\"govuk-!-margin-bottom-7\">\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.edit(id, None)}\" id=\"changeLink\">@{messages(\"confirmPage.changeLinkText\")}</a>\n </p>\n }\n\n @if(resolvedConf.options.confirmPageConfig.showConfirmChangeText) {\n <p class=\"govuk-body\" id=\"confirmChangeText\">@messages(\"confirmPage.confirmChangeText\")</p>\n }\n\n @button(Button(content = HtmlContent(messages(\"confirmPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n } else {\n <p>@{\n messages(\"constants.confirmSelectedAddressError1\")\n } <a class=\"govuk-link\" href=\"@{\n routes.AbpAddressLookupController.lookup(id)\n }\" id=\"lookupLink\">@{\n messages(\"constants.confirmSelectedAddressError2\")\n }</a>.</p>\n }\n}\n <!--TODO: Remove unreachable redirect to the lookup page-->\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/confirm.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"form","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import model._\n@import templates.{address_confirmation_display, page_template}\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput,\n radios: GovukRadios, select: GovukSelect, page: page_template)\n@(id: String, journeyData: JourneyDataV2, selectedAddress: Option[ConfirmableAddress], isWelsh: Boolean = false, isUKMode: Boolean = true)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@page(messages(\"confirmPage.title\"), None, journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{messages(\"confirmPage.heading\")}\n </h1>\n\n @if(selectedAddress.isDefined) {\n @form(controllers.routes.AbpAddressLookupController.handleConfirm(id)) {\n @if(resolvedConf.options.confirmPageConfig.showSubHeadingAndInfo) {\n <h2 class=\"govuk-heading-m\" id=\"infoSubheading\">@{messages(\"confirmPage.infoSubheading\")}</h2>\n <p class=\"govuk-body govuk-!-margin-bottom-6\" id=\"infoMessage\">@Html(messages(\"confirmPage.infoMessage\"))</p>\n }\n @address_confirmation_display(selectedAddress.get.address)\n\n @if(resolvedConf.options.confirmPageConfig.showSearchAgainLink) {\n <p>\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.lookup(id)}\" id=\"searchAgainLink\">@{messages(\"confirmPage.searchAgainLinkText\")}</a>\n </p>\n }\n\n @if(resolvedConf.options.confirmPageConfig.showChangeLink) {\n <p class=\"govuk-!-margin-bottom-7\">\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.edit(id, None)}\" id=\"changeLink\">@{messages(\"confirmPage.changeLinkText\")}</a>\n </p>\n }\n\n @if(resolvedConf.options.confirmPageConfig.showConfirmChangeText) {\n <p class=\"govuk-body\" id=\"confirmChangeText\">@messages(\"confirmPage.confirmChangeText\")</p>\n }\n\n @button(Button(content = HtmlContent(messages(\"confirmPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n } else {\n <p>@{\n messages(\"constants.confirmSelectedAddressError1\")\n } <a class=\"govuk-link\" href=\"@{\n routes.AbpAddressLookupController.lookup(id)\n }\" id=\"lookupLink\">@{\n messages(\"constants.confirmSelectedAddressError2\")\n }</a>.</p>\n }\n}\n <!--TODO: Remove unreachable redirect to the lookup page-->\n","usages":["@form(controllers.routes.AbpAddressLookupController.handleConfirm(id))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/lookup.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukButton#","variableName":"button","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model._\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, page: page_template)\n@(id: String,\n journeyData: JourneyDataV2,\n lookupForm: Form[Lookup],\n isWelsh: Boolean,\n isUKMode: Boolean = true,\n message: Option[String] = None\n)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@errorPrefix = @{s\"${messages(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n val baseTitle = if(isUKMode) messages(\"lookupPage.title.ukMode\") else messages(\"lookupPage.title\")\n if(lookupForm.errors) {\n errorPrefix + baseTitle\n } else {\n baseTitle\n }\n}\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@page(titleWithError, Some(lookupForm), journeyData) {\n\n @form(routes.AbpAddressLookupController.postLookup(id)) {\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{if(isUKMode) messages(\"lookupPage.heading.ukMode\") else messages(\"lookupPage.heading\")}\n </h1>\n\n @if(messages.isDefinedAt(\"lookupPage.afterHeadingText\")) {\n <div class=\"govuk-hint\" id=\"afterHeadingText\">@{messages(\"lookupPage.afterHeadingText\")}</div>\n }\n\n @if(message.isDefined) {\n <div class=\"highlight-message highlight-message--full-width\">\n <p>@{message.get}</p>\n </div>\n }\n\n @textInput(Input(\n label = Label(content = HtmlContent(\n if(isUKMode) messages(\"lookupPage.postcodeLabel.ukMode\") else messages(\"lookupPage.postcodeLabel\")\n )),\n name = lookupForm(\"postcode\").name,\n value = lookupForm(\"postcode\").value,\n autocomplete = Some(\"postal-code\"),\n classes = \"govuk-input--width-10\",\n id = lookupForm(\"postcode\").id,\n errorMessage = lookupForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n <p class=\"govuk-!-margin-bottom-6 govuk-body\">\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.edit(id)}\" id=\"manualAddress\">@{messages(\"lookupPage.manualAddressLinkText\")}</a>\n </p>\n\n @textInput(Input(\n label = Label(content = HtmlContent(messages(\"lookupPage.filterLabel\"))),\n name = lookupForm(\"filter\").name,\n value = lookupForm(\"filter\").value,\n classes = \"govuk-input--width-20\",\n id = lookupForm(\"filter\").id,\n errorMessage = lookupForm(\"filter\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n hint = Some(Hint(content = HtmlContent(messages(\"constants.lookupFilterHint\"))))))\n\n @button(Button(content = HtmlContent(messages(\"lookupPage.submitLabel\")),\n name=Some(\"continue\"),\n inputType=Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n","usages":["@button(Button(content = HtmlContent(messages(\"lookupPage.submitLabel\")),\n name=Some(\"continue\"),\n inputType=Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/lookup.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukTextarea#","variableName":"textarea","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model._\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, page: page_template)\n@(id: String,\n journeyData: JourneyDataV2,\n lookupForm: Form[Lookup],\n isWelsh: Boolean,\n isUKMode: Boolean = true,\n message: Option[String] = None\n)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@errorPrefix = @{s\"${messages(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n val baseTitle = if(isUKMode) messages(\"lookupPage.title.ukMode\") else messages(\"lookupPage.title\")\n if(lookupForm.errors) {\n errorPrefix + baseTitle\n } else {\n baseTitle\n }\n}\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@page(titleWithError, Some(lookupForm), journeyData) {\n\n @form(routes.AbpAddressLookupController.postLookup(id)) {\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{if(isUKMode) messages(\"lookupPage.heading.ukMode\") else messages(\"lookupPage.heading\")}\n </h1>\n\n @if(messages.isDefinedAt(\"lookupPage.afterHeadingText\")) {\n <div class=\"govuk-hint\" id=\"afterHeadingText\">@{messages(\"lookupPage.afterHeadingText\")}</div>\n }\n\n @if(message.isDefined) {\n <div class=\"highlight-message highlight-message--full-width\">\n <p>@{message.get}</p>\n </div>\n }\n\n @textInput(Input(\n label = Label(content = HtmlContent(\n if(isUKMode) messages(\"lookupPage.postcodeLabel.ukMode\") else messages(\"lookupPage.postcodeLabel\")\n )),\n name = lookupForm(\"postcode\").name,\n value = lookupForm(\"postcode\").value,\n autocomplete = Some(\"postal-code\"),\n classes = \"govuk-input--width-10\",\n id = lookupForm(\"postcode\").id,\n errorMessage = lookupForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n <p class=\"govuk-!-margin-bottom-6 govuk-body\">\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.edit(id)}\" id=\"manualAddress\">@{messages(\"lookupPage.manualAddressLinkText\")}</a>\n </p>\n\n @textInput(Input(\n label = Label(content = HtmlContent(messages(\"lookupPage.filterLabel\"))),\n name = lookupForm(\"filter\").name,\n value = lookupForm(\"filter\").value,\n classes = \"govuk-input--width-20\",\n id = lookupForm(\"filter\").id,\n errorMessage = lookupForm(\"filter\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n hint = Some(Hint(content = HtmlContent(messages(\"constants.lookupFilterHint\"))))))\n\n @button(Button(content = HtmlContent(messages(\"lookupPage.submitLabel\")),\n name=Some(\"continue\"),\n inputType=Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/lookup.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"form","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model._\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, page: page_template)\n@(id: String,\n journeyData: JourneyDataV2,\n lookupForm: Form[Lookup],\n isWelsh: Boolean,\n isUKMode: Boolean = true,\n message: Option[String] = None\n)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@errorPrefix = @{s\"${messages(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n val baseTitle = if(isUKMode) messages(\"lookupPage.title.ukMode\") else messages(\"lookupPage.title\")\n if(lookupForm.errors) {\n errorPrefix + baseTitle\n } else {\n baseTitle\n }\n}\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@page(titleWithError, Some(lookupForm), journeyData) {\n\n @form(routes.AbpAddressLookupController.postLookup(id)) {\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{if(isUKMode) messages(\"lookupPage.heading.ukMode\") else messages(\"lookupPage.heading\")}\n </h1>\n\n @if(messages.isDefinedAt(\"lookupPage.afterHeadingText\")) {\n <div class=\"govuk-hint\" id=\"afterHeadingText\">@{messages(\"lookupPage.afterHeadingText\")}</div>\n }\n\n @if(message.isDefined) {\n <div class=\"highlight-message highlight-message--full-width\">\n <p>@{message.get}</p>\n </div>\n }\n\n @textInput(Input(\n label = Label(content = HtmlContent(\n if(isUKMode) messages(\"lookupPage.postcodeLabel.ukMode\") else messages(\"lookupPage.postcodeLabel\")\n )),\n name = lookupForm(\"postcode\").name,\n value = lookupForm(\"postcode\").value,\n autocomplete = Some(\"postal-code\"),\n classes = \"govuk-input--width-10\",\n id = lookupForm(\"postcode\").id,\n errorMessage = lookupForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n <p class=\"govuk-!-margin-bottom-6 govuk-body\">\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.edit(id)}\" id=\"manualAddress\">@{messages(\"lookupPage.manualAddressLinkText\")}</a>\n </p>\n\n @textInput(Input(\n label = Label(content = HtmlContent(messages(\"lookupPage.filterLabel\"))),\n name = lookupForm(\"filter\").name,\n value = lookupForm(\"filter\").value,\n classes = \"govuk-input--width-20\",\n id = lookupForm(\"filter\").id,\n errorMessage = lookupForm(\"filter\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n hint = Some(Hint(content = HtmlContent(messages(\"constants.lookupFilterHint\"))))))\n\n @button(Button(content = HtmlContent(messages(\"lookupPage.submitLabel\")),\n name=Some(\"continue\"),\n inputType=Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n","usages":["@form(routes.AbpAddressLookupController.postLookup(id))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/lookup.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukInput#","variableName":"textInput","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model._\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, page: page_template)\n@(id: String,\n journeyData: JourneyDataV2,\n lookupForm: Form[Lookup],\n isWelsh: Boolean,\n isUKMode: Boolean = true,\n message: Option[String] = None\n)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@errorPrefix = @{s\"${messages(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n val baseTitle = if(isUKMode) messages(\"lookupPage.title.ukMode\") else messages(\"lookupPage.title\")\n if(lookupForm.errors) {\n errorPrefix + baseTitle\n } else {\n baseTitle\n }\n}\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@page(titleWithError, Some(lookupForm), journeyData) {\n\n @form(routes.AbpAddressLookupController.postLookup(id)) {\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{if(isUKMode) messages(\"lookupPage.heading.ukMode\") else messages(\"lookupPage.heading\")}\n </h1>\n\n @if(messages.isDefinedAt(\"lookupPage.afterHeadingText\")) {\n <div class=\"govuk-hint\" id=\"afterHeadingText\">@{messages(\"lookupPage.afterHeadingText\")}</div>\n }\n\n @if(message.isDefined) {\n <div class=\"highlight-message highlight-message--full-width\">\n <p>@{message.get}</p>\n </div>\n }\n\n @textInput(Input(\n label = Label(content = HtmlContent(\n if(isUKMode) messages(\"lookupPage.postcodeLabel.ukMode\") else messages(\"lookupPage.postcodeLabel\")\n )),\n name = lookupForm(\"postcode\").name,\n value = lookupForm(\"postcode\").value,\n autocomplete = Some(\"postal-code\"),\n classes = \"govuk-input--width-10\",\n id = lookupForm(\"postcode\").id,\n errorMessage = lookupForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n <p class=\"govuk-!-margin-bottom-6 govuk-body\">\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.edit(id)}\" id=\"manualAddress\">@{messages(\"lookupPage.manualAddressLinkText\")}</a>\n </p>\n\n @textInput(Input(\n label = Label(content = HtmlContent(messages(\"lookupPage.filterLabel\"))),\n name = lookupForm(\"filter\").name,\n value = lookupForm(\"filter\").value,\n classes = \"govuk-input--width-20\",\n id = lookupForm(\"filter\").id,\n errorMessage = lookupForm(\"filter\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n hint = Some(Hint(content = HtmlContent(messages(\"constants.lookupFilterHint\"))))))\n\n @button(Button(content = HtmlContent(messages(\"lookupPage.submitLabel\")),\n name=Some(\"continue\"),\n inputType=Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n","usages":["@textInput(Input(\n label = Label(content = HtmlContent(\n if(isUKMode) messages(\"lookupPage.postcodeLabel.ukMode\") else messages(\"lookupPage.postcodeLabel\")\n )),\n name = lookupForm(\"postcode\").name,\n value = lookupForm(\"postcode\").value,\n autocomplete = Some(\"postal-code\"),\n classes = \"govuk-input--width-10\",\n id = lookupForm(\"postcode\").id,\n errorMessage = lookupForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))","@textInput(Input(\n label = Label(content = HtmlContent(messages(\"lookupPage.filterLabel\"))),\n name = lookupForm(\"filter\").name,\n value = lookupForm(\"filter\").value,\n classes = \"govuk-input--width-20\",\n id = lookupForm(\"filter\").id,\n errorMessage = lookupForm(\"filter\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n hint = Some(Hint(content = HtmlContent(messages(\"constants.lookupFilterHint\"))))))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/no_results.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukButton#","variableName":"button","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model._\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n\n@this(form: FormWithCSRF, button: GovukButton, page: page_template)\n@(id: String, journeyData: JourneyDataV2, postcode: String, isWelsh: Boolean = false, isUKMode: Boolean = true)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@page(s\"${messages(\"constants.noResultsPageHeading\")} $postcode\", None, journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{s\"${messages(\"constants.noResultsPageHeading\")} $postcode\"}\n </h1>\n\n <div>\n <p><a class=\"govuk-link\" href=\"@{\n routes.AbpAddressLookupController.edit(id, None)\n }\" id=\"enterManual\">@{\n messages(\"constants.noResultsPageEnterManually\")\n }</a></p>\n\n @button(Button(content = HtmlContent(messages(\"constants.noResultsPageDifferentPostcode\")),\n name = Some(\"continue\"),\n href = Some(routes.AbpAddressLookupController.lookup(id).url),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n </div>\n}\n","usages":["@button(Button(content = HtmlContent(messages(\"constants.noResultsPageDifferentPostcode\")),\n name = Some(\"continue\"),\n href = Some(routes.AbpAddressLookupController.lookup(id).url),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/no_results.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"form","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model._\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n\n@this(form: FormWithCSRF, button: GovukButton, page: page_template)\n@(id: String, journeyData: JourneyDataV2, postcode: String, isWelsh: Boolean = false, isUKMode: Boolean = true)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@page(s\"${messages(\"constants.noResultsPageHeading\")} $postcode\", None, journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{s\"${messages(\"constants.noResultsPageHeading\")} $postcode\"}\n </h1>\n\n <div>\n <p><a class=\"govuk-link\" href=\"@{\n routes.AbpAddressLookupController.edit(id, None)\n }\" id=\"enterManual\">@{\n messages(\"constants.noResultsPageEnterManually\")\n }</a></p>\n\n @button(Button(content = HtmlContent(messages(\"constants.noResultsPageDifferentPostcode\")),\n name = Some(\"continue\"),\n href = Some(routes.AbpAddressLookupController.lookup(id).url),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n </div>\n}\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/non_uk_mode_edit.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukRadios#","variableName":"radios","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import model._\n@import uk.gov.hmrc.govukfrontend.views.html.components\n@import views.html.templates.page_template\n@import address.v2.Country\n@import views.ViewHelper\n@import services.CountryService\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios, select: GovukSelect, page: page_template, govukFieldset: GovukFieldset, countryService: CountryService)\n\n@(id: String, journeyData: JourneyDataV2, editForm: Form[Edit], countries: Seq[Country], isWelsh: Boolean, isUKMode: Boolean = false)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@{\n def asSelectItem(c: Country) = SelectItem(value = Some(c.code), text = c.name)\n}\n@errorPrefix = @{s\"${messages(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(editForm.errors) {\n errorPrefix + messages(\"editPage.title\")\n } else {\n messages(\"editPage.title\")\n }\n}\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@addressLinesInputErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == messages(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-input--error\"\n case _ => \"\"\n }\n}\n\n@addressLinesFormGroupErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == messages(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-form-group--error\"\n case _ => \"\"\n }\n}\n\n@page(titleWithError, Some(editForm), journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{messages(\"editPage.heading\")}\n </h1>\n\n @form(routes.AbpAddressLookupController.handleEdit(id)) {\n @govukFieldset(Fieldset(html = inputHtml))\n\n @button(Button(content = HtmlContent(messages(\"editPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n\n@inputHtml = {\n @textInput(Input(value = editForm(\"organisation\").value,\n label = Label(content = HtmlContent(messages(\"editPage.organisationLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"organization\"),\n name = editForm(\"organisation\").name, id = editForm(\"organisation\").name, classes = \"govuk-input--width-20\",\n errorMessage = editForm(\"organisation\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line1\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line1Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line1\"),\n name = editForm(\"line1\").name, id = editForm(\"line1\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line1\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line2\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line2Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line2\"),\n name = editForm(\"line2\").name, id = editForm(\"line2\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line2\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(\"DUMMY\"), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line3\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line3Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line3\"),\n name = editForm(\"line3\").name, id = editForm(\"line3\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line3\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"town\").value,\n label = Label(content = HtmlContent(messages(\"editPage.townLabel\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-level1\"),\n name = editForm(\"town\").name, id = editForm(\"town\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"town\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"postcode\").value,\n label = Label(content = HtmlContent(messages(\"editPage.postcodeLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"postal-code\"),\n name = editForm(\"postcode\").name, id = editForm(\"postcode\").name, classes = \"govuk-input--width-10\",\n errorMessage = editForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n @if(journeyData.countryCode.isDefined) {\n\n @textInput(Input(value =\n editForm(\"countryCode\").value.flatMap(c => countryService.find(isWelsh, code = c)).map(_.name),\n attributes = Map(\"disabled\" -> \"disabled\"),\n label = Label(content = HtmlContent(messages(\"editPage.countryLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"country\"),\n name = \"countryName\", id = \"countryName\",\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n <input type=\"hidden\" id=\"countryCode\" name=\"countryCode\" value=\"@editForm(\"countryCode\").value\" />\n } else {\n\n @select(components.Select(\n id = \"countryCode\",\n name = \"countryCode\",\n label = Label(content = HtmlContent(messages(\"editPage.countryLabel\"))),\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n items = ViewHelper.countriesToSelectItems(countries, editForm),\n formGroupClasses = \"form-field-group\"\n ))\n\n <script src=\"@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.js\")\" ></script>\n <script>\n accessibleAutocomplete.enhanceSelectElement({\n selectElement: document.getElementById(\"countryCode\"),\n name: 'countryCodeAutocomplete',\n defaultValue: '',\n showNoOptionsFound: false,\n @*\n TF-640: Had to override the onConfirm function to include custom validation for countries because null / undefined values are not handled by the Autocomplete form:\n https://github.com/alphagov/accessible-autocomplete/issues/260\n When this is fixed the custom validation / onConfirm bypass can be removed\n *@\n onConfirm: () => {\n const matchingOption = Array.from(document.querySelectorAll(\"#countryCode-select > option\")).find(function (c) {\n return c.text === document.getElementById(\"countryCode\").value;\n });\n const countryCode = matchingOption ? matchingOption.value : undefined;\n document.getElementById(\"countryCode-select\").value = countryCode;\n }\n })\n </script>\n }\n}\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/non_uk_mode_edit.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukSelect#","variableName":"select","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import model._\n@import uk.gov.hmrc.govukfrontend.views.html.components\n@import views.html.templates.page_template\n@import address.v2.Country\n@import views.ViewHelper\n@import services.CountryService\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios, select: GovukSelect, page: page_template, govukFieldset: GovukFieldset, countryService: CountryService)\n\n@(id: String, journeyData: JourneyDataV2, editForm: Form[Edit], countries: Seq[Country], isWelsh: Boolean, isUKMode: Boolean = false)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@{\n def asSelectItem(c: Country) = SelectItem(value = Some(c.code), text = c.name)\n}\n@errorPrefix = @{s\"${messages(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(editForm.errors) {\n errorPrefix + messages(\"editPage.title\")\n } else {\n messages(\"editPage.title\")\n }\n}\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@addressLinesInputErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == messages(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-input--error\"\n case _ => \"\"\n }\n}\n\n@addressLinesFormGroupErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == messages(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-form-group--error\"\n case _ => \"\"\n }\n}\n\n@page(titleWithError, Some(editForm), journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{messages(\"editPage.heading\")}\n </h1>\n\n @form(routes.AbpAddressLookupController.handleEdit(id)) {\n @govukFieldset(Fieldset(html = inputHtml))\n\n @button(Button(content = HtmlContent(messages(\"editPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n\n@inputHtml = {\n @textInput(Input(value = editForm(\"organisation\").value,\n label = Label(content = HtmlContent(messages(\"editPage.organisationLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"organization\"),\n name = editForm(\"organisation\").name, id = editForm(\"organisation\").name, classes = \"govuk-input--width-20\",\n errorMessage = editForm(\"organisation\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line1\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line1Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line1\"),\n name = editForm(\"line1\").name, id = editForm(\"line1\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line1\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line2\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line2Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line2\"),\n name = editForm(\"line2\").name, id = editForm(\"line2\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line2\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(\"DUMMY\"), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line3\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line3Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line3\"),\n name = editForm(\"line3\").name, id = editForm(\"line3\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line3\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"town\").value,\n label = Label(content = HtmlContent(messages(\"editPage.townLabel\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-level1\"),\n name = editForm(\"town\").name, id = editForm(\"town\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"town\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"postcode\").value,\n label = Label(content = HtmlContent(messages(\"editPage.postcodeLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"postal-code\"),\n name = editForm(\"postcode\").name, id = editForm(\"postcode\").name, classes = \"govuk-input--width-10\",\n errorMessage = editForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n @if(journeyData.countryCode.isDefined) {\n\n @textInput(Input(value =\n editForm(\"countryCode\").value.flatMap(c => countryService.find(isWelsh, code = c)).map(_.name),\n attributes = Map(\"disabled\" -> \"disabled\"),\n label = Label(content = HtmlContent(messages(\"editPage.countryLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"country\"),\n name = \"countryName\", id = \"countryName\",\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n <input type=\"hidden\" id=\"countryCode\" name=\"countryCode\" value=\"@editForm(\"countryCode\").value\" />\n } else {\n\n @select(components.Select(\n id = \"countryCode\",\n name = \"countryCode\",\n label = Label(content = HtmlContent(messages(\"editPage.countryLabel\"))),\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n items = ViewHelper.countriesToSelectItems(countries, editForm),\n formGroupClasses = \"form-field-group\"\n ))\n\n <script src=\"@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.js\")\" ></script>\n <script>\n accessibleAutocomplete.enhanceSelectElement({\n selectElement: document.getElementById(\"countryCode\"),\n name: 'countryCodeAutocomplete',\n defaultValue: '',\n showNoOptionsFound: false,\n @*\n TF-640: Had to override the onConfirm function to include custom validation for countries because null / undefined values are not handled by the Autocomplete form:\n https://github.com/alphagov/accessible-autocomplete/issues/260\n When this is fixed the custom validation / onConfirm bypass can be removed\n *@\n onConfirm: () => {\n const matchingOption = Array.from(document.querySelectorAll(\"#countryCode-select > option\")).find(function (c) {\n return c.text === document.getElementById(\"countryCode\").value;\n });\n const countryCode = matchingOption ? matchingOption.value : undefined;\n document.getElementById(\"countryCode-select\").value = countryCode;\n }\n })\n </script>\n }\n}\n","usages":["@select(components.Select(\n id = \"countryCode\",\n name = \"countryCode\",\n label = Label(content = HtmlContent(messages(\"editPage.countryLabel\"))),\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n items = ViewHelper.countriesToSelectItems(countries, editForm),\n formGroupClasses = \"form-field-group\"\n ))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/non_uk_mode_edit.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukFieldset#","variableName":"govukFieldset","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import model._\n@import uk.gov.hmrc.govukfrontend.views.html.components\n@import views.html.templates.page_template\n@import address.v2.Country\n@import views.ViewHelper\n@import services.CountryService\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios, select: GovukSelect, page: page_template, govukFieldset: GovukFieldset, countryService: CountryService)\n\n@(id: String, journeyData: JourneyDataV2, editForm: Form[Edit], countries: Seq[Country], isWelsh: Boolean, isUKMode: Boolean = false)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@{\n def asSelectItem(c: Country) = SelectItem(value = Some(c.code), text = c.name)\n}\n@errorPrefix = @{s\"${messages(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(editForm.errors) {\n errorPrefix + messages(\"editPage.title\")\n } else {\n messages(\"editPage.title\")\n }\n}\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@addressLinesInputErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == messages(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-input--error\"\n case _ => \"\"\n }\n}\n\n@addressLinesFormGroupErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == messages(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-form-group--error\"\n case _ => \"\"\n }\n}\n\n@page(titleWithError, Some(editForm), journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{messages(\"editPage.heading\")}\n </h1>\n\n @form(routes.AbpAddressLookupController.handleEdit(id)) {\n @govukFieldset(Fieldset(html = inputHtml))\n\n @button(Button(content = HtmlContent(messages(\"editPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n\n@inputHtml = {\n @textInput(Input(value = editForm(\"organisation\").value,\n label = Label(content = HtmlContent(messages(\"editPage.organisationLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"organization\"),\n name = editForm(\"organisation\").name, id = editForm(\"organisation\").name, classes = \"govuk-input--width-20\",\n errorMessage = editForm(\"organisation\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line1\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line1Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line1\"),\n name = editForm(\"line1\").name, id = editForm(\"line1\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line1\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line2\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line2Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line2\"),\n name = editForm(\"line2\").name, id = editForm(\"line2\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line2\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(\"DUMMY\"), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line3\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line3Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line3\"),\n name = editForm(\"line3\").name, id = editForm(\"line3\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line3\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"town\").value,\n label = Label(content = HtmlContent(messages(\"editPage.townLabel\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-level1\"),\n name = editForm(\"town\").name, id = editForm(\"town\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"town\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"postcode\").value,\n label = Label(content = HtmlContent(messages(\"editPage.postcodeLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"postal-code\"),\n name = editForm(\"postcode\").name, id = editForm(\"postcode\").name, classes = \"govuk-input--width-10\",\n errorMessage = editForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n @if(journeyData.countryCode.isDefined) {\n\n @textInput(Input(value =\n editForm(\"countryCode\").value.flatMap(c => countryService.find(isWelsh, code = c)).map(_.name),\n attributes = Map(\"disabled\" -> \"disabled\"),\n label = Label(content = HtmlContent(messages(\"editPage.countryLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"country\"),\n name = \"countryName\", id = \"countryName\",\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n <input type=\"hidden\" id=\"countryCode\" name=\"countryCode\" value=\"@editForm(\"countryCode\").value\" />\n } else {\n\n @select(components.Select(\n id = \"countryCode\",\n name = \"countryCode\",\n label = Label(content = HtmlContent(messages(\"editPage.countryLabel\"))),\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n items = ViewHelper.countriesToSelectItems(countries, editForm),\n formGroupClasses = \"form-field-group\"\n ))\n\n <script src=\"@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.js\")\" ></script>\n <script>\n accessibleAutocomplete.enhanceSelectElement({\n selectElement: document.getElementById(\"countryCode\"),\n name: 'countryCodeAutocomplete',\n defaultValue: '',\n showNoOptionsFound: false,\n @*\n TF-640: Had to override the onConfirm function to include custom validation for countries because null / undefined values are not handled by the Autocomplete form:\n https://github.com/alphagov/accessible-autocomplete/issues/260\n When this is fixed the custom validation / onConfirm bypass can be removed\n *@\n onConfirm: () => {\n const matchingOption = Array.from(document.querySelectorAll(\"#countryCode-select > option\")).find(function (c) {\n return c.text === document.getElementById(\"countryCode\").value;\n });\n const countryCode = matchingOption ? matchingOption.value : undefined;\n document.getElementById(\"countryCode-select\").value = countryCode;\n }\n })\n </script>\n }\n}\n","usages":["@govukFieldset(Fieldset(html = inputHtml))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/non_uk_mode_edit.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"form","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import model._\n@import uk.gov.hmrc.govukfrontend.views.html.components\n@import views.html.templates.page_template\n@import address.v2.Country\n@import views.ViewHelper\n@import services.CountryService\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios, select: GovukSelect, page: page_template, govukFieldset: GovukFieldset, countryService: CountryService)\n\n@(id: String, journeyData: JourneyDataV2, editForm: Form[Edit], countries: Seq[Country], isWelsh: Boolean, isUKMode: Boolean = false)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@{\n def asSelectItem(c: Country) = SelectItem(value = Some(c.code), text = c.name)\n}\n@errorPrefix = @{s\"${messages(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(editForm.errors) {\n errorPrefix + messages(\"editPage.title\")\n } else {\n messages(\"editPage.title\")\n }\n}\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@addressLinesInputErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == messages(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-input--error\"\n case _ => \"\"\n }\n}\n\n@addressLinesFormGroupErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == messages(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-form-group--error\"\n case _ => \"\"\n }\n}\n\n@page(titleWithError, Some(editForm), journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{messages(\"editPage.heading\")}\n </h1>\n\n @form(routes.AbpAddressLookupController.handleEdit(id)) {\n @govukFieldset(Fieldset(html = inputHtml))\n\n @button(Button(content = HtmlContent(messages(\"editPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n\n@inputHtml = {\n @textInput(Input(value = editForm(\"organisation\").value,\n label = Label(content = HtmlContent(messages(\"editPage.organisationLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"organization\"),\n name = editForm(\"organisation\").name, id = editForm(\"organisation\").name, classes = \"govuk-input--width-20\",\n errorMessage = editForm(\"organisation\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line1\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line1Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line1\"),\n name = editForm(\"line1\").name, id = editForm(\"line1\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line1\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line2\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line2Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line2\"),\n name = editForm(\"line2\").name, id = editForm(\"line2\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line2\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(\"DUMMY\"), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line3\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line3Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line3\"),\n name = editForm(\"line3\").name, id = editForm(\"line3\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line3\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"town\").value,\n label = Label(content = HtmlContent(messages(\"editPage.townLabel\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-level1\"),\n name = editForm(\"town\").name, id = editForm(\"town\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"town\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"postcode\").value,\n label = Label(content = HtmlContent(messages(\"editPage.postcodeLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"postal-code\"),\n name = editForm(\"postcode\").name, id = editForm(\"postcode\").name, classes = \"govuk-input--width-10\",\n errorMessage = editForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n @if(journeyData.countryCode.isDefined) {\n\n @textInput(Input(value =\n editForm(\"countryCode\").value.flatMap(c => countryService.find(isWelsh, code = c)).map(_.name),\n attributes = Map(\"disabled\" -> \"disabled\"),\n label = Label(content = HtmlContent(messages(\"editPage.countryLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"country\"),\n name = \"countryName\", id = \"countryName\",\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n <input type=\"hidden\" id=\"countryCode\" name=\"countryCode\" value=\"@editForm(\"countryCode\").value\" />\n } else {\n\n @select(components.Select(\n id = \"countryCode\",\n name = \"countryCode\",\n label = Label(content = HtmlContent(messages(\"editPage.countryLabel\"))),\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n items = ViewHelper.countriesToSelectItems(countries, editForm),\n formGroupClasses = \"form-field-group\"\n ))\n\n <script src=\"@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.js\")\" ></script>\n <script>\n accessibleAutocomplete.enhanceSelectElement({\n selectElement: document.getElementById(\"countryCode\"),\n name: 'countryCodeAutocomplete',\n defaultValue: '',\n showNoOptionsFound: false,\n @*\n TF-640: Had to override the onConfirm function to include custom validation for countries because null / undefined values are not handled by the Autocomplete form:\n https://github.com/alphagov/accessible-autocomplete/issues/260\n When this is fixed the custom validation / onConfirm bypass can be removed\n *@\n onConfirm: () => {\n const matchingOption = Array.from(document.querySelectorAll(\"#countryCode-select > option\")).find(function (c) {\n return c.text === document.getElementById(\"countryCode\").value;\n });\n const countryCode = matchingOption ? matchingOption.value : undefined;\n document.getElementById(\"countryCode-select\").value = countryCode;\n }\n })\n </script>\n }\n}\n","usages":["@form(routes.AbpAddressLookupController.handleEdit(id))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/non_uk_mode_edit.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukButton#","variableName":"button","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import model._\n@import uk.gov.hmrc.govukfrontend.views.html.components\n@import views.html.templates.page_template\n@import address.v2.Country\n@import views.ViewHelper\n@import services.CountryService\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios, select: GovukSelect, page: page_template, govukFieldset: GovukFieldset, countryService: CountryService)\n\n@(id: String, journeyData: JourneyDataV2, editForm: Form[Edit], countries: Seq[Country], isWelsh: Boolean, isUKMode: Boolean = false)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@{\n def asSelectItem(c: Country) = SelectItem(value = Some(c.code), text = c.name)\n}\n@errorPrefix = @{s\"${messages(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(editForm.errors) {\n errorPrefix + messages(\"editPage.title\")\n } else {\n messages(\"editPage.title\")\n }\n}\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@addressLinesInputErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == messages(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-input--error\"\n case _ => \"\"\n }\n}\n\n@addressLinesFormGroupErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == messages(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-form-group--error\"\n case _ => \"\"\n }\n}\n\n@page(titleWithError, Some(editForm), journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{messages(\"editPage.heading\")}\n </h1>\n\n @form(routes.AbpAddressLookupController.handleEdit(id)) {\n @govukFieldset(Fieldset(html = inputHtml))\n\n @button(Button(content = HtmlContent(messages(\"editPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n\n@inputHtml = {\n @textInput(Input(value = editForm(\"organisation\").value,\n label = Label(content = HtmlContent(messages(\"editPage.organisationLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"organization\"),\n name = editForm(\"organisation\").name, id = editForm(\"organisation\").name, classes = \"govuk-input--width-20\",\n errorMessage = editForm(\"organisation\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line1\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line1Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line1\"),\n name = editForm(\"line1\").name, id = editForm(\"line1\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line1\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line2\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line2Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line2\"),\n name = editForm(\"line2\").name, id = editForm(\"line2\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line2\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(\"DUMMY\"), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line3\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line3Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line3\"),\n name = editForm(\"line3\").name, id = editForm(\"line3\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line3\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"town\").value,\n label = Label(content = HtmlContent(messages(\"editPage.townLabel\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-level1\"),\n name = editForm(\"town\").name, id = editForm(\"town\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"town\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"postcode\").value,\n label = Label(content = HtmlContent(messages(\"editPage.postcodeLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"postal-code\"),\n name = editForm(\"postcode\").name, id = editForm(\"postcode\").name, classes = \"govuk-input--width-10\",\n errorMessage = editForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n @if(journeyData.countryCode.isDefined) {\n\n @textInput(Input(value =\n editForm(\"countryCode\").value.flatMap(c => countryService.find(isWelsh, code = c)).map(_.name),\n attributes = Map(\"disabled\" -> \"disabled\"),\n label = Label(content = HtmlContent(messages(\"editPage.countryLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"country\"),\n name = \"countryName\", id = \"countryName\",\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n <input type=\"hidden\" id=\"countryCode\" name=\"countryCode\" value=\"@editForm(\"countryCode\").value\" />\n } else {\n\n @select(components.Select(\n id = \"countryCode\",\n name = \"countryCode\",\n label = Label(content = HtmlContent(messages(\"editPage.countryLabel\"))),\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n items = ViewHelper.countriesToSelectItems(countries, editForm),\n formGroupClasses = \"form-field-group\"\n ))\n\n <script src=\"@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.js\")\" ></script>\n <script>\n accessibleAutocomplete.enhanceSelectElement({\n selectElement: document.getElementById(\"countryCode\"),\n name: 'countryCodeAutocomplete',\n defaultValue: '',\n showNoOptionsFound: false,\n @*\n TF-640: Had to override the onConfirm function to include custom validation for countries because null / undefined values are not handled by the Autocomplete form:\n https://github.com/alphagov/accessible-autocomplete/issues/260\n When this is fixed the custom validation / onConfirm bypass can be removed\n *@\n onConfirm: () => {\n const matchingOption = Array.from(document.querySelectorAll(\"#countryCode-select > option\")).find(function (c) {\n return c.text === document.getElementById(\"countryCode\").value;\n });\n const countryCode = matchingOption ? matchingOption.value : undefined;\n document.getElementById(\"countryCode-select\").value = countryCode;\n }\n })\n </script>\n }\n}\n","usages":["@button(Button(content = HtmlContent(messages(\"editPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/non_uk_mode_edit.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukInput#","variableName":"textInput","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import model._\n@import uk.gov.hmrc.govukfrontend.views.html.components\n@import views.html.templates.page_template\n@import address.v2.Country\n@import views.ViewHelper\n@import services.CountryService\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios, select: GovukSelect, page: page_template, govukFieldset: GovukFieldset, countryService: CountryService)\n\n@(id: String, journeyData: JourneyDataV2, editForm: Form[Edit], countries: Seq[Country], isWelsh: Boolean, isUKMode: Boolean = false)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@{\n def asSelectItem(c: Country) = SelectItem(value = Some(c.code), text = c.name)\n}\n@errorPrefix = @{s\"${messages(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(editForm.errors) {\n errorPrefix + messages(\"editPage.title\")\n } else {\n messages(\"editPage.title\")\n }\n}\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@addressLinesInputErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == messages(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-input--error\"\n case _ => \"\"\n }\n}\n\n@addressLinesFormGroupErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == messages(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-form-group--error\"\n case _ => \"\"\n }\n}\n\n@page(titleWithError, Some(editForm), journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{messages(\"editPage.heading\")}\n </h1>\n\n @form(routes.AbpAddressLookupController.handleEdit(id)) {\n @govukFieldset(Fieldset(html = inputHtml))\n\n @button(Button(content = HtmlContent(messages(\"editPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n\n@inputHtml = {\n @textInput(Input(value = editForm(\"organisation\").value,\n label = Label(content = HtmlContent(messages(\"editPage.organisationLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"organization\"),\n name = editForm(\"organisation\").name, id = editForm(\"organisation\").name, classes = \"govuk-input--width-20\",\n errorMessage = editForm(\"organisation\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line1\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line1Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line1\"),\n name = editForm(\"line1\").name, id = editForm(\"line1\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line1\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line2\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line2Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line2\"),\n name = editForm(\"line2\").name, id = editForm(\"line2\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line2\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(\"DUMMY\"), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line3\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line3Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line3\"),\n name = editForm(\"line3\").name, id = editForm(\"line3\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line3\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"town\").value,\n label = Label(content = HtmlContent(messages(\"editPage.townLabel\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-level1\"),\n name = editForm(\"town\").name, id = editForm(\"town\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"town\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"postcode\").value,\n label = Label(content = HtmlContent(messages(\"editPage.postcodeLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"postal-code\"),\n name = editForm(\"postcode\").name, id = editForm(\"postcode\").name, classes = \"govuk-input--width-10\",\n errorMessage = editForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n @if(journeyData.countryCode.isDefined) {\n\n @textInput(Input(value =\n editForm(\"countryCode\").value.flatMap(c => countryService.find(isWelsh, code = c)).map(_.name),\n attributes = Map(\"disabled\" -> \"disabled\"),\n label = Label(content = HtmlContent(messages(\"editPage.countryLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"country\"),\n name = \"countryName\", id = \"countryName\",\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n <input type=\"hidden\" id=\"countryCode\" name=\"countryCode\" value=\"@editForm(\"countryCode\").value\" />\n } else {\n\n @select(components.Select(\n id = \"countryCode\",\n name = \"countryCode\",\n label = Label(content = HtmlContent(messages(\"editPage.countryLabel\"))),\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n items = ViewHelper.countriesToSelectItems(countries, editForm),\n formGroupClasses = \"form-field-group\"\n ))\n\n <script src=\"@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.js\")\" ></script>\n <script>\n accessibleAutocomplete.enhanceSelectElement({\n selectElement: document.getElementById(\"countryCode\"),\n name: 'countryCodeAutocomplete',\n defaultValue: '',\n showNoOptionsFound: false,\n @*\n TF-640: Had to override the onConfirm function to include custom validation for countries because null / undefined values are not handled by the Autocomplete form:\n https://github.com/alphagov/accessible-autocomplete/issues/260\n When this is fixed the custom validation / onConfirm bypass can be removed\n *@\n onConfirm: () => {\n const matchingOption = Array.from(document.querySelectorAll(\"#countryCode-select > option\")).find(function (c) {\n return c.text === document.getElementById(\"countryCode\").value;\n });\n const countryCode = matchingOption ? matchingOption.value : undefined;\n document.getElementById(\"countryCode-select\").value = countryCode;\n }\n })\n </script>\n }\n}\n","usages":["@textInput(Input(value = editForm(\"organisation\").value,\n label = Label(content = HtmlContent(messages(\"editPage.organisationLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"organization\"),\n name = editForm(\"organisation\").name, id = editForm(\"organisation\").name, classes = \"govuk-input--width-20\",\n errorMessage = editForm(\"organisation\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))","@textInput(Input(value = editForm(\"line1\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line1Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line1\"),\n name = editForm(\"line1\").name, id = editForm(\"line1\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line1\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))","@textInput(Input(value = editForm(\"line2\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line2Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line2\"),\n name = editForm(\"line2\").name, id = editForm(\"line2\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line2\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(\"DUMMY\"), visuallyHiddenText = Some(messages(\"constants.error\"))))))","@textInput(Input(value = editForm(\"line3\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line3Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line3\"),\n name = editForm(\"line3\").name, id = editForm(\"line3\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line3\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))","@textInput(Input(value = editForm(\"town\").value,\n label = Label(content = HtmlContent(messages(\"editPage.townLabel\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-level1\"),\n name = editForm(\"town\").name, id = editForm(\"town\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"town\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))","@textInput(Input(value = editForm(\"postcode\").value,\n label = Label(content = HtmlContent(messages(\"editPage.postcodeLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"postal-code\"),\n name = editForm(\"postcode\").name, id = editForm(\"postcode\").name, classes = \"govuk-input--width-10\",\n errorMessage = editForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))","@textInput(Input(value =\n editForm(\"countryCode\").value.flatMap(c => countryService.find(isWelsh, code = c)).map(_.name),\n attributes = Map(\"disabled\" -> \"disabled\"),\n label = Label(content = HtmlContent(messages(\"editPage.countryLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"country\"),\n name = \"countryName\", id = \"countryName\",\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/non_uk_mode_edit.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukTextarea#","variableName":"textarea","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import model._\n@import uk.gov.hmrc.govukfrontend.views.html.components\n@import views.html.templates.page_template\n@import address.v2.Country\n@import views.ViewHelper\n@import services.CountryService\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios, select: GovukSelect, page: page_template, govukFieldset: GovukFieldset, countryService: CountryService)\n\n@(id: String, journeyData: JourneyDataV2, editForm: Form[Edit], countries: Seq[Country], isWelsh: Boolean, isUKMode: Boolean = false)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@{\n def asSelectItem(c: Country) = SelectItem(value = Some(c.code), text = c.name)\n}\n@errorPrefix = @{s\"${messages(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(editForm.errors) {\n errorPrefix + messages(\"editPage.title\")\n } else {\n messages(\"editPage.title\")\n }\n}\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@addressLinesInputErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == messages(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-input--error\"\n case _ => \"\"\n }\n}\n\n@addressLinesFormGroupErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == messages(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-form-group--error\"\n case _ => \"\"\n }\n}\n\n@page(titleWithError, Some(editForm), journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{messages(\"editPage.heading\")}\n </h1>\n\n @form(routes.AbpAddressLookupController.handleEdit(id)) {\n @govukFieldset(Fieldset(html = inputHtml))\n\n @button(Button(content = HtmlContent(messages(\"editPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n\n@inputHtml = {\n @textInput(Input(value = editForm(\"organisation\").value,\n label = Label(content = HtmlContent(messages(\"editPage.organisationLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"organization\"),\n name = editForm(\"organisation\").name, id = editForm(\"organisation\").name, classes = \"govuk-input--width-20\",\n errorMessage = editForm(\"organisation\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line1\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line1Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line1\"),\n name = editForm(\"line1\").name, id = editForm(\"line1\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line1\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line2\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line2Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line2\"),\n name = editForm(\"line2\").name, id = editForm(\"line2\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line2\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(\"DUMMY\"), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line3\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line3Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line3\"),\n name = editForm(\"line3\").name, id = editForm(\"line3\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line3\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"town\").value,\n label = Label(content = HtmlContent(messages(\"editPage.townLabel\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-level1\"),\n name = editForm(\"town\").name, id = editForm(\"town\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"town\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"postcode\").value,\n label = Label(content = HtmlContent(messages(\"editPage.postcodeLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"postal-code\"),\n name = editForm(\"postcode\").name, id = editForm(\"postcode\").name, classes = \"govuk-input--width-10\",\n errorMessage = editForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n @if(journeyData.countryCode.isDefined) {\n\n @textInput(Input(value =\n editForm(\"countryCode\").value.flatMap(c => countryService.find(isWelsh, code = c)).map(_.name),\n attributes = Map(\"disabled\" -> \"disabled\"),\n label = Label(content = HtmlContent(messages(\"editPage.countryLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"country\"),\n name = \"countryName\", id = \"countryName\",\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n <input type=\"hidden\" id=\"countryCode\" name=\"countryCode\" value=\"@editForm(\"countryCode\").value\" />\n } else {\n\n @select(components.Select(\n id = \"countryCode\",\n name = \"countryCode\",\n label = Label(content = HtmlContent(messages(\"editPage.countryLabel\"))),\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n items = ViewHelper.countriesToSelectItems(countries, editForm),\n formGroupClasses = \"form-field-group\"\n ))\n\n <script src=\"@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.js\")\" ></script>\n <script>\n accessibleAutocomplete.enhanceSelectElement({\n selectElement: document.getElementById(\"countryCode\"),\n name: 'countryCodeAutocomplete',\n defaultValue: '',\n showNoOptionsFound: false,\n @*\n TF-640: Had to override the onConfirm function to include custom validation for countries because null / undefined values are not handled by the Autocomplete form:\n https://github.com/alphagov/accessible-autocomplete/issues/260\n When this is fixed the custom validation / onConfirm bypass can be removed\n *@\n onConfirm: () => {\n const matchingOption = Array.from(document.querySelectorAll(\"#countryCode-select > option\")).find(function (c) {\n return c.text === document.getElementById(\"countryCode\").value;\n });\n const countryCode = matchingOption ? matchingOption.value : undefined;\n document.getElementById(\"countryCode-select\").value = countryCode;\n }\n })\n </script>\n }\n}\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/select.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukTextarea#","variableName":"textarea","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model.{Select => ModelSelect, _}\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios,\npage: page_template)\n@(id: String, journeyData: JourneyDataV2, selectForm: Form[ModelSelect], proposals: Proposals, formattedPostcode: String, filter: Option[String], firstSearch: Boolean, isWelsh: Boolean = false, isUKMode: Boolean = true)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@errorPrefix = @{s\"${messages(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(selectForm.errors) {\n errorPrefix + messages(\"selectPage.title\")} else {\n messages(\"selectPage.title\")}\n}\n\n@page(titleWithError, Some(selectForm), journeyData) {\n\n @if(filter.isDefined && !firstSearch) {\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">@{messages(\"selectPage.headingWithPostcode\")} @{formattedPostcode}</h1>\n <div class=\"form-field\">\n <p class=\"govuk-body\" id=\"no-results\">\n @{messages(\"constants.noResults\")} '@{filter.get}'.\n </p>\n <p class=\"govuk-body\">\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.lookup(id, Some(formattedPostcode), Some(filter.get))}\" id=\"differentAddress\">@{messages(\"constants.differentSearch\")}</a>\n </p>\n </div>\n } else {\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">@{messages(\"selectPage.heading\")}</h1>\n }\n\n @form(controllers.routes.AbpAddressLookupController.handleSelect(id, filter, formattedPostcode)) {\n <p class=\"govuk-!-margin-bottom-6 govuk-body\">\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.edit(id, Some(formattedPostcode))}\" id=\"editAddress\">@{messages(\"selectPage.editAddressLinkText\")}</a>\n </p>\n\n @radios(Radios(\n formGroupClasses = \"form-group\",\n errorMessage = selectForm(\"addressId\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n name = \"addressId\",\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = HtmlContent(messages(\"selectPage.proposalListLabel\")),\n classes = \"govuk-visually-hidden\"\n ))\n )),\n items = proposals.proposals match {\n case Some(ps) ⇒ ps.zipWithIndex.map { case (p, idx) ⇒\n RadioItem(\n content = HtmlContent(p.toDescription),\n value = Some(p.addressId),\n id = if (idx == 0) Some(\"addressId\") else Some(s\"addressId-$idx\"),\n checked = selectForm(s\"${p.addressId}\").value.isDefined)\n }\n case None ⇒ Seq.empty\n }))\n\n @if(resolvedConf.options.selectPageConfig.showSearchAgainLink) {\n <p class=\"govuk-!-margin-bottom-7\">\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.lookup(id)}\" id=\"searchAgainLink\">@{messages(\"confirmPage.searchAgainLinkText\")}</a>\n </p>\n }\n\n @button(Button(content = HtmlContent(messages(\"selectPage.submitLabel\")),\n name=Some(\"continue\"), inputType=Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/select.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukRadios#","variableName":"radios","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model.{Select => ModelSelect, _}\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios,\npage: page_template)\n@(id: String, journeyData: JourneyDataV2, selectForm: Form[ModelSelect], proposals: Proposals, formattedPostcode: String, filter: Option[String], firstSearch: Boolean, isWelsh: Boolean = false, isUKMode: Boolean = true)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@errorPrefix = @{s\"${messages(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(selectForm.errors) {\n errorPrefix + messages(\"selectPage.title\")} else {\n messages(\"selectPage.title\")}\n}\n\n@page(titleWithError, Some(selectForm), journeyData) {\n\n @if(filter.isDefined && !firstSearch) {\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">@{messages(\"selectPage.headingWithPostcode\")} @{formattedPostcode}</h1>\n <div class=\"form-field\">\n <p class=\"govuk-body\" id=\"no-results\">\n @{messages(\"constants.noResults\")} '@{filter.get}'.\n </p>\n <p class=\"govuk-body\">\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.lookup(id, Some(formattedPostcode), Some(filter.get))}\" id=\"differentAddress\">@{messages(\"constants.differentSearch\")}</a>\n </p>\n </div>\n } else {\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">@{messages(\"selectPage.heading\")}</h1>\n }\n\n @form(controllers.routes.AbpAddressLookupController.handleSelect(id, filter, formattedPostcode)) {\n <p class=\"govuk-!-margin-bottom-6 govuk-body\">\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.edit(id, Some(formattedPostcode))}\" id=\"editAddress\">@{messages(\"selectPage.editAddressLinkText\")}</a>\n </p>\n\n @radios(Radios(\n formGroupClasses = \"form-group\",\n errorMessage = selectForm(\"addressId\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n name = \"addressId\",\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = HtmlContent(messages(\"selectPage.proposalListLabel\")),\n classes = \"govuk-visually-hidden\"\n ))\n )),\n items = proposals.proposals match {\n case Some(ps) ⇒ ps.zipWithIndex.map { case (p, idx) ⇒\n RadioItem(\n content = HtmlContent(p.toDescription),\n value = Some(p.addressId),\n id = if (idx == 0) Some(\"addressId\") else Some(s\"addressId-$idx\"),\n checked = selectForm(s\"${p.addressId}\").value.isDefined)\n }\n case None ⇒ Seq.empty\n }))\n\n @if(resolvedConf.options.selectPageConfig.showSearchAgainLink) {\n <p class=\"govuk-!-margin-bottom-7\">\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.lookup(id)}\" id=\"searchAgainLink\">@{messages(\"confirmPage.searchAgainLinkText\")}</a>\n </p>\n }\n\n @button(Button(content = HtmlContent(messages(\"selectPage.submitLabel\")),\n name=Some(\"continue\"), inputType=Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n","usages":["@radios(Radios(\n formGroupClasses = \"form-group\",\n errorMessage = selectForm(\"addressId\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n name = \"addressId\",\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = HtmlContent(messages(\"selectPage.proposalListLabel\")),\n classes = \"govuk-visually-hidden\"\n ))\n )),\n items = proposals.proposals match {\n case Some(ps) ⇒ ps.zipWithIndex.map { case (p, idx) ⇒\n RadioItem(\n content = HtmlContent(p.toDescription),\n value = Some(p.addressId),\n id = if (idx == 0) Some(\"addressId\") else Some(s\"addressId-$idx\"),\n checked = selectForm(s\"${p.addressId}\").value.isDefined)\n }\n case None ⇒ Seq.empty\n }))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/select.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"form","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model.{Select => ModelSelect, _}\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios,\npage: page_template)\n@(id: String, journeyData: JourneyDataV2, selectForm: Form[ModelSelect], proposals: Proposals, formattedPostcode: String, filter: Option[String], firstSearch: Boolean, isWelsh: Boolean = false, isUKMode: Boolean = true)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@errorPrefix = @{s\"${messages(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(selectForm.errors) {\n errorPrefix + messages(\"selectPage.title\")} else {\n messages(\"selectPage.title\")}\n}\n\n@page(titleWithError, Some(selectForm), journeyData) {\n\n @if(filter.isDefined && !firstSearch) {\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">@{messages(\"selectPage.headingWithPostcode\")} @{formattedPostcode}</h1>\n <div class=\"form-field\">\n <p class=\"govuk-body\" id=\"no-results\">\n @{messages(\"constants.noResults\")} '@{filter.get}'.\n </p>\n <p class=\"govuk-body\">\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.lookup(id, Some(formattedPostcode), Some(filter.get))}\" id=\"differentAddress\">@{messages(\"constants.differentSearch\")}</a>\n </p>\n </div>\n } else {\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">@{messages(\"selectPage.heading\")}</h1>\n }\n\n @form(controllers.routes.AbpAddressLookupController.handleSelect(id, filter, formattedPostcode)) {\n <p class=\"govuk-!-margin-bottom-6 govuk-body\">\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.edit(id, Some(formattedPostcode))}\" id=\"editAddress\">@{messages(\"selectPage.editAddressLinkText\")}</a>\n </p>\n\n @radios(Radios(\n formGroupClasses = \"form-group\",\n errorMessage = selectForm(\"addressId\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n name = \"addressId\",\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = HtmlContent(messages(\"selectPage.proposalListLabel\")),\n classes = \"govuk-visually-hidden\"\n ))\n )),\n items = proposals.proposals match {\n case Some(ps) ⇒ ps.zipWithIndex.map { case (p, idx) ⇒\n RadioItem(\n content = HtmlContent(p.toDescription),\n value = Some(p.addressId),\n id = if (idx == 0) Some(\"addressId\") else Some(s\"addressId-$idx\"),\n checked = selectForm(s\"${p.addressId}\").value.isDefined)\n }\n case None ⇒ Seq.empty\n }))\n\n @if(resolvedConf.options.selectPageConfig.showSearchAgainLink) {\n <p class=\"govuk-!-margin-bottom-7\">\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.lookup(id)}\" id=\"searchAgainLink\">@{messages(\"confirmPage.searchAgainLinkText\")}</a>\n </p>\n }\n\n @button(Button(content = HtmlContent(messages(\"selectPage.submitLabel\")),\n name=Some(\"continue\"), inputType=Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n","usages":["@form(controllers.routes.AbpAddressLookupController.handleSelect(id, filter, formattedPostcode))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/select.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukButton#","variableName":"button","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model.{Select => ModelSelect, _}\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios,\npage: page_template)\n@(id: String, journeyData: JourneyDataV2, selectForm: Form[ModelSelect], proposals: Proposals, formattedPostcode: String, filter: Option[String], firstSearch: Boolean, isWelsh: Boolean = false, isUKMode: Boolean = true)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@errorPrefix = @{s\"${messages(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(selectForm.errors) {\n errorPrefix + messages(\"selectPage.title\")} else {\n messages(\"selectPage.title\")}\n}\n\n@page(titleWithError, Some(selectForm), journeyData) {\n\n @if(filter.isDefined && !firstSearch) {\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">@{messages(\"selectPage.headingWithPostcode\")} @{formattedPostcode}</h1>\n <div class=\"form-field\">\n <p class=\"govuk-body\" id=\"no-results\">\n @{messages(\"constants.noResults\")} '@{filter.get}'.\n </p>\n <p class=\"govuk-body\">\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.lookup(id, Some(formattedPostcode), Some(filter.get))}\" id=\"differentAddress\">@{messages(\"constants.differentSearch\")}</a>\n </p>\n </div>\n } else {\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">@{messages(\"selectPage.heading\")}</h1>\n }\n\n @form(controllers.routes.AbpAddressLookupController.handleSelect(id, filter, formattedPostcode)) {\n <p class=\"govuk-!-margin-bottom-6 govuk-body\">\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.edit(id, Some(formattedPostcode))}\" id=\"editAddress\">@{messages(\"selectPage.editAddressLinkText\")}</a>\n </p>\n\n @radios(Radios(\n formGroupClasses = \"form-group\",\n errorMessage = selectForm(\"addressId\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n name = \"addressId\",\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = HtmlContent(messages(\"selectPage.proposalListLabel\")),\n classes = \"govuk-visually-hidden\"\n ))\n )),\n items = proposals.proposals match {\n case Some(ps) ⇒ ps.zipWithIndex.map { case (p, idx) ⇒\n RadioItem(\n content = HtmlContent(p.toDescription),\n value = Some(p.addressId),\n id = if (idx == 0) Some(\"addressId\") else Some(s\"addressId-$idx\"),\n checked = selectForm(s\"${p.addressId}\").value.isDefined)\n }\n case None ⇒ Seq.empty\n }))\n\n @if(resolvedConf.options.selectPageConfig.showSearchAgainLink) {\n <p class=\"govuk-!-margin-bottom-7\">\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.lookup(id)}\" id=\"searchAgainLink\">@{messages(\"confirmPage.searchAgainLinkText\")}</a>\n </p>\n }\n\n @button(Button(content = HtmlContent(messages(\"selectPage.submitLabel\")),\n name=Some(\"continue\"), inputType=Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n","usages":["@button(Button(content = HtmlContent(messages(\"selectPage.submitLabel\")),\n name=Some(\"continue\"), inputType=Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/select.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukInput#","variableName":"textInput","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model.{Select => ModelSelect, _}\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios,\npage: page_template)\n@(id: String, journeyData: JourneyDataV2, selectForm: Form[ModelSelect], proposals: Proposals, formattedPostcode: String, filter: Option[String], firstSearch: Boolean, isWelsh: Boolean = false, isUKMode: Boolean = true)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@errorPrefix = @{s\"${messages(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(selectForm.errors) {\n errorPrefix + messages(\"selectPage.title\")} else {\n messages(\"selectPage.title\")}\n}\n\n@page(titleWithError, Some(selectForm), journeyData) {\n\n @if(filter.isDefined && !firstSearch) {\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">@{messages(\"selectPage.headingWithPostcode\")} @{formattedPostcode}</h1>\n <div class=\"form-field\">\n <p class=\"govuk-body\" id=\"no-results\">\n @{messages(\"constants.noResults\")} '@{filter.get}'.\n </p>\n <p class=\"govuk-body\">\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.lookup(id, Some(formattedPostcode), Some(filter.get))}\" id=\"differentAddress\">@{messages(\"constants.differentSearch\")}</a>\n </p>\n </div>\n } else {\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">@{messages(\"selectPage.heading\")}</h1>\n }\n\n @form(controllers.routes.AbpAddressLookupController.handleSelect(id, filter, formattedPostcode)) {\n <p class=\"govuk-!-margin-bottom-6 govuk-body\">\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.edit(id, Some(formattedPostcode))}\" id=\"editAddress\">@{messages(\"selectPage.editAddressLinkText\")}</a>\n </p>\n\n @radios(Radios(\n formGroupClasses = \"form-group\",\n errorMessage = selectForm(\"addressId\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n name = \"addressId\",\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = HtmlContent(messages(\"selectPage.proposalListLabel\")),\n classes = \"govuk-visually-hidden\"\n ))\n )),\n items = proposals.proposals match {\n case Some(ps) ⇒ ps.zipWithIndex.map { case (p, idx) ⇒\n RadioItem(\n content = HtmlContent(p.toDescription),\n value = Some(p.addressId),\n id = if (idx == 0) Some(\"addressId\") else Some(s\"addressId-$idx\"),\n checked = selectForm(s\"${p.addressId}\").value.isDefined)\n }\n case None ⇒ Seq.empty\n }))\n\n @if(resolvedConf.options.selectPageConfig.showSearchAgainLink) {\n <p class=\"govuk-!-margin-bottom-7\">\n <a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.lookup(id)}\" id=\"searchAgainLink\">@{messages(\"confirmPage.searchAgainLinkText\")}</a>\n </p>\n }\n\n @button(Button(content = HtmlContent(messages(\"selectPage.submitLabel\")),\n name=Some(\"continue\"), inputType=Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/too_many_results.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukButton#","variableName":"button","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model._\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n\n@this(button: GovukButton, page: page_template)\n@(id: String, journeyData: JourneyDataV2, formattedPostcode: String, filter: Option[String], firstLookup: Boolean, isWelsh: Boolean = false, isUKMode: Boolean = true)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@resolvedProposalListLimit = @{\n resolvedConf.options.selectPageConfig.proposalListLimit.get\n}\n\n@page(messages(\"constants.noResultsFoundTitle\"), None, journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{if(firstLookup) {\n messages(\"constants.tooManyResultsText\").replaceAll(\"\\\\$limit\", resolvedProposalListLimit.toString)\n } else {\n messages(\"constants.cannotFindText\")\n }}\n </h1>\n\n <p class=\"govuk-heading-m\" >@messages(\"constants.youEntered\")</p>\n <ul class=\"govuk-list govuk-list-bullet\">\n <li>@{formattedPostcode} @messages(\"constants.forPostcode\")</li>\n <li>@{filter.fold(messages(\"constants.nothingText\"))(\n f => s\"'$f' ${messages(\"constants.nameNumberText\")}\")}</li>\n\n </ul>\n <br />\n\n <p><a id=\"anotherSearch\" class=\"govuk-button\" href=\"@{routes.AbpAddressLookupController.lookup(id, Some(formattedPostcode), filter)}\">\n @messages(\"constants.anotherSearchText\")\n </a></p>\n\n <p><a class=\"govuk-link\" href=\"@{routes.AbpAddressLookupController.edit(id, Some(formattedPostcode))}\" id=\"enterManual\">@messages(\"constants.tooManyResultsManualLink\")</a></p>\n}\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/uk_mode_edit.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"form","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model._\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n@import address.v2.Country\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios,\nselect: GovukSelect, page: page_template, govukFieldset: GovukFieldset)\n@(id: String, journeyData: JourneyDataV2, editForm: Form[Edit], countries: Seq[Country], isWelsh: Boolean, isUKMode: Boolean = true)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@errorPrefix = @{s\"${messages(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(editForm.errors) {\n errorPrefix + messages(\"editPage.title\")\n } else {\n messages(\"editPage.title\")\n }\n}\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@addressLinesInputErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == messages(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-input--error\"\n case _ => \"\"\n }\n}\n\n@addressLinesFormGroupErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == messages(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-form-group--error\"\n case _ => \"\"\n }\n}\n\n@page(titleWithError, Some(editForm), journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{messages(\"editPage.heading\")}\n </h1>\n\n @form(routes.AbpAddressLookupController.handleEdit(id)) {\n @govukFieldset(Fieldset(html = inputHtml))\n\n @button(Button(content = HtmlContent(messages(\"editPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n\n@inputHtml = {\n @textInput(Input(value = editForm(\"organisation\").value,\n label = Label(content = HtmlContent(messages(\"editPage.organisationLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"organization\"),\n name = editForm(\"organisation\").name, id = editForm(\"organisation\").name, classes = \"govuk-input--width-20\",\n errorMessage = editForm(\"organisation\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line1\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line1Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line1\"),\n name = editForm(\"line1\").name, id = editForm(\"line1\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line1\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line2\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line2Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line2\"),\n name = editForm(\"line2\").name, id = editForm(\"line2\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line2\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line3\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line3Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line3\"),\n name = editForm(\"line3\").name, id = editForm(\"line3\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line3\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"town\").value,\n label = Label(content = HtmlContent(messages(\"editPage.townLabel\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-level1\"),\n name = editForm(\"town\").name, id = editForm(\"town\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"town\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"postcode\").value,\n label = Label(content = HtmlContent(messages(\"editPage.postcodeLabel.ukMode\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"postal-code\"),\n name = editForm(\"postcode\").name, id = editForm(\"postcode\").name, classes = \"govuk-input--width-10\",\n errorMessage = editForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n}\n","usages":["@form(routes.AbpAddressLookupController.handleEdit(id))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/uk_mode_edit.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukTextarea#","variableName":"textarea","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model._\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n@import address.v2.Country\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios,\nselect: GovukSelect, page: page_template, govukFieldset: GovukFieldset)\n@(id: String, journeyData: JourneyDataV2, editForm: Form[Edit], countries: Seq[Country], isWelsh: Boolean, isUKMode: Boolean = true)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@errorPrefix = @{s\"${messages(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(editForm.errors) {\n errorPrefix + messages(\"editPage.title\")\n } else {\n messages(\"editPage.title\")\n }\n}\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@addressLinesInputErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == messages(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-input--error\"\n case _ => \"\"\n }\n}\n\n@addressLinesFormGroupErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == messages(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-form-group--error\"\n case _ => \"\"\n }\n}\n\n@page(titleWithError, Some(editForm), journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{messages(\"editPage.heading\")}\n </h1>\n\n @form(routes.AbpAddressLookupController.handleEdit(id)) {\n @govukFieldset(Fieldset(html = inputHtml))\n\n @button(Button(content = HtmlContent(messages(\"editPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n\n@inputHtml = {\n @textInput(Input(value = editForm(\"organisation\").value,\n label = Label(content = HtmlContent(messages(\"editPage.organisationLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"organization\"),\n name = editForm(\"organisation\").name, id = editForm(\"organisation\").name, classes = \"govuk-input--width-20\",\n errorMessage = editForm(\"organisation\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line1\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line1Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line1\"),\n name = editForm(\"line1\").name, id = editForm(\"line1\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line1\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line2\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line2Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line2\"),\n name = editForm(\"line2\").name, id = editForm(\"line2\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line2\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line3\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line3Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line3\"),\n name = editForm(\"line3\").name, id = editForm(\"line3\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line3\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"town\").value,\n label = Label(content = HtmlContent(messages(\"editPage.townLabel\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-level1\"),\n name = editForm(\"town\").name, id = editForm(\"town\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"town\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"postcode\").value,\n label = Label(content = HtmlContent(messages(\"editPage.postcodeLabel.ukMode\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"postal-code\"),\n name = editForm(\"postcode\").name, id = editForm(\"postcode\").name, classes = \"govuk-input--width-10\",\n errorMessage = editForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n}\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/uk_mode_edit.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukInput#","variableName":"textInput","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model._\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n@import address.v2.Country\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios,\nselect: GovukSelect, page: page_template, govukFieldset: GovukFieldset)\n@(id: String, journeyData: JourneyDataV2, editForm: Form[Edit], countries: Seq[Country], isWelsh: Boolean, isUKMode: Boolean = true)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@errorPrefix = @{s\"${messages(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(editForm.errors) {\n errorPrefix + messages(\"editPage.title\")\n } else {\n messages(\"editPage.title\")\n }\n}\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@addressLinesInputErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == messages(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-input--error\"\n case _ => \"\"\n }\n}\n\n@addressLinesFormGroupErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == messages(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-form-group--error\"\n case _ => \"\"\n }\n}\n\n@page(titleWithError, Some(editForm), journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{messages(\"editPage.heading\")}\n </h1>\n\n @form(routes.AbpAddressLookupController.handleEdit(id)) {\n @govukFieldset(Fieldset(html = inputHtml))\n\n @button(Button(content = HtmlContent(messages(\"editPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n\n@inputHtml = {\n @textInput(Input(value = editForm(\"organisation\").value,\n label = Label(content = HtmlContent(messages(\"editPage.organisationLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"organization\"),\n name = editForm(\"organisation\").name, id = editForm(\"organisation\").name, classes = \"govuk-input--width-20\",\n errorMessage = editForm(\"organisation\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line1\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line1Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line1\"),\n name = editForm(\"line1\").name, id = editForm(\"line1\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line1\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line2\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line2Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line2\"),\n name = editForm(\"line2\").name, id = editForm(\"line2\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line2\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line3\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line3Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line3\"),\n name = editForm(\"line3\").name, id = editForm(\"line3\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line3\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"town\").value,\n label = Label(content = HtmlContent(messages(\"editPage.townLabel\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-level1\"),\n name = editForm(\"town\").name, id = editForm(\"town\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"town\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"postcode\").value,\n label = Label(content = HtmlContent(messages(\"editPage.postcodeLabel.ukMode\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"postal-code\"),\n name = editForm(\"postcode\").name, id = editForm(\"postcode\").name, classes = \"govuk-input--width-10\",\n errorMessage = editForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n}\n","usages":["@textInput(Input(value = editForm(\"organisation\").value,\n label = Label(content = HtmlContent(messages(\"editPage.organisationLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"organization\"),\n name = editForm(\"organisation\").name, id = editForm(\"organisation\").name, classes = \"govuk-input--width-20\",\n errorMessage = editForm(\"organisation\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))","@textInput(Input(value = editForm(\"line1\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line1Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line1\"),\n name = editForm(\"line1\").name, id = editForm(\"line1\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line1\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))","@textInput(Input(value = editForm(\"line2\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line2Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line2\"),\n name = editForm(\"line2\").name, id = editForm(\"line2\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line2\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))","@textInput(Input(value = editForm(\"line3\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line3Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line3\"),\n name = editForm(\"line3\").name, id = editForm(\"line3\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line3\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))","@textInput(Input(value = editForm(\"town\").value,\n label = Label(content = HtmlContent(messages(\"editPage.townLabel\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-level1\"),\n name = editForm(\"town\").name, id = editForm(\"town\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"town\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))","@textInput(Input(value = editForm(\"postcode\").value,\n label = Label(content = HtmlContent(messages(\"editPage.postcodeLabel.ukMode\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"postal-code\"),\n name = editForm(\"postcode\").name, id = editForm(\"postcode\").name, classes = \"govuk-input--width-10\",\n errorMessage = editForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/uk_mode_edit.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukSelect#","variableName":"select","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model._\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n@import address.v2.Country\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios,\nselect: GovukSelect, page: page_template, govukFieldset: GovukFieldset)\n@(id: String, journeyData: JourneyDataV2, editForm: Form[Edit], countries: Seq[Country], isWelsh: Boolean, isUKMode: Boolean = true)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@errorPrefix = @{s\"${messages(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(editForm.errors) {\n errorPrefix + messages(\"editPage.title\")\n } else {\n messages(\"editPage.title\")\n }\n}\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@addressLinesInputErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == messages(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-input--error\"\n case _ => \"\"\n }\n}\n\n@addressLinesFormGroupErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == messages(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-form-group--error\"\n case _ => \"\"\n }\n}\n\n@page(titleWithError, Some(editForm), journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{messages(\"editPage.heading\")}\n </h1>\n\n @form(routes.AbpAddressLookupController.handleEdit(id)) {\n @govukFieldset(Fieldset(html = inputHtml))\n\n @button(Button(content = HtmlContent(messages(\"editPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n\n@inputHtml = {\n @textInput(Input(value = editForm(\"organisation\").value,\n label = Label(content = HtmlContent(messages(\"editPage.organisationLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"organization\"),\n name = editForm(\"organisation\").name, id = editForm(\"organisation\").name, classes = \"govuk-input--width-20\",\n errorMessage = editForm(\"organisation\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line1\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line1Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line1\"),\n name = editForm(\"line1\").name, id = editForm(\"line1\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line1\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line2\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line2Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line2\"),\n name = editForm(\"line2\").name, id = editForm(\"line2\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line2\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line3\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line3Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line3\"),\n name = editForm(\"line3\").name, id = editForm(\"line3\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line3\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"town\").value,\n label = Label(content = HtmlContent(messages(\"editPage.townLabel\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-level1\"),\n name = editForm(\"town\").name, id = editForm(\"town\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"town\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"postcode\").value,\n label = Label(content = HtmlContent(messages(\"editPage.postcodeLabel.ukMode\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"postal-code\"),\n name = editForm(\"postcode\").name, id = editForm(\"postcode\").name, classes = \"govuk-input--width-10\",\n errorMessage = editForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n}\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/uk_mode_edit.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukRadios#","variableName":"radios","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model._\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n@import address.v2.Country\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios,\nselect: GovukSelect, page: page_template, govukFieldset: GovukFieldset)\n@(id: String, journeyData: JourneyDataV2, editForm: Form[Edit], countries: Seq[Country], isWelsh: Boolean, isUKMode: Boolean = true)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@errorPrefix = @{s\"${messages(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(editForm.errors) {\n errorPrefix + messages(\"editPage.title\")\n } else {\n messages(\"editPage.title\")\n }\n}\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@addressLinesInputErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == messages(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-input--error\"\n case _ => \"\"\n }\n}\n\n@addressLinesFormGroupErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == messages(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-form-group--error\"\n case _ => \"\"\n }\n}\n\n@page(titleWithError, Some(editForm), journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{messages(\"editPage.heading\")}\n </h1>\n\n @form(routes.AbpAddressLookupController.handleEdit(id)) {\n @govukFieldset(Fieldset(html = inputHtml))\n\n @button(Button(content = HtmlContent(messages(\"editPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n\n@inputHtml = {\n @textInput(Input(value = editForm(\"organisation\").value,\n label = Label(content = HtmlContent(messages(\"editPage.organisationLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"organization\"),\n name = editForm(\"organisation\").name, id = editForm(\"organisation\").name, classes = \"govuk-input--width-20\",\n errorMessage = editForm(\"organisation\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line1\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line1Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line1\"),\n name = editForm(\"line1\").name, id = editForm(\"line1\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line1\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line2\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line2Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line2\"),\n name = editForm(\"line2\").name, id = editForm(\"line2\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line2\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line3\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line3Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line3\"),\n name = editForm(\"line3\").name, id = editForm(\"line3\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line3\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"town\").value,\n label = Label(content = HtmlContent(messages(\"editPage.townLabel\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-level1\"),\n name = editForm(\"town\").name, id = editForm(\"town\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"town\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"postcode\").value,\n label = Label(content = HtmlContent(messages(\"editPage.postcodeLabel.ukMode\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"postal-code\"),\n name = editForm(\"postcode\").name, id = editForm(\"postcode\").name, classes = \"govuk-input--width-10\",\n errorMessage = editForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n}\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/uk_mode_edit.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukFieldset#","variableName":"govukFieldset","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model._\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n@import address.v2.Country\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios,\nselect: GovukSelect, page: page_template, govukFieldset: GovukFieldset)\n@(id: String, journeyData: JourneyDataV2, editForm: Form[Edit], countries: Seq[Country], isWelsh: Boolean, isUKMode: Boolean = true)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@errorPrefix = @{s\"${messages(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(editForm.errors) {\n errorPrefix + messages(\"editPage.title\")\n } else {\n messages(\"editPage.title\")\n }\n}\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@addressLinesInputErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == messages(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-input--error\"\n case _ => \"\"\n }\n}\n\n@addressLinesFormGroupErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == messages(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-form-group--error\"\n case _ => \"\"\n }\n}\n\n@page(titleWithError, Some(editForm), journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{messages(\"editPage.heading\")}\n </h1>\n\n @form(routes.AbpAddressLookupController.handleEdit(id)) {\n @govukFieldset(Fieldset(html = inputHtml))\n\n @button(Button(content = HtmlContent(messages(\"editPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n\n@inputHtml = {\n @textInput(Input(value = editForm(\"organisation\").value,\n label = Label(content = HtmlContent(messages(\"editPage.organisationLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"organization\"),\n name = editForm(\"organisation\").name, id = editForm(\"organisation\").name, classes = \"govuk-input--width-20\",\n errorMessage = editForm(\"organisation\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line1\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line1Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line1\"),\n name = editForm(\"line1\").name, id = editForm(\"line1\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line1\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line2\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line2Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line2\"),\n name = editForm(\"line2\").name, id = editForm(\"line2\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line2\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line3\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line3Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line3\"),\n name = editForm(\"line3\").name, id = editForm(\"line3\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line3\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"town\").value,\n label = Label(content = HtmlContent(messages(\"editPage.townLabel\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-level1\"),\n name = editForm(\"town\").name, id = editForm(\"town\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"town\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"postcode\").value,\n label = Label(content = HtmlContent(messages(\"editPage.postcodeLabel.ukMode\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"postal-code\"),\n name = editForm(\"postcode\").name, id = editForm(\"postcode\").name, classes = \"govuk-input--width-10\",\n errorMessage = editForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n}\n","usages":["@govukFieldset(Fieldset(html = inputHtml))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/abp/uk_mode_edit.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukButton#","variableName":"button","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model._\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n@import address.v2.Country\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios,\nselect: GovukSelect, page: page_template, govukFieldset: GovukFieldset)\n@(id: String, journeyData: JourneyDataV2, editForm: Form[Edit], countries: Seq[Country], isWelsh: Boolean, isUKMode: Boolean = true)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@errorPrefix = @{s\"${messages(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(editForm.errors) {\n errorPrefix + messages(\"editPage.title\")\n } else {\n messages(\"editPage.title\")\n }\n}\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@addressLinesInputErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == messages(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-input--error\"\n case _ => \"\"\n }\n}\n\n@addressLinesFormGroupErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == messages(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-form-group--error\"\n case _ => \"\"\n }\n}\n\n@page(titleWithError, Some(editForm), journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{messages(\"editPage.heading\")}\n </h1>\n\n @form(routes.AbpAddressLookupController.handleEdit(id)) {\n @govukFieldset(Fieldset(html = inputHtml))\n\n @button(Button(content = HtmlContent(messages(\"editPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n\n@inputHtml = {\n @textInput(Input(value = editForm(\"organisation\").value,\n label = Label(content = HtmlContent(messages(\"editPage.organisationLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"organization\"),\n name = editForm(\"organisation\").name, id = editForm(\"organisation\").name, classes = \"govuk-input--width-20\",\n errorMessage = editForm(\"organisation\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line1\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line1Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line1\"),\n name = editForm(\"line1\").name, id = editForm(\"line1\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line1\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line2\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line2Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line2\"),\n name = editForm(\"line2\").name, id = editForm(\"line2\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line2\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line3\").value,\n label = Label(content = HtmlContent(messages(\"editPage.line3Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line3\"),\n name = editForm(\"line3\").name, id = editForm(\"line3\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line3\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"town\").value,\n label = Label(content = HtmlContent(messages(\"editPage.townLabel\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-level1\"),\n name = editForm(\"town\").name, id = editForm(\"town\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"town\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"postcode\").value,\n label = Label(content = HtmlContent(messages(\"editPage.postcodeLabel.ukMode\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"postal-code\"),\n name = editForm(\"postcode\").name, id = editForm(\"postcode\").name, classes = \"govuk-input--width-10\",\n errorMessage = editForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n}\n","usages":["@button(Button(content = HtmlContent(messages(\"editPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/country_picker.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukButton#","variableName":"button","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model._\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n@import uk.gov.hmrc.govukfrontend.views.html.components\n@import address.v2.Country\n@import views.ViewHelper\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, select: GovukSelect, page: page_template)\n@(id: String,\n journeyData: JourneyDataV2,\n countryPickerForm: Form[CountryPicker],\n isWelsh: Boolean,\n countries: Seq[Country],\n message: Option[String] = None\n)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@errorPrefix = @{s\"${messages(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n val baseTitle = messages(\"countryPickerPage.title\")\n if(countryPickerForm.errors) {\n errorPrefix + baseTitle\n } else {\n baseTitle\n }\n}\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@page(titleWithError, Some(countryPickerForm), journeyData) {\n\n @form(routes.AddressLookupController.handleCountryPicker(id)) {\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @messages(\"countryPickerPage.heading\")\n </h1>\n\n @if(messages.isDefinedAt(\"countryPickerPage.afterHeadingText\")) {\n <div class=\"govuk-hint\" id=\"afterHeadingText\">@{messages(\"countryPickerPage.afterHeadingText\")}</div>\n }\n\n @if(message.isDefined) {\n <div class=\"highlight-message highlight-message--full-width\">\n <p>@{message.get}</p>\n </div>\n }\n\n @select(components.Select(\n id = \"countryCode\",\n name = \"countryCode\",\n label = Label(content = HtmlContent(messages(\"countryPickerPage.countryLabel\"))),\n errorMessage = countryPickerForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n items = ViewHelper.countriesToSelectItems(countries, countryPickerForm),\n formGroupClasses = \"form-field-group\"\n ))\n\n <script src=\"@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.js\")\" ></script>\n <script id=\"accessibilityAutocomplete\">\n accessibleAutocomplete.enhanceSelectElement({\n selectElement: document.getElementById(\"countryCode\"),\n name: 'countryCodeAutocomplete',\n defaultValue: '',\n tNoResults: () => '@messages(\"country.noResult\")' ,\n @*\n TF-640: Had to override the onConfirm function to include custom validation for countries because null / undefined values are not handled by the Autocomplete form:\n https://github.com/alphagov/accessible-autocomplete/issues/260\n When this is fixed the custom validation / onConfirm bypass can be removed\n *@\n onConfirm: () => {\n const matchingOption = Array.from(document.querySelectorAll(\"#countryCode-select > option\")).find(function (c) {\n return c.text === document.getElementById(\"countryCode\").value;\n });\n const countryCode = matchingOption ? matchingOption.value : undefined;\n document.getElementById(\"countryCode-select\").value = countryCode;\n }\n })\n </script>\n\n @button(Button(content = HtmlContent(messages(\"countryPickerPage.submitLabel\")),\n name=Some(\"continue\"),\n inputType=Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n","usages":["@button(Button(content = HtmlContent(messages(\"countryPickerPage.submitLabel\")),\n name=Some(\"continue\"),\n inputType=Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/country_picker.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukSelect#","variableName":"select","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model._\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n@import uk.gov.hmrc.govukfrontend.views.html.components\n@import address.v2.Country\n@import views.ViewHelper\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, select: GovukSelect, page: page_template)\n@(id: String,\n journeyData: JourneyDataV2,\n countryPickerForm: Form[CountryPicker],\n isWelsh: Boolean,\n countries: Seq[Country],\n message: Option[String] = None\n)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@errorPrefix = @{s\"${messages(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n val baseTitle = messages(\"countryPickerPage.title\")\n if(countryPickerForm.errors) {\n errorPrefix + baseTitle\n } else {\n baseTitle\n }\n}\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@page(titleWithError, Some(countryPickerForm), journeyData) {\n\n @form(routes.AddressLookupController.handleCountryPicker(id)) {\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @messages(\"countryPickerPage.heading\")\n </h1>\n\n @if(messages.isDefinedAt(\"countryPickerPage.afterHeadingText\")) {\n <div class=\"govuk-hint\" id=\"afterHeadingText\">@{messages(\"countryPickerPage.afterHeadingText\")}</div>\n }\n\n @if(message.isDefined) {\n <div class=\"highlight-message highlight-message--full-width\">\n <p>@{message.get}</p>\n </div>\n }\n\n @select(components.Select(\n id = \"countryCode\",\n name = \"countryCode\",\n label = Label(content = HtmlContent(messages(\"countryPickerPage.countryLabel\"))),\n errorMessage = countryPickerForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n items = ViewHelper.countriesToSelectItems(countries, countryPickerForm),\n formGroupClasses = \"form-field-group\"\n ))\n\n <script src=\"@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.js\")\" ></script>\n <script id=\"accessibilityAutocomplete\">\n accessibleAutocomplete.enhanceSelectElement({\n selectElement: document.getElementById(\"countryCode\"),\n name: 'countryCodeAutocomplete',\n defaultValue: '',\n tNoResults: () => '@messages(\"country.noResult\")' ,\n @*\n TF-640: Had to override the onConfirm function to include custom validation for countries because null / undefined values are not handled by the Autocomplete form:\n https://github.com/alphagov/accessible-autocomplete/issues/260\n When this is fixed the custom validation / onConfirm bypass can be removed\n *@\n onConfirm: () => {\n const matchingOption = Array.from(document.querySelectorAll(\"#countryCode-select > option\")).find(function (c) {\n return c.text === document.getElementById(\"countryCode\").value;\n });\n const countryCode = matchingOption ? matchingOption.value : undefined;\n document.getElementById(\"countryCode-select\").value = countryCode;\n }\n })\n </script>\n\n @button(Button(content = HtmlContent(messages(\"countryPickerPage.submitLabel\")),\n name=Some(\"continue\"),\n inputType=Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n","usages":["@select(components.Select(\n id = \"countryCode\",\n name = \"countryCode\",\n label = Label(content = HtmlContent(messages(\"countryPickerPage.countryLabel\"))),\n errorMessage = countryPickerForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n items = ViewHelper.countriesToSelectItems(countries, countryPickerForm),\n formGroupClasses = \"form-field-group\"\n ))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/country_picker.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"form","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model._\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n@import uk.gov.hmrc.govukfrontend.views.html.components\n@import address.v2.Country\n@import views.ViewHelper\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, select: GovukSelect, page: page_template)\n@(id: String,\n journeyData: JourneyDataV2,\n countryPickerForm: Form[CountryPicker],\n isWelsh: Boolean,\n countries: Seq[Country],\n message: Option[String] = None\n)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@errorPrefix = @{s\"${messages(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n val baseTitle = messages(\"countryPickerPage.title\")\n if(countryPickerForm.errors) {\n errorPrefix + baseTitle\n } else {\n baseTitle\n }\n}\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@page(titleWithError, Some(countryPickerForm), journeyData) {\n\n @form(routes.AddressLookupController.handleCountryPicker(id)) {\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @messages(\"countryPickerPage.heading\")\n </h1>\n\n @if(messages.isDefinedAt(\"countryPickerPage.afterHeadingText\")) {\n <div class=\"govuk-hint\" id=\"afterHeadingText\">@{messages(\"countryPickerPage.afterHeadingText\")}</div>\n }\n\n @if(message.isDefined) {\n <div class=\"highlight-message highlight-message--full-width\">\n <p>@{message.get}</p>\n </div>\n }\n\n @select(components.Select(\n id = \"countryCode\",\n name = \"countryCode\",\n label = Label(content = HtmlContent(messages(\"countryPickerPage.countryLabel\"))),\n errorMessage = countryPickerForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n items = ViewHelper.countriesToSelectItems(countries, countryPickerForm),\n formGroupClasses = \"form-field-group\"\n ))\n\n <script src=\"@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.js\")\" ></script>\n <script id=\"accessibilityAutocomplete\">\n accessibleAutocomplete.enhanceSelectElement({\n selectElement: document.getElementById(\"countryCode\"),\n name: 'countryCodeAutocomplete',\n defaultValue: '',\n tNoResults: () => '@messages(\"country.noResult\")' ,\n @*\n TF-640: Had to override the onConfirm function to include custom validation for countries because null / undefined values are not handled by the Autocomplete form:\n https://github.com/alphagov/accessible-autocomplete/issues/260\n When this is fixed the custom validation / onConfirm bypass can be removed\n *@\n onConfirm: () => {\n const matchingOption = Array.from(document.querySelectorAll(\"#countryCode-select > option\")).find(function (c) {\n return c.text === document.getElementById(\"countryCode\").value;\n });\n const countryCode = matchingOption ? matchingOption.value : undefined;\n document.getElementById(\"countryCode-select\").value = countryCode;\n }\n })\n </script>\n\n @button(Button(content = HtmlContent(messages(\"countryPickerPage.submitLabel\")),\n name=Some(\"continue\"),\n inputType=Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n","usages":["@form(routes.AddressLookupController.handleCountryPicker(id))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/country_picker.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukTextarea#","variableName":"textarea","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model._\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n@import uk.gov.hmrc.govukfrontend.views.html.components\n@import address.v2.Country\n@import views.ViewHelper\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, select: GovukSelect, page: page_template)\n@(id: String,\n journeyData: JourneyDataV2,\n countryPickerForm: Form[CountryPicker],\n isWelsh: Boolean,\n countries: Seq[Country],\n message: Option[String] = None\n)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@errorPrefix = @{s\"${messages(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n val baseTitle = messages(\"countryPickerPage.title\")\n if(countryPickerForm.errors) {\n errorPrefix + baseTitle\n } else {\n baseTitle\n }\n}\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@page(titleWithError, Some(countryPickerForm), journeyData) {\n\n @form(routes.AddressLookupController.handleCountryPicker(id)) {\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @messages(\"countryPickerPage.heading\")\n </h1>\n\n @if(messages.isDefinedAt(\"countryPickerPage.afterHeadingText\")) {\n <div class=\"govuk-hint\" id=\"afterHeadingText\">@{messages(\"countryPickerPage.afterHeadingText\")}</div>\n }\n\n @if(message.isDefined) {\n <div class=\"highlight-message highlight-message--full-width\">\n <p>@{message.get}</p>\n </div>\n }\n\n @select(components.Select(\n id = \"countryCode\",\n name = \"countryCode\",\n label = Label(content = HtmlContent(messages(\"countryPickerPage.countryLabel\"))),\n errorMessage = countryPickerForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n items = ViewHelper.countriesToSelectItems(countries, countryPickerForm),\n formGroupClasses = \"form-field-group\"\n ))\n\n <script src=\"@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.js\")\" ></script>\n <script id=\"accessibilityAutocomplete\">\n accessibleAutocomplete.enhanceSelectElement({\n selectElement: document.getElementById(\"countryCode\"),\n name: 'countryCodeAutocomplete',\n defaultValue: '',\n tNoResults: () => '@messages(\"country.noResult\")' ,\n @*\n TF-640: Had to override the onConfirm function to include custom validation for countries because null / undefined values are not handled by the Autocomplete form:\n https://github.com/alphagov/accessible-autocomplete/issues/260\n When this is fixed the custom validation / onConfirm bypass can be removed\n *@\n onConfirm: () => {\n const matchingOption = Array.from(document.querySelectorAll(\"#countryCode-select > option\")).find(function (c) {\n return c.text === document.getElementById(\"countryCode\").value;\n });\n const countryCode = matchingOption ? matchingOption.value : undefined;\n document.getElementById(\"countryCode-select\").value = countryCode;\n }\n })\n </script>\n\n @button(Button(content = HtmlContent(messages(\"countryPickerPage.submitLabel\")),\n name=Some(\"continue\"),\n inputType=Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/error_template.scala.html","component":"uk/gov/hmrc/hmrcfrontend/views/html/helpers/HmrcStandardFooter#","variableName":"standardFooter","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import config.FooterLinks\n@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcStandardFooter\n\n@this(govukLayout: GovukLayout, standardFooter: HmrcStandardFooter)\n\n@(title: String, heading: String, message: String)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@head = {\n <!--[if lte IE 8]><link href=' @controllers.routes.Assets.at(\"stylesheets/application-ie-8.css\")' rel=\"stylesheet\" type=\"text/css\" /><![endif]-->\n <!--[if gt IE 8]><!--> <link href='@controllers.routes.Assets.at(\"stylesheets/application.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" /><!--<![endif]-->\n <link href='@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n}\n\n@scriptElem = {\n <script src='@controllers.routes.Assets.at(\"lib/govuk-frontend/govuk/all.js\")'></script>\n <script src='@controllers.routes.Assets.at(\"lib/hmrc-frontend/hmrc/all.js\")'></script>\n <script>\n window.onpageshow = function (event) {\n const disabledButton = document.querySelector('button[disabled]');\n if(disabledButton) {\n disabledButton.disabled = false\n };\n };\n\n window.GOVUKFrontend.initAll();\n </script>\n}\n\n@fullTitle = @{\n if (messages.isDefinedAt(\"navTitle\")) s\"$title - ${messages(\"navTitle\")} - GOV.UK\"\n else title\n}\n\n@govukLayout(\n pageTitle = Some(fullTitle),\n headBlock = Some(head),\n scriptsBlock = Some(scriptElem),\n footerBlock = Some(standardFooter())) {\n\n <h1 class=\"govuk-heading-xl\">@{Text(heading).asHtml}</h1>\n <p class=\"govuk-body\">@{Text(message).asHtml}</p>\n}\n","usages":["standardFooter()"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/error_template.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukLayout#","variableName":"govukLayout","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import config.FooterLinks\n@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcStandardFooter\n\n@this(govukLayout: GovukLayout, standardFooter: HmrcStandardFooter)\n\n@(title: String, heading: String, message: String)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@head = {\n <!--[if lte IE 8]><link href=' @controllers.routes.Assets.at(\"stylesheets/application-ie-8.css\")' rel=\"stylesheet\" type=\"text/css\" /><![endif]-->\n <!--[if gt IE 8]><!--> <link href='@controllers.routes.Assets.at(\"stylesheets/application.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" /><!--<![endif]-->\n <link href='@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n}\n\n@scriptElem = {\n <script src='@controllers.routes.Assets.at(\"lib/govuk-frontend/govuk/all.js\")'></script>\n <script src='@controllers.routes.Assets.at(\"lib/hmrc-frontend/hmrc/all.js\")'></script>\n <script>\n window.onpageshow = function (event) {\n const disabledButton = document.querySelector('button[disabled]');\n if(disabledButton) {\n disabledButton.disabled = false\n };\n };\n\n window.GOVUKFrontend.initAll();\n </script>\n}\n\n@fullTitle = @{\n if (messages.isDefinedAt(\"navTitle\")) s\"$title - ${messages(\"navTitle\")} - GOV.UK\"\n else title\n}\n\n@govukLayout(\n pageTitle = Some(fullTitle),\n headBlock = Some(head),\n scriptsBlock = Some(scriptElem),\n footerBlock = Some(standardFooter())) {\n\n <h1 class=\"govuk-heading-xl\">@{Text(heading).asHtml}</h1>\n <p class=\"govuk-body\">@{Text(message).asHtml}</p>\n}\n","usages":["@govukLayout(\n pageTitle = Some(fullTitle),\n headBlock = Some(head),\n scriptsBlock = Some(scriptElem),\n footerBlock = Some(standardFooter()))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/international/confirm.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukButton#","variableName":"button","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import model._\n@import templates.{address_confirmation_display, page_template}\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput,\n radios: GovukRadios, select: GovukSelect, page: page_template)\n@(id: String, journeyData: JourneyDataV2, selectedAddress: Option[ConfirmableAddress], isWelsh: Boolean = false, isUKMode: Boolean = true)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@internationalMessage(key: String) = @{\n if (messages.isDefinedAt(s\"international.$key\"))\n messages(s\"international.$key\")\n else\n messages(key)\n}\n\n@page(internationalMessage(\"confirmPage.title\"), None, journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{internationalMessage(\"confirmPage.heading\")}\n </h1>\n\n @if(selectedAddress.isDefined) {\n @form(controllers.routes.InternationalAddressLookupController.handleConfirm(id)) {\n @if(resolvedConf.options.confirmPageConfig.showSubHeadingAndInfo) {\n <h2 class=\"govuk-heading-m\" id=\"infoSubheading\">@{internationalMessage(\"confirmPage.infoSubheading\")}</h2>\n <p class=\"govuk-body govuk-!-margin-bottom-6\" id=\"infoMessage\">@Html(internationalMessage(\"confirmPage.infoMessage\"))</p>\n }\n @address_confirmation_display(selectedAddress.get.address)\n\n @if(resolvedConf.options.confirmPageConfig.showSearchAgainLink) {\n <p>\n <a class=\"govuk-link\" href=\"@{routes.InternationalAddressLookupController.lookup(id, None)}\" id=\"searchAgainLink\">@{internationalMessage(\"confirmPage.searchAgainLinkText\")}</a>\n </p>\n }\n\n @if(resolvedConf.options.confirmPageConfig.showChangeLink) {\n <p class=\"govuk-!-margin-bottom-7\">\n <a class=\"govuk-link\" href=\"@{routes.InternationalAddressLookupController.edit(id)}\" id=\"changeLink\">@{internationalMessage(\"confirmPage.changeLinkText\")}</a>\n </p>\n }\n\n @if(resolvedConf.options.confirmPageConfig.showConfirmChangeText) {\n <p class=\"govuk-body\" id=\"confirmChangeText\">@internationalMessage(\"confirmPage.confirmChangeText\")</p>\n }\n\n @button(Button(content = HtmlContent(internationalMessage(\"confirmPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n } else {\n <p>@{\n internationalMessage(\"constants.confirmSelectedAddressError1\")\n } <a class=\"govuk-link\" href=\"@{\n routes.InternationalAddressLookupController.lookup(id, None)\n }\" id=\"lookupLink\">@{\n internationalMessage(\"constants.confirmSelectedAddressError2\")\n }</a>.</p>\n }\n}\n <!--TODO: Remove unreachable redirect to the lookup page-->\n","usages":["@button(Button(content = HtmlContent(internationalMessage(\"confirmPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/international/confirm.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"form","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import model._\n@import templates.{address_confirmation_display, page_template}\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput,\n radios: GovukRadios, select: GovukSelect, page: page_template)\n@(id: String, journeyData: JourneyDataV2, selectedAddress: Option[ConfirmableAddress], isWelsh: Boolean = false, isUKMode: Boolean = true)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@internationalMessage(key: String) = @{\n if (messages.isDefinedAt(s\"international.$key\"))\n messages(s\"international.$key\")\n else\n messages(key)\n}\n\n@page(internationalMessage(\"confirmPage.title\"), None, journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{internationalMessage(\"confirmPage.heading\")}\n </h1>\n\n @if(selectedAddress.isDefined) {\n @form(controllers.routes.InternationalAddressLookupController.handleConfirm(id)) {\n @if(resolvedConf.options.confirmPageConfig.showSubHeadingAndInfo) {\n <h2 class=\"govuk-heading-m\" id=\"infoSubheading\">@{internationalMessage(\"confirmPage.infoSubheading\")}</h2>\n <p class=\"govuk-body govuk-!-margin-bottom-6\" id=\"infoMessage\">@Html(internationalMessage(\"confirmPage.infoMessage\"))</p>\n }\n @address_confirmation_display(selectedAddress.get.address)\n\n @if(resolvedConf.options.confirmPageConfig.showSearchAgainLink) {\n <p>\n <a class=\"govuk-link\" href=\"@{routes.InternationalAddressLookupController.lookup(id, None)}\" id=\"searchAgainLink\">@{internationalMessage(\"confirmPage.searchAgainLinkText\")}</a>\n </p>\n }\n\n @if(resolvedConf.options.confirmPageConfig.showChangeLink) {\n <p class=\"govuk-!-margin-bottom-7\">\n <a class=\"govuk-link\" href=\"@{routes.InternationalAddressLookupController.edit(id)}\" id=\"changeLink\">@{internationalMessage(\"confirmPage.changeLinkText\")}</a>\n </p>\n }\n\n @if(resolvedConf.options.confirmPageConfig.showConfirmChangeText) {\n <p class=\"govuk-body\" id=\"confirmChangeText\">@internationalMessage(\"confirmPage.confirmChangeText\")</p>\n }\n\n @button(Button(content = HtmlContent(internationalMessage(\"confirmPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n } else {\n <p>@{\n internationalMessage(\"constants.confirmSelectedAddressError1\")\n } <a class=\"govuk-link\" href=\"@{\n routes.InternationalAddressLookupController.lookup(id, None)\n }\" id=\"lookupLink\">@{\n internationalMessage(\"constants.confirmSelectedAddressError2\")\n }</a>.</p>\n }\n}\n <!--TODO: Remove unreachable redirect to the lookup page-->\n","usages":["@form(controllers.routes.InternationalAddressLookupController.handleConfirm(id))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/international/confirm.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukRadios#","variableName":"radios","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import model._\n@import templates.{address_confirmation_display, page_template}\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput,\n radios: GovukRadios, select: GovukSelect, page: page_template)\n@(id: String, journeyData: JourneyDataV2, selectedAddress: Option[ConfirmableAddress], isWelsh: Boolean = false, isUKMode: Boolean = true)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@internationalMessage(key: String) = @{\n if (messages.isDefinedAt(s\"international.$key\"))\n messages(s\"international.$key\")\n else\n messages(key)\n}\n\n@page(internationalMessage(\"confirmPage.title\"), None, journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{internationalMessage(\"confirmPage.heading\")}\n </h1>\n\n @if(selectedAddress.isDefined) {\n @form(controllers.routes.InternationalAddressLookupController.handleConfirm(id)) {\n @if(resolvedConf.options.confirmPageConfig.showSubHeadingAndInfo) {\n <h2 class=\"govuk-heading-m\" id=\"infoSubheading\">@{internationalMessage(\"confirmPage.infoSubheading\")}</h2>\n <p class=\"govuk-body govuk-!-margin-bottom-6\" id=\"infoMessage\">@Html(internationalMessage(\"confirmPage.infoMessage\"))</p>\n }\n @address_confirmation_display(selectedAddress.get.address)\n\n @if(resolvedConf.options.confirmPageConfig.showSearchAgainLink) {\n <p>\n <a class=\"govuk-link\" href=\"@{routes.InternationalAddressLookupController.lookup(id, None)}\" id=\"searchAgainLink\">@{internationalMessage(\"confirmPage.searchAgainLinkText\")}</a>\n </p>\n }\n\n @if(resolvedConf.options.confirmPageConfig.showChangeLink) {\n <p class=\"govuk-!-margin-bottom-7\">\n <a class=\"govuk-link\" href=\"@{routes.InternationalAddressLookupController.edit(id)}\" id=\"changeLink\">@{internationalMessage(\"confirmPage.changeLinkText\")}</a>\n </p>\n }\n\n @if(resolvedConf.options.confirmPageConfig.showConfirmChangeText) {\n <p class=\"govuk-body\" id=\"confirmChangeText\">@internationalMessage(\"confirmPage.confirmChangeText\")</p>\n }\n\n @button(Button(content = HtmlContent(internationalMessage(\"confirmPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n } else {\n <p>@{\n internationalMessage(\"constants.confirmSelectedAddressError1\")\n } <a class=\"govuk-link\" href=\"@{\n routes.InternationalAddressLookupController.lookup(id, None)\n }\" id=\"lookupLink\">@{\n internationalMessage(\"constants.confirmSelectedAddressError2\")\n }</a>.</p>\n }\n}\n <!--TODO: Remove unreachable redirect to the lookup page-->\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/international/confirm.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukTextarea#","variableName":"textarea","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import model._\n@import templates.{address_confirmation_display, page_template}\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput,\n radios: GovukRadios, select: GovukSelect, page: page_template)\n@(id: String, journeyData: JourneyDataV2, selectedAddress: Option[ConfirmableAddress], isWelsh: Boolean = false, isUKMode: Boolean = true)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@internationalMessage(key: String) = @{\n if (messages.isDefinedAt(s\"international.$key\"))\n messages(s\"international.$key\")\n else\n messages(key)\n}\n\n@page(internationalMessage(\"confirmPage.title\"), None, journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{internationalMessage(\"confirmPage.heading\")}\n </h1>\n\n @if(selectedAddress.isDefined) {\n @form(controllers.routes.InternationalAddressLookupController.handleConfirm(id)) {\n @if(resolvedConf.options.confirmPageConfig.showSubHeadingAndInfo) {\n <h2 class=\"govuk-heading-m\" id=\"infoSubheading\">@{internationalMessage(\"confirmPage.infoSubheading\")}</h2>\n <p class=\"govuk-body govuk-!-margin-bottom-6\" id=\"infoMessage\">@Html(internationalMessage(\"confirmPage.infoMessage\"))</p>\n }\n @address_confirmation_display(selectedAddress.get.address)\n\n @if(resolvedConf.options.confirmPageConfig.showSearchAgainLink) {\n <p>\n <a class=\"govuk-link\" href=\"@{routes.InternationalAddressLookupController.lookup(id, None)}\" id=\"searchAgainLink\">@{internationalMessage(\"confirmPage.searchAgainLinkText\")}</a>\n </p>\n }\n\n @if(resolvedConf.options.confirmPageConfig.showChangeLink) {\n <p class=\"govuk-!-margin-bottom-7\">\n <a class=\"govuk-link\" href=\"@{routes.InternationalAddressLookupController.edit(id)}\" id=\"changeLink\">@{internationalMessage(\"confirmPage.changeLinkText\")}</a>\n </p>\n }\n\n @if(resolvedConf.options.confirmPageConfig.showConfirmChangeText) {\n <p class=\"govuk-body\" id=\"confirmChangeText\">@internationalMessage(\"confirmPage.confirmChangeText\")</p>\n }\n\n @button(Button(content = HtmlContent(internationalMessage(\"confirmPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n } else {\n <p>@{\n internationalMessage(\"constants.confirmSelectedAddressError1\")\n } <a class=\"govuk-link\" href=\"@{\n routes.InternationalAddressLookupController.lookup(id, None)\n }\" id=\"lookupLink\">@{\n internationalMessage(\"constants.confirmSelectedAddressError2\")\n }</a>.</p>\n }\n}\n <!--TODO: Remove unreachable redirect to the lookup page-->\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/international/confirm.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukSelect#","variableName":"select","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import model._\n@import templates.{address_confirmation_display, page_template}\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput,\n radios: GovukRadios, select: GovukSelect, page: page_template)\n@(id: String, journeyData: JourneyDataV2, selectedAddress: Option[ConfirmableAddress], isWelsh: Boolean = false, isUKMode: Boolean = true)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@internationalMessage(key: String) = @{\n if (messages.isDefinedAt(s\"international.$key\"))\n messages(s\"international.$key\")\n else\n messages(key)\n}\n\n@page(internationalMessage(\"confirmPage.title\"), None, journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{internationalMessage(\"confirmPage.heading\")}\n </h1>\n\n @if(selectedAddress.isDefined) {\n @form(controllers.routes.InternationalAddressLookupController.handleConfirm(id)) {\n @if(resolvedConf.options.confirmPageConfig.showSubHeadingAndInfo) {\n <h2 class=\"govuk-heading-m\" id=\"infoSubheading\">@{internationalMessage(\"confirmPage.infoSubheading\")}</h2>\n <p class=\"govuk-body govuk-!-margin-bottom-6\" id=\"infoMessage\">@Html(internationalMessage(\"confirmPage.infoMessage\"))</p>\n }\n @address_confirmation_display(selectedAddress.get.address)\n\n @if(resolvedConf.options.confirmPageConfig.showSearchAgainLink) {\n <p>\n <a class=\"govuk-link\" href=\"@{routes.InternationalAddressLookupController.lookup(id, None)}\" id=\"searchAgainLink\">@{internationalMessage(\"confirmPage.searchAgainLinkText\")}</a>\n </p>\n }\n\n @if(resolvedConf.options.confirmPageConfig.showChangeLink) {\n <p class=\"govuk-!-margin-bottom-7\">\n <a class=\"govuk-link\" href=\"@{routes.InternationalAddressLookupController.edit(id)}\" id=\"changeLink\">@{internationalMessage(\"confirmPage.changeLinkText\")}</a>\n </p>\n }\n\n @if(resolvedConf.options.confirmPageConfig.showConfirmChangeText) {\n <p class=\"govuk-body\" id=\"confirmChangeText\">@internationalMessage(\"confirmPage.confirmChangeText\")</p>\n }\n\n @button(Button(content = HtmlContent(internationalMessage(\"confirmPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n } else {\n <p>@{\n internationalMessage(\"constants.confirmSelectedAddressError1\")\n } <a class=\"govuk-link\" href=\"@{\n routes.InternationalAddressLookupController.lookup(id, None)\n }\" id=\"lookupLink\">@{\n internationalMessage(\"constants.confirmSelectedAddressError2\")\n }</a>.</p>\n }\n}\n <!--TODO: Remove unreachable redirect to the lookup page-->\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/international/confirm.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukInput#","variableName":"textInput","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import model._\n@import templates.{address_confirmation_display, page_template}\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput,\n radios: GovukRadios, select: GovukSelect, page: page_template)\n@(id: String, journeyData: JourneyDataV2, selectedAddress: Option[ConfirmableAddress], isWelsh: Boolean = false, isUKMode: Boolean = true)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@internationalMessage(key: String) = @{\n if (messages.isDefinedAt(s\"international.$key\"))\n messages(s\"international.$key\")\n else\n messages(key)\n}\n\n@page(internationalMessage(\"confirmPage.title\"), None, journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{internationalMessage(\"confirmPage.heading\")}\n </h1>\n\n @if(selectedAddress.isDefined) {\n @form(controllers.routes.InternationalAddressLookupController.handleConfirm(id)) {\n @if(resolvedConf.options.confirmPageConfig.showSubHeadingAndInfo) {\n <h2 class=\"govuk-heading-m\" id=\"infoSubheading\">@{internationalMessage(\"confirmPage.infoSubheading\")}</h2>\n <p class=\"govuk-body govuk-!-margin-bottom-6\" id=\"infoMessage\">@Html(internationalMessage(\"confirmPage.infoMessage\"))</p>\n }\n @address_confirmation_display(selectedAddress.get.address)\n\n @if(resolvedConf.options.confirmPageConfig.showSearchAgainLink) {\n <p>\n <a class=\"govuk-link\" href=\"@{routes.InternationalAddressLookupController.lookup(id, None)}\" id=\"searchAgainLink\">@{internationalMessage(\"confirmPage.searchAgainLinkText\")}</a>\n </p>\n }\n\n @if(resolvedConf.options.confirmPageConfig.showChangeLink) {\n <p class=\"govuk-!-margin-bottom-7\">\n <a class=\"govuk-link\" href=\"@{routes.InternationalAddressLookupController.edit(id)}\" id=\"changeLink\">@{internationalMessage(\"confirmPage.changeLinkText\")}</a>\n </p>\n }\n\n @if(resolvedConf.options.confirmPageConfig.showConfirmChangeText) {\n <p class=\"govuk-body\" id=\"confirmChangeText\">@internationalMessage(\"confirmPage.confirmChangeText\")</p>\n }\n\n @button(Button(content = HtmlContent(internationalMessage(\"confirmPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n } else {\n <p>@{\n internationalMessage(\"constants.confirmSelectedAddressError1\")\n } <a class=\"govuk-link\" href=\"@{\n routes.InternationalAddressLookupController.lookup(id, None)\n }\" id=\"lookupLink\">@{\n internationalMessage(\"constants.confirmSelectedAddressError2\")\n }</a>.</p>\n }\n}\n <!--TODO: Remove unreachable redirect to the lookup page-->\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/international/edit.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukSelect#","variableName":"select","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import model._\n@import uk.gov.hmrc.govukfrontend.views.html.components\n@import views.html.templates.page_template\n@import services.CountryService\n@import address.v2.Country\n@import views.ViewHelper\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios,\nselect: GovukSelect, page: page_template, govukFieldset: GovukFieldset, countryService: CountryService)\n@(id: String, journeyData: JourneyDataV2, editForm: Form[Edit], countries: Seq[Country], isWelsh: Boolean, isUKMode: Boolean = false)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@internationalMessage(key: String) = @{\n if (messages.isDefinedAt(s\"international.$key\"))\n messages(s\"international.$key\")\n else\n messages(key)\n}\n\n@errorPrefix = @{s\"${internationalMessage(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(editForm.errors) {\n errorPrefix + internationalMessage(\"editPage.title\")\n } else {\n internationalMessage(\"editPage.title\")\n }\n}\n\n@addressLinesInputErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == internationalMessage(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-input--error\"\n case _ => \"\"\n }\n}\n\n@addressLinesFormGroupErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == internationalMessage(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-form-group--error\"\n case _ => \"\"\n }\n}\n\n@page(titleWithError, Some(editForm), journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{internationalMessage(\"editPage.heading\")}\n </h1>\n\n @form(routes.InternationalAddressLookupController.handleEdit(id)) {\n @govukFieldset(Fieldset(html = inputHtml))\n\n @button(Button(content = HtmlContent(internationalMessage(\"editPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n\n@inputHtml = {\n @textInput(Input(value = editForm(\"organisation\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.organisationLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"organization\"),\n name = editForm(\"organisation\").name, id = editForm(\"organisation\").name, classes = \"govuk-input--width-20\",\n errorMessage = editForm(\"organisation\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line1\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.line1Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line1\"),\n name = editForm(\"line1\").name, id = editForm(\"line1\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line1\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line2\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.line2Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line2\"),\n name = editForm(\"line2\").name, id = editForm(\"line2\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line2\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(\"DUMMY\"), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line3\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.line3Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line3\"),\n name = editForm(\"line3\").name, id = editForm(\"line3\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line3\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"town\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.townLabel\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-level1\"),\n name = editForm(\"town\").name, id = editForm(\"town\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"town\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"postcode\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.postcodeLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"postal-code\"),\n name = editForm(\"postcode\").name, id = editForm(\"postcode\").name, classes = \"govuk-input--width-10\",\n errorMessage = editForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n @if(journeyData.countryCode.isDefined) {\n\n @textInput(Input(value =\n editForm(\"countryCode\").value.flatMap(c => countryService.find(isWelsh, code = c)).map(_.name),\n attributes = Map(\"disabled\" -> \"disabled\"),\n label = Label(content = HtmlContent(internationalMessage(\"editPage.countryLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"country\"),\n name = \"countryName\", id = \"countryName\",\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n <input type=\"hidden\" id=\"countryCode\" name=\"countryCode\" value=\"@editForm(\"countryCode\").value\" />\n } else {\n\n @select(components.Select(\n id = \"countryCode\",\n name = \"countryCode\",\n label = Label(content = HtmlContent(internationalMessage(\"editPage.countryLabel\"))),\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n items = ViewHelper.countriesToSelectItems(countries, editForm),\n formGroupClasses = \"form-field-group\"\n ))\n\n\n <script src=\"@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.js\")\" ></script>\n <script>\n accessibleAutocomplete.enhanceSelectElement({\n selectElement: document.getElementById(\"countryCode\"),\n name: 'countryCodeAutocomplete',\n defaultValue: '',\n showNoOptionsFound: false,\n @*\n TF-640: Had to override the onConfirm function to include custom validation for countries because null / undefined values are not handled by the Autocomplete form:\n https://github.com/alphagov/accessible-autocomplete/issues/260\n When this is fixed the custom validation / onConfirm bypass can be removed\n *@\n onConfirm: () => {\n const matchingOption = Array.from(document.querySelectorAll(\"#countryCode-select > option\")).find(function (c) {\n return c.text === document.getElementById(\"countryCode\").value;\n });\n const countryCode = matchingOption ? matchingOption.value : undefined;\n document.getElementById(\"countryCode-select\").value = countryCode;\n }\n })\n </script>\n }\n}\n","usages":["@select(components.Select(\n id = \"countryCode\",\n name = \"countryCode\",\n label = Label(content = HtmlContent(internationalMessage(\"editPage.countryLabel\"))),\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n items = ViewHelper.countriesToSelectItems(countries, editForm),\n formGroupClasses = \"form-field-group\"\n ))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/international/edit.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukButton#","variableName":"button","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import model._\n@import uk.gov.hmrc.govukfrontend.views.html.components\n@import views.html.templates.page_template\n@import services.CountryService\n@import address.v2.Country\n@import views.ViewHelper\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios,\nselect: GovukSelect, page: page_template, govukFieldset: GovukFieldset, countryService: CountryService)\n@(id: String, journeyData: JourneyDataV2, editForm: Form[Edit], countries: Seq[Country], isWelsh: Boolean, isUKMode: Boolean = false)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@internationalMessage(key: String) = @{\n if (messages.isDefinedAt(s\"international.$key\"))\n messages(s\"international.$key\")\n else\n messages(key)\n}\n\n@errorPrefix = @{s\"${internationalMessage(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(editForm.errors) {\n errorPrefix + internationalMessage(\"editPage.title\")\n } else {\n internationalMessage(\"editPage.title\")\n }\n}\n\n@addressLinesInputErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == internationalMessage(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-input--error\"\n case _ => \"\"\n }\n}\n\n@addressLinesFormGroupErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == internationalMessage(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-form-group--error\"\n case _ => \"\"\n }\n}\n\n@page(titleWithError, Some(editForm), journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{internationalMessage(\"editPage.heading\")}\n </h1>\n\n @form(routes.InternationalAddressLookupController.handleEdit(id)) {\n @govukFieldset(Fieldset(html = inputHtml))\n\n @button(Button(content = HtmlContent(internationalMessage(\"editPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n\n@inputHtml = {\n @textInput(Input(value = editForm(\"organisation\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.organisationLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"organization\"),\n name = editForm(\"organisation\").name, id = editForm(\"organisation\").name, classes = \"govuk-input--width-20\",\n errorMessage = editForm(\"organisation\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line1\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.line1Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line1\"),\n name = editForm(\"line1\").name, id = editForm(\"line1\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line1\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line2\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.line2Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line2\"),\n name = editForm(\"line2\").name, id = editForm(\"line2\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line2\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(\"DUMMY\"), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line3\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.line3Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line3\"),\n name = editForm(\"line3\").name, id = editForm(\"line3\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line3\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"town\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.townLabel\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-level1\"),\n name = editForm(\"town\").name, id = editForm(\"town\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"town\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"postcode\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.postcodeLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"postal-code\"),\n name = editForm(\"postcode\").name, id = editForm(\"postcode\").name, classes = \"govuk-input--width-10\",\n errorMessage = editForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n @if(journeyData.countryCode.isDefined) {\n\n @textInput(Input(value =\n editForm(\"countryCode\").value.flatMap(c => countryService.find(isWelsh, code = c)).map(_.name),\n attributes = Map(\"disabled\" -> \"disabled\"),\n label = Label(content = HtmlContent(internationalMessage(\"editPage.countryLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"country\"),\n name = \"countryName\", id = \"countryName\",\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n <input type=\"hidden\" id=\"countryCode\" name=\"countryCode\" value=\"@editForm(\"countryCode\").value\" />\n } else {\n\n @select(components.Select(\n id = \"countryCode\",\n name = \"countryCode\",\n label = Label(content = HtmlContent(internationalMessage(\"editPage.countryLabel\"))),\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n items = ViewHelper.countriesToSelectItems(countries, editForm),\n formGroupClasses = \"form-field-group\"\n ))\n\n\n <script src=\"@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.js\")\" ></script>\n <script>\n accessibleAutocomplete.enhanceSelectElement({\n selectElement: document.getElementById(\"countryCode\"),\n name: 'countryCodeAutocomplete',\n defaultValue: '',\n showNoOptionsFound: false,\n @*\n TF-640: Had to override the onConfirm function to include custom validation for countries because null / undefined values are not handled by the Autocomplete form:\n https://github.com/alphagov/accessible-autocomplete/issues/260\n When this is fixed the custom validation / onConfirm bypass can be removed\n *@\n onConfirm: () => {\n const matchingOption = Array.from(document.querySelectorAll(\"#countryCode-select > option\")).find(function (c) {\n return c.text === document.getElementById(\"countryCode\").value;\n });\n const countryCode = matchingOption ? matchingOption.value : undefined;\n document.getElementById(\"countryCode-select\").value = countryCode;\n }\n })\n </script>\n }\n}\n","usages":["@button(Button(content = HtmlContent(internationalMessage(\"editPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/international/edit.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukFieldset#","variableName":"govukFieldset","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import model._\n@import uk.gov.hmrc.govukfrontend.views.html.components\n@import views.html.templates.page_template\n@import services.CountryService\n@import address.v2.Country\n@import views.ViewHelper\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios,\nselect: GovukSelect, page: page_template, govukFieldset: GovukFieldset, countryService: CountryService)\n@(id: String, journeyData: JourneyDataV2, editForm: Form[Edit], countries: Seq[Country], isWelsh: Boolean, isUKMode: Boolean = false)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@internationalMessage(key: String) = @{\n if (messages.isDefinedAt(s\"international.$key\"))\n messages(s\"international.$key\")\n else\n messages(key)\n}\n\n@errorPrefix = @{s\"${internationalMessage(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(editForm.errors) {\n errorPrefix + internationalMessage(\"editPage.title\")\n } else {\n internationalMessage(\"editPage.title\")\n }\n}\n\n@addressLinesInputErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == internationalMessage(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-input--error\"\n case _ => \"\"\n }\n}\n\n@addressLinesFormGroupErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == internationalMessage(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-form-group--error\"\n case _ => \"\"\n }\n}\n\n@page(titleWithError, Some(editForm), journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{internationalMessage(\"editPage.heading\")}\n </h1>\n\n @form(routes.InternationalAddressLookupController.handleEdit(id)) {\n @govukFieldset(Fieldset(html = inputHtml))\n\n @button(Button(content = HtmlContent(internationalMessage(\"editPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n\n@inputHtml = {\n @textInput(Input(value = editForm(\"organisation\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.organisationLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"organization\"),\n name = editForm(\"organisation\").name, id = editForm(\"organisation\").name, classes = \"govuk-input--width-20\",\n errorMessage = editForm(\"organisation\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line1\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.line1Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line1\"),\n name = editForm(\"line1\").name, id = editForm(\"line1\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line1\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line2\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.line2Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line2\"),\n name = editForm(\"line2\").name, id = editForm(\"line2\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line2\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(\"DUMMY\"), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line3\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.line3Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line3\"),\n name = editForm(\"line3\").name, id = editForm(\"line3\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line3\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"town\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.townLabel\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-level1\"),\n name = editForm(\"town\").name, id = editForm(\"town\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"town\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"postcode\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.postcodeLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"postal-code\"),\n name = editForm(\"postcode\").name, id = editForm(\"postcode\").name, classes = \"govuk-input--width-10\",\n errorMessage = editForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n @if(journeyData.countryCode.isDefined) {\n\n @textInput(Input(value =\n editForm(\"countryCode\").value.flatMap(c => countryService.find(isWelsh, code = c)).map(_.name),\n attributes = Map(\"disabled\" -> \"disabled\"),\n label = Label(content = HtmlContent(internationalMessage(\"editPage.countryLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"country\"),\n name = \"countryName\", id = \"countryName\",\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n <input type=\"hidden\" id=\"countryCode\" name=\"countryCode\" value=\"@editForm(\"countryCode\").value\" />\n } else {\n\n @select(components.Select(\n id = \"countryCode\",\n name = \"countryCode\",\n label = Label(content = HtmlContent(internationalMessage(\"editPage.countryLabel\"))),\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n items = ViewHelper.countriesToSelectItems(countries, editForm),\n formGroupClasses = \"form-field-group\"\n ))\n\n\n <script src=\"@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.js\")\" ></script>\n <script>\n accessibleAutocomplete.enhanceSelectElement({\n selectElement: document.getElementById(\"countryCode\"),\n name: 'countryCodeAutocomplete',\n defaultValue: '',\n showNoOptionsFound: false,\n @*\n TF-640: Had to override the onConfirm function to include custom validation for countries because null / undefined values are not handled by the Autocomplete form:\n https://github.com/alphagov/accessible-autocomplete/issues/260\n When this is fixed the custom validation / onConfirm bypass can be removed\n *@\n onConfirm: () => {\n const matchingOption = Array.from(document.querySelectorAll(\"#countryCode-select > option\")).find(function (c) {\n return c.text === document.getElementById(\"countryCode\").value;\n });\n const countryCode = matchingOption ? matchingOption.value : undefined;\n document.getElementById(\"countryCode-select\").value = countryCode;\n }\n })\n </script>\n }\n}\n","usages":["@govukFieldset(Fieldset(html = inputHtml))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/international/edit.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"form","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import model._\n@import uk.gov.hmrc.govukfrontend.views.html.components\n@import views.html.templates.page_template\n@import services.CountryService\n@import address.v2.Country\n@import views.ViewHelper\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios,\nselect: GovukSelect, page: page_template, govukFieldset: GovukFieldset, countryService: CountryService)\n@(id: String, journeyData: JourneyDataV2, editForm: Form[Edit], countries: Seq[Country], isWelsh: Boolean, isUKMode: Boolean = false)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@internationalMessage(key: String) = @{\n if (messages.isDefinedAt(s\"international.$key\"))\n messages(s\"international.$key\")\n else\n messages(key)\n}\n\n@errorPrefix = @{s\"${internationalMessage(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(editForm.errors) {\n errorPrefix + internationalMessage(\"editPage.title\")\n } else {\n internationalMessage(\"editPage.title\")\n }\n}\n\n@addressLinesInputErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == internationalMessage(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-input--error\"\n case _ => \"\"\n }\n}\n\n@addressLinesFormGroupErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == internationalMessage(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-form-group--error\"\n case _ => \"\"\n }\n}\n\n@page(titleWithError, Some(editForm), journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{internationalMessage(\"editPage.heading\")}\n </h1>\n\n @form(routes.InternationalAddressLookupController.handleEdit(id)) {\n @govukFieldset(Fieldset(html = inputHtml))\n\n @button(Button(content = HtmlContent(internationalMessage(\"editPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n\n@inputHtml = {\n @textInput(Input(value = editForm(\"organisation\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.organisationLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"organization\"),\n name = editForm(\"organisation\").name, id = editForm(\"organisation\").name, classes = \"govuk-input--width-20\",\n errorMessage = editForm(\"organisation\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line1\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.line1Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line1\"),\n name = editForm(\"line1\").name, id = editForm(\"line1\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line1\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line2\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.line2Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line2\"),\n name = editForm(\"line2\").name, id = editForm(\"line2\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line2\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(\"DUMMY\"), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line3\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.line3Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line3\"),\n name = editForm(\"line3\").name, id = editForm(\"line3\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line3\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"town\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.townLabel\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-level1\"),\n name = editForm(\"town\").name, id = editForm(\"town\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"town\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"postcode\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.postcodeLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"postal-code\"),\n name = editForm(\"postcode\").name, id = editForm(\"postcode\").name, classes = \"govuk-input--width-10\",\n errorMessage = editForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n @if(journeyData.countryCode.isDefined) {\n\n @textInput(Input(value =\n editForm(\"countryCode\").value.flatMap(c => countryService.find(isWelsh, code = c)).map(_.name),\n attributes = Map(\"disabled\" -> \"disabled\"),\n label = Label(content = HtmlContent(internationalMessage(\"editPage.countryLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"country\"),\n name = \"countryName\", id = \"countryName\",\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n <input type=\"hidden\" id=\"countryCode\" name=\"countryCode\" value=\"@editForm(\"countryCode\").value\" />\n } else {\n\n @select(components.Select(\n id = \"countryCode\",\n name = \"countryCode\",\n label = Label(content = HtmlContent(internationalMessage(\"editPage.countryLabel\"))),\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n items = ViewHelper.countriesToSelectItems(countries, editForm),\n formGroupClasses = \"form-field-group\"\n ))\n\n\n <script src=\"@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.js\")\" ></script>\n <script>\n accessibleAutocomplete.enhanceSelectElement({\n selectElement: document.getElementById(\"countryCode\"),\n name: 'countryCodeAutocomplete',\n defaultValue: '',\n showNoOptionsFound: false,\n @*\n TF-640: Had to override the onConfirm function to include custom validation for countries because null / undefined values are not handled by the Autocomplete form:\n https://github.com/alphagov/accessible-autocomplete/issues/260\n When this is fixed the custom validation / onConfirm bypass can be removed\n *@\n onConfirm: () => {\n const matchingOption = Array.from(document.querySelectorAll(\"#countryCode-select > option\")).find(function (c) {\n return c.text === document.getElementById(\"countryCode\").value;\n });\n const countryCode = matchingOption ? matchingOption.value : undefined;\n document.getElementById(\"countryCode-select\").value = countryCode;\n }\n })\n </script>\n }\n}\n","usages":["@form(routes.InternationalAddressLookupController.handleEdit(id))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/international/edit.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukRadios#","variableName":"radios","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import model._\n@import uk.gov.hmrc.govukfrontend.views.html.components\n@import views.html.templates.page_template\n@import services.CountryService\n@import address.v2.Country\n@import views.ViewHelper\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios,\nselect: GovukSelect, page: page_template, govukFieldset: GovukFieldset, countryService: CountryService)\n@(id: String, journeyData: JourneyDataV2, editForm: Form[Edit], countries: Seq[Country], isWelsh: Boolean, isUKMode: Boolean = false)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@internationalMessage(key: String) = @{\n if (messages.isDefinedAt(s\"international.$key\"))\n messages(s\"international.$key\")\n else\n messages(key)\n}\n\n@errorPrefix = @{s\"${internationalMessage(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(editForm.errors) {\n errorPrefix + internationalMessage(\"editPage.title\")\n } else {\n internationalMessage(\"editPage.title\")\n }\n}\n\n@addressLinesInputErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == internationalMessage(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-input--error\"\n case _ => \"\"\n }\n}\n\n@addressLinesFormGroupErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == internationalMessage(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-form-group--error\"\n case _ => \"\"\n }\n}\n\n@page(titleWithError, Some(editForm), journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{internationalMessage(\"editPage.heading\")}\n </h1>\n\n @form(routes.InternationalAddressLookupController.handleEdit(id)) {\n @govukFieldset(Fieldset(html = inputHtml))\n\n @button(Button(content = HtmlContent(internationalMessage(\"editPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n\n@inputHtml = {\n @textInput(Input(value = editForm(\"organisation\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.organisationLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"organization\"),\n name = editForm(\"organisation\").name, id = editForm(\"organisation\").name, classes = \"govuk-input--width-20\",\n errorMessage = editForm(\"organisation\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line1\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.line1Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line1\"),\n name = editForm(\"line1\").name, id = editForm(\"line1\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line1\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line2\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.line2Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line2\"),\n name = editForm(\"line2\").name, id = editForm(\"line2\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line2\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(\"DUMMY\"), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line3\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.line3Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line3\"),\n name = editForm(\"line3\").name, id = editForm(\"line3\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line3\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"town\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.townLabel\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-level1\"),\n name = editForm(\"town\").name, id = editForm(\"town\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"town\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"postcode\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.postcodeLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"postal-code\"),\n name = editForm(\"postcode\").name, id = editForm(\"postcode\").name, classes = \"govuk-input--width-10\",\n errorMessage = editForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n @if(journeyData.countryCode.isDefined) {\n\n @textInput(Input(value =\n editForm(\"countryCode\").value.flatMap(c => countryService.find(isWelsh, code = c)).map(_.name),\n attributes = Map(\"disabled\" -> \"disabled\"),\n label = Label(content = HtmlContent(internationalMessage(\"editPage.countryLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"country\"),\n name = \"countryName\", id = \"countryName\",\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n <input type=\"hidden\" id=\"countryCode\" name=\"countryCode\" value=\"@editForm(\"countryCode\").value\" />\n } else {\n\n @select(components.Select(\n id = \"countryCode\",\n name = \"countryCode\",\n label = Label(content = HtmlContent(internationalMessage(\"editPage.countryLabel\"))),\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n items = ViewHelper.countriesToSelectItems(countries, editForm),\n formGroupClasses = \"form-field-group\"\n ))\n\n\n <script src=\"@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.js\")\" ></script>\n <script>\n accessibleAutocomplete.enhanceSelectElement({\n selectElement: document.getElementById(\"countryCode\"),\n name: 'countryCodeAutocomplete',\n defaultValue: '',\n showNoOptionsFound: false,\n @*\n TF-640: Had to override the onConfirm function to include custom validation for countries because null / undefined values are not handled by the Autocomplete form:\n https://github.com/alphagov/accessible-autocomplete/issues/260\n When this is fixed the custom validation / onConfirm bypass can be removed\n *@\n onConfirm: () => {\n const matchingOption = Array.from(document.querySelectorAll(\"#countryCode-select > option\")).find(function (c) {\n return c.text === document.getElementById(\"countryCode\").value;\n });\n const countryCode = matchingOption ? matchingOption.value : undefined;\n document.getElementById(\"countryCode-select\").value = countryCode;\n }\n })\n </script>\n }\n}\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/international/edit.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukInput#","variableName":"textInput","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import model._\n@import uk.gov.hmrc.govukfrontend.views.html.components\n@import views.html.templates.page_template\n@import services.CountryService\n@import address.v2.Country\n@import views.ViewHelper\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios,\nselect: GovukSelect, page: page_template, govukFieldset: GovukFieldset, countryService: CountryService)\n@(id: String, journeyData: JourneyDataV2, editForm: Form[Edit], countries: Seq[Country], isWelsh: Boolean, isUKMode: Boolean = false)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@internationalMessage(key: String) = @{\n if (messages.isDefinedAt(s\"international.$key\"))\n messages(s\"international.$key\")\n else\n messages(key)\n}\n\n@errorPrefix = @{s\"${internationalMessage(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(editForm.errors) {\n errorPrefix + internationalMessage(\"editPage.title\")\n } else {\n internationalMessage(\"editPage.title\")\n }\n}\n\n@addressLinesInputErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == internationalMessage(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-input--error\"\n case _ => \"\"\n }\n}\n\n@addressLinesFormGroupErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == internationalMessage(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-form-group--error\"\n case _ => \"\"\n }\n}\n\n@page(titleWithError, Some(editForm), journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{internationalMessage(\"editPage.heading\")}\n </h1>\n\n @form(routes.InternationalAddressLookupController.handleEdit(id)) {\n @govukFieldset(Fieldset(html = inputHtml))\n\n @button(Button(content = HtmlContent(internationalMessage(\"editPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n\n@inputHtml = {\n @textInput(Input(value = editForm(\"organisation\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.organisationLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"organization\"),\n name = editForm(\"organisation\").name, id = editForm(\"organisation\").name, classes = \"govuk-input--width-20\",\n errorMessage = editForm(\"organisation\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line1\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.line1Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line1\"),\n name = editForm(\"line1\").name, id = editForm(\"line1\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line1\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line2\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.line2Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line2\"),\n name = editForm(\"line2\").name, id = editForm(\"line2\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line2\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(\"DUMMY\"), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line3\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.line3Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line3\"),\n name = editForm(\"line3\").name, id = editForm(\"line3\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line3\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"town\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.townLabel\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-level1\"),\n name = editForm(\"town\").name, id = editForm(\"town\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"town\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"postcode\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.postcodeLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"postal-code\"),\n name = editForm(\"postcode\").name, id = editForm(\"postcode\").name, classes = \"govuk-input--width-10\",\n errorMessage = editForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n @if(journeyData.countryCode.isDefined) {\n\n @textInput(Input(value =\n editForm(\"countryCode\").value.flatMap(c => countryService.find(isWelsh, code = c)).map(_.name),\n attributes = Map(\"disabled\" -> \"disabled\"),\n label = Label(content = HtmlContent(internationalMessage(\"editPage.countryLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"country\"),\n name = \"countryName\", id = \"countryName\",\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n <input type=\"hidden\" id=\"countryCode\" name=\"countryCode\" value=\"@editForm(\"countryCode\").value\" />\n } else {\n\n @select(components.Select(\n id = \"countryCode\",\n name = \"countryCode\",\n label = Label(content = HtmlContent(internationalMessage(\"editPage.countryLabel\"))),\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n items = ViewHelper.countriesToSelectItems(countries, editForm),\n formGroupClasses = \"form-field-group\"\n ))\n\n\n <script src=\"@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.js\")\" ></script>\n <script>\n accessibleAutocomplete.enhanceSelectElement({\n selectElement: document.getElementById(\"countryCode\"),\n name: 'countryCodeAutocomplete',\n defaultValue: '',\n showNoOptionsFound: false,\n @*\n TF-640: Had to override the onConfirm function to include custom validation for countries because null / undefined values are not handled by the Autocomplete form:\n https://github.com/alphagov/accessible-autocomplete/issues/260\n When this is fixed the custom validation / onConfirm bypass can be removed\n *@\n onConfirm: () => {\n const matchingOption = Array.from(document.querySelectorAll(\"#countryCode-select > option\")).find(function (c) {\n return c.text === document.getElementById(\"countryCode\").value;\n });\n const countryCode = matchingOption ? matchingOption.value : undefined;\n document.getElementById(\"countryCode-select\").value = countryCode;\n }\n })\n </script>\n }\n}\n","usages":["@textInput(Input(value = editForm(\"organisation\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.organisationLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"organization\"),\n name = editForm(\"organisation\").name, id = editForm(\"organisation\").name, classes = \"govuk-input--width-20\",\n errorMessage = editForm(\"organisation\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))","@textInput(Input(value = editForm(\"line1\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.line1Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line1\"),\n name = editForm(\"line1\").name, id = editForm(\"line1\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line1\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))","@textInput(Input(value = editForm(\"line2\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.line2Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line2\"),\n name = editForm(\"line2\").name, id = editForm(\"line2\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line2\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(\"DUMMY\"), visuallyHiddenText = Some(messages(\"constants.error\"))))))","@textInput(Input(value = editForm(\"line3\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.line3Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line3\"),\n name = editForm(\"line3\").name, id = editForm(\"line3\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line3\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))","@textInput(Input(value = editForm(\"town\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.townLabel\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-level1\"),\n name = editForm(\"town\").name, id = editForm(\"town\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"town\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))","@textInput(Input(value = editForm(\"postcode\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.postcodeLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"postal-code\"),\n name = editForm(\"postcode\").name, id = editForm(\"postcode\").name, classes = \"govuk-input--width-10\",\n errorMessage = editForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))","@textInput(Input(value =\n editForm(\"countryCode\").value.flatMap(c => countryService.find(isWelsh, code = c)).map(_.name),\n attributes = Map(\"disabled\" -> \"disabled\"),\n label = Label(content = HtmlContent(internationalMessage(\"editPage.countryLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"country\"),\n name = \"countryName\", id = \"countryName\",\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/international/edit.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukTextarea#","variableName":"textarea","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import model._\n@import uk.gov.hmrc.govukfrontend.views.html.components\n@import views.html.templates.page_template\n@import services.CountryService\n@import address.v2.Country\n@import views.ViewHelper\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios,\nselect: GovukSelect, page: page_template, govukFieldset: GovukFieldset, countryService: CountryService)\n@(id: String, journeyData: JourneyDataV2, editForm: Form[Edit], countries: Seq[Country], isWelsh: Boolean, isUKMode: Boolean = false)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@internationalMessage(key: String) = @{\n if (messages.isDefinedAt(s\"international.$key\"))\n messages(s\"international.$key\")\n else\n messages(key)\n}\n\n@errorPrefix = @{s\"${internationalMessage(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(editForm.errors) {\n errorPrefix + internationalMessage(\"editPage.title\")\n } else {\n internationalMessage(\"editPage.title\")\n }\n}\n\n@addressLinesInputErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == internationalMessage(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-input--error\"\n case _ => \"\"\n }\n}\n\n@addressLinesFormGroupErrorClass = @{\n editForm(\"line1\").error match {\n case Some(x) if x.message == internationalMessage(s\"constants.editPageAtLeastOneLineOrTown\") => \"govuk-form-group--error\"\n case _ => \"\"\n }\n}\n\n@page(titleWithError, Some(editForm), journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{internationalMessage(\"editPage.heading\")}\n </h1>\n\n @form(routes.InternationalAddressLookupController.handleEdit(id)) {\n @govukFieldset(Fieldset(html = inputHtml))\n\n @button(Button(content = HtmlContent(internationalMessage(\"editPage.submitLabel\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n\n@inputHtml = {\n @textInput(Input(value = editForm(\"organisation\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.organisationLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"organization\"),\n name = editForm(\"organisation\").name, id = editForm(\"organisation\").name, classes = \"govuk-input--width-20\",\n errorMessage = editForm(\"organisation\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line1\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.line1Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line1\"),\n name = editForm(\"line1\").name, id = editForm(\"line1\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line1\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line2\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.line2Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line2\"),\n name = editForm(\"line2\").name, id = editForm(\"line2\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line2\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(\"DUMMY\"), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"line3\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.line3Label\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-line3\"),\n name = editForm(\"line3\").name, id = editForm(\"line3\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"line3\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"town\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.townLabel\"))),\n formGroupClasses = s\"form-field-group $addressLinesFormGroupErrorClass\", autocomplete = Some(\"address-level1\"),\n name = editForm(\"town\").name, id = editForm(\"town\").name, classes = s\"govuk-input--width-20 $addressLinesInputErrorClass\",\n errorMessage = editForm(\"town\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n @textInput(Input(value = editForm(\"postcode\").value,\n label = Label(content = HtmlContent(internationalMessage(\"editPage.postcodeLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"postal-code\"),\n name = editForm(\"postcode\").name, id = editForm(\"postcode\").name, classes = \"govuk-input--width-10\",\n errorMessage = editForm(\"postcode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n @if(journeyData.countryCode.isDefined) {\n\n @textInput(Input(value =\n editForm(\"countryCode\").value.flatMap(c => countryService.find(isWelsh, code = c)).map(_.name),\n attributes = Map(\"disabled\" -> \"disabled\"),\n label = Label(content = HtmlContent(internationalMessage(\"editPage.countryLabel\"))),\n formGroupClasses = \"form-field-group\", autocomplete = Some(\"country\"),\n name = \"countryName\", id = \"countryName\",\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\"))))))\n\n <input type=\"hidden\" id=\"countryCode\" name=\"countryCode\" value=\"@editForm(\"countryCode\").value\" />\n } else {\n\n @select(components.Select(\n id = \"countryCode\",\n name = \"countryCode\",\n label = Label(content = HtmlContent(internationalMessage(\"editPage.countryLabel\"))),\n errorMessage = editForm(\"countryCode\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n items = ViewHelper.countriesToSelectItems(countries, editForm),\n formGroupClasses = \"form-field-group\"\n ))\n\n\n <script src=\"@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.js\")\" ></script>\n <script>\n accessibleAutocomplete.enhanceSelectElement({\n selectElement: document.getElementById(\"countryCode\"),\n name: 'countryCodeAutocomplete',\n defaultValue: '',\n showNoOptionsFound: false,\n @*\n TF-640: Had to override the onConfirm function to include custom validation for countries because null / undefined values are not handled by the Autocomplete form:\n https://github.com/alphagov/accessible-autocomplete/issues/260\n When this is fixed the custom validation / onConfirm bypass can be removed\n *@\n onConfirm: () => {\n const matchingOption = Array.from(document.querySelectorAll(\"#countryCode-select > option\")).find(function (c) {\n return c.text === document.getElementById(\"countryCode\").value;\n });\n const countryCode = matchingOption ? matchingOption.value : undefined;\n document.getElementById(\"countryCode-select\").value = countryCode;\n }\n })\n </script>\n }\n}\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/international/lookup.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"form","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model._\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, page: page_template)\n@(id: String,\n journeyData: JourneyDataV2,\n lookupForm: Form[NonAbpLookup],\n isWelsh: Boolean,\n isUKMode: Boolean = true,\n message: Option[String] = None\n)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@internationalMessage(key: String) = @{\n if (messages.isDefinedAt(s\"international.$key\"))\n messages(s\"international.$key\")\n else\n messages(key)\n}\n\n@errorPrefix = @{s\"${internationalMessage(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n val baseTitle = internationalMessage(\"lookupPage.title\")\n if(lookupForm.errors) {\n errorPrefix + baseTitle\n } else {\n baseTitle\n }\n}\n\n\n@page(titleWithError, Some(lookupForm), journeyData) {\n\n @form(routes.InternationalAddressLookupController.postLookup(id)) {\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @internationalMessage(\"lookupPage.heading\")\n </h1>\n\n @if(messages.isDefinedAt(\"lookupPage.afterHeadingText\") || messages.isDefinedAt(\"international.lookupPage.afterHeadingText\")) {\n <div class=\"govuk-hint\" id=\"afterHeadingText\">@{internationalMessage(\"lookupPage.afterHeadingText\")}</div>\n }\n\n @if(message.isDefined) {\n <div class=\"highlight-message highlight-message--full-width\">\n <p>@{message.get}</p>\n </div>\n }\n\n @textInput(Input(\n label = Label(content = HtmlContent(internationalMessage(\"lookupPage.filterLabel\"))),\n name = lookupForm(\"filter\").name,\n value = lookupForm(\"filter\").value,\n classes = \"govuk-input--width-20\",\n id = lookupForm(\"filter\").id,\n errorMessage = lookupForm(\"filter\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n hint = Some(Hint(content = HtmlContent(internationalMessage(\"constants.lookupFilterHint\"))))))\n\n <p class=\"govuk-!-margin-bottom-6 govuk-body\">\n <a class=\"govuk-link\" href=\"@{routes.InternationalAddressLookupController.edit(id)}\" id=\"manualAddress\">@{internationalMessage(\"lookupPage.manualAddressLinkText\")}</a>\n </p>\n\n @button(Button(content = HtmlContent(internationalMessage(\"lookupPage.submitLabel\")),\n name=Some(\"continue\"),\n inputType=Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n","usages":["@form(routes.InternationalAddressLookupController.postLookup(id))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/international/lookup.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukTextarea#","variableName":"textarea","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model._\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, page: page_template)\n@(id: String,\n journeyData: JourneyDataV2,\n lookupForm: Form[NonAbpLookup],\n isWelsh: Boolean,\n isUKMode: Boolean = true,\n message: Option[String] = None\n)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@internationalMessage(key: String) = @{\n if (messages.isDefinedAt(s\"international.$key\"))\n messages(s\"international.$key\")\n else\n messages(key)\n}\n\n@errorPrefix = @{s\"${internationalMessage(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n val baseTitle = internationalMessage(\"lookupPage.title\")\n if(lookupForm.errors) {\n errorPrefix + baseTitle\n } else {\n baseTitle\n }\n}\n\n\n@page(titleWithError, Some(lookupForm), journeyData) {\n\n @form(routes.InternationalAddressLookupController.postLookup(id)) {\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @internationalMessage(\"lookupPage.heading\")\n </h1>\n\n @if(messages.isDefinedAt(\"lookupPage.afterHeadingText\") || messages.isDefinedAt(\"international.lookupPage.afterHeadingText\")) {\n <div class=\"govuk-hint\" id=\"afterHeadingText\">@{internationalMessage(\"lookupPage.afterHeadingText\")}</div>\n }\n\n @if(message.isDefined) {\n <div class=\"highlight-message highlight-message--full-width\">\n <p>@{message.get}</p>\n </div>\n }\n\n @textInput(Input(\n label = Label(content = HtmlContent(internationalMessage(\"lookupPage.filterLabel\"))),\n name = lookupForm(\"filter\").name,\n value = lookupForm(\"filter\").value,\n classes = \"govuk-input--width-20\",\n id = lookupForm(\"filter\").id,\n errorMessage = lookupForm(\"filter\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n hint = Some(Hint(content = HtmlContent(internationalMessage(\"constants.lookupFilterHint\"))))))\n\n <p class=\"govuk-!-margin-bottom-6 govuk-body\">\n <a class=\"govuk-link\" href=\"@{routes.InternationalAddressLookupController.edit(id)}\" id=\"manualAddress\">@{internationalMessage(\"lookupPage.manualAddressLinkText\")}</a>\n </p>\n\n @button(Button(content = HtmlContent(internationalMessage(\"lookupPage.submitLabel\")),\n name=Some(\"continue\"),\n inputType=Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/international/lookup.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukButton#","variableName":"button","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model._\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, page: page_template)\n@(id: String,\n journeyData: JourneyDataV2,\n lookupForm: Form[NonAbpLookup],\n isWelsh: Boolean,\n isUKMode: Boolean = true,\n message: Option[String] = None\n)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@internationalMessage(key: String) = @{\n if (messages.isDefinedAt(s\"international.$key\"))\n messages(s\"international.$key\")\n else\n messages(key)\n}\n\n@errorPrefix = @{s\"${internationalMessage(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n val baseTitle = internationalMessage(\"lookupPage.title\")\n if(lookupForm.errors) {\n errorPrefix + baseTitle\n } else {\n baseTitle\n }\n}\n\n\n@page(titleWithError, Some(lookupForm), journeyData) {\n\n @form(routes.InternationalAddressLookupController.postLookup(id)) {\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @internationalMessage(\"lookupPage.heading\")\n </h1>\n\n @if(messages.isDefinedAt(\"lookupPage.afterHeadingText\") || messages.isDefinedAt(\"international.lookupPage.afterHeadingText\")) {\n <div class=\"govuk-hint\" id=\"afterHeadingText\">@{internationalMessage(\"lookupPage.afterHeadingText\")}</div>\n }\n\n @if(message.isDefined) {\n <div class=\"highlight-message highlight-message--full-width\">\n <p>@{message.get}</p>\n </div>\n }\n\n @textInput(Input(\n label = Label(content = HtmlContent(internationalMessage(\"lookupPage.filterLabel\"))),\n name = lookupForm(\"filter\").name,\n value = lookupForm(\"filter\").value,\n classes = \"govuk-input--width-20\",\n id = lookupForm(\"filter\").id,\n errorMessage = lookupForm(\"filter\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n hint = Some(Hint(content = HtmlContent(internationalMessage(\"constants.lookupFilterHint\"))))))\n\n <p class=\"govuk-!-margin-bottom-6 govuk-body\">\n <a class=\"govuk-link\" href=\"@{routes.InternationalAddressLookupController.edit(id)}\" id=\"manualAddress\">@{internationalMessage(\"lookupPage.manualAddressLinkText\")}</a>\n </p>\n\n @button(Button(content = HtmlContent(internationalMessage(\"lookupPage.submitLabel\")),\n name=Some(\"continue\"),\n inputType=Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n","usages":["@button(Button(content = HtmlContent(internationalMessage(\"lookupPage.submitLabel\")),\n name=Some(\"continue\"),\n inputType=Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/international/lookup.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukInput#","variableName":"textInput","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model._\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, page: page_template)\n@(id: String,\n journeyData: JourneyDataV2,\n lookupForm: Form[NonAbpLookup],\n isWelsh: Boolean,\n isUKMode: Boolean = true,\n message: Option[String] = None\n)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@internationalMessage(key: String) = @{\n if (messages.isDefinedAt(s\"international.$key\"))\n messages(s\"international.$key\")\n else\n messages(key)\n}\n\n@errorPrefix = @{s\"${internationalMessage(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n val baseTitle = internationalMessage(\"lookupPage.title\")\n if(lookupForm.errors) {\n errorPrefix + baseTitle\n } else {\n baseTitle\n }\n}\n\n\n@page(titleWithError, Some(lookupForm), journeyData) {\n\n @form(routes.InternationalAddressLookupController.postLookup(id)) {\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @internationalMessage(\"lookupPage.heading\")\n </h1>\n\n @if(messages.isDefinedAt(\"lookupPage.afterHeadingText\") || messages.isDefinedAt(\"international.lookupPage.afterHeadingText\")) {\n <div class=\"govuk-hint\" id=\"afterHeadingText\">@{internationalMessage(\"lookupPage.afterHeadingText\")}</div>\n }\n\n @if(message.isDefined) {\n <div class=\"highlight-message highlight-message--full-width\">\n <p>@{message.get}</p>\n </div>\n }\n\n @textInput(Input(\n label = Label(content = HtmlContent(internationalMessage(\"lookupPage.filterLabel\"))),\n name = lookupForm(\"filter\").name,\n value = lookupForm(\"filter\").value,\n classes = \"govuk-input--width-20\",\n id = lookupForm(\"filter\").id,\n errorMessage = lookupForm(\"filter\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n hint = Some(Hint(content = HtmlContent(internationalMessage(\"constants.lookupFilterHint\"))))))\n\n <p class=\"govuk-!-margin-bottom-6 govuk-body\">\n <a class=\"govuk-link\" href=\"@{routes.InternationalAddressLookupController.edit(id)}\" id=\"manualAddress\">@{internationalMessage(\"lookupPage.manualAddressLinkText\")}</a>\n </p>\n\n @button(Button(content = HtmlContent(internationalMessage(\"lookupPage.submitLabel\")),\n name=Some(\"continue\"),\n inputType=Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n","usages":["@textInput(Input(\n label = Label(content = HtmlContent(internationalMessage(\"lookupPage.filterLabel\"))),\n name = lookupForm(\"filter\").name,\n value = lookupForm(\"filter\").value,\n classes = \"govuk-input--width-20\",\n id = lookupForm(\"filter\").id,\n errorMessage = lookupForm(\"filter\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n hint = Some(Hint(content = HtmlContent(internationalMessage(\"constants.lookupFilterHint\"))))))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/international/no_results.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"form","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model._\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n\n@this(form: FormWithCSRF, button: GovukButton, page: page_template)\n@(id: String, journeyData: JourneyDataV2, filter: String, isWelsh: Boolean = false)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@internationalMessage(key: String) = @{\n if (messages.isDefinedAt(s\"international.$key\"))\n messages(s\"international.$key\")\n else\n messages(key)\n}\n\n@page(s\"${internationalMessage(\"constants.noResultsPageHeading\")} $filter\", None, journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{s\"${internationalMessage(\"constants.noResultsPageHeading\")} $filter\"}\n </h1>\n\n @form(controllers.routes.InternationalAddressLookupController.lookup(id, Some(filter))) {\n <p><a class=\"govuk-link\" href=\"@{\n routes.InternationalAddressLookupController.edit(id)\n }\" id=\"enterManual\">@{\n internationalMessage(\"constants.noResultsPageEnterManually\")\n }</a></p>\n\n @button(Button(content = HtmlContent(internationalMessage(\"constants.noResultsPageDifferentPostcode\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n","usages":["@form(controllers.routes.InternationalAddressLookupController.lookup(id, Some(filter)))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/international/no_results.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukButton#","variableName":"button","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model._\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n\n@this(form: FormWithCSRF, button: GovukButton, page: page_template)\n@(id: String, journeyData: JourneyDataV2, filter: String, isWelsh: Boolean = false)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@internationalMessage(key: String) = @{\n if (messages.isDefinedAt(s\"international.$key\"))\n messages(s\"international.$key\")\n else\n messages(key)\n}\n\n@page(s\"${internationalMessage(\"constants.noResultsPageHeading\")} $filter\", None, journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{s\"${internationalMessage(\"constants.noResultsPageHeading\")} $filter\"}\n </h1>\n\n @form(controllers.routes.InternationalAddressLookupController.lookup(id, Some(filter))) {\n <p><a class=\"govuk-link\" href=\"@{\n routes.InternationalAddressLookupController.edit(id)\n }\" id=\"enterManual\">@{\n internationalMessage(\"constants.noResultsPageEnterManually\")\n }</a></p>\n\n @button(Button(content = HtmlContent(internationalMessage(\"constants.noResultsPageDifferentPostcode\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n","usages":["@button(Button(content = HtmlContent(internationalMessage(\"constants.noResultsPageDifferentPostcode\")),\n name = Some(\"continue\"),\n inputType = Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/international/select.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukRadios#","variableName":"radios","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model.{Select => ModelSelect, _}\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios, page: page_template)\n@(id: String, journeyData: JourneyDataV2, selectForm: Form[ModelSelect], proposals: Proposals, filter: String, firstSearch: Boolean, isWelsh: Boolean = false)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@internationalMessage(key: String) = @{\n if (messages.isDefinedAt(s\"international.$key\"))\n messages(s\"international.$key\")\n else\n messages(key)\n}\n\n@errorPrefix = @{s\"${internationalMessage(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(selectForm.errors) {\n errorPrefix + internationalMessage(\"selectPage.title\")} else {\n internationalMessage(\"selectPage.title\")}\n}\n\n@page(titleWithError, Some(selectForm), journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">@{internationalMessage(\"selectPage.heading\")}</h1>\n\n @form(controllers.routes.InternationalAddressLookupController.handleSelect(id, filter)) {\n <p class=\"govuk-!-margin-bottom-6 govuk-body\">\n <a class=\"govuk-link\" href=\"@{routes.InternationalAddressLookupController.edit(id)}\" id=\"editAddress\">@{internationalMessage(\"selectPage.editAddressLinkText\")}</a>\n </p>\n\n @radios(Radios(\n formGroupClasses = \"form-group\",\n errorMessage = selectForm(\"addressId\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n name = \"addressId\",\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = HtmlContent(internationalMessage(\"selectPage.proposalListLabel\")),\n classes = \"govuk-visually-hidden\"\n ))\n )),\n items = proposals.proposals match {\n case Some(ps) ⇒ ps.zipWithIndex.map { case (p, idx) ⇒\n RadioItem(\n content = HtmlContent(p.toDescription),\n value = Some(p.addressId),\n id = if (idx == 0) Some(\"addressId\") else Some(s\"addressId-$idx\"),\n checked = selectForm(s\"${p.addressId}\").value.isDefined)\n }\n case None ⇒ Seq.empty\n }))\n\n @if(resolvedConf.options.selectPageConfig.showSearchAgainLink) {\n <p class=\"govuk-!-margin-bottom-7\">\n <a class=\"govuk-link\" href=\"@{routes.InternationalAddressLookupController.lookup(id, Some(filter))}\" id=\"searchAgainLink\">@{internationalMessage(\"confirmPage.searchAgainLinkText\")}</a>\n </p>\n }\n\n @button(Button(content = HtmlContent(internationalMessage(\"selectPage.submitLabel\")),\n name=Some(\"continue\"), inputType=Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n","usages":["@radios(Radios(\n formGroupClasses = \"form-group\",\n errorMessage = selectForm(\"addressId\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n name = \"addressId\",\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = HtmlContent(internationalMessage(\"selectPage.proposalListLabel\")),\n classes = \"govuk-visually-hidden\"\n ))\n )),\n items = proposals.proposals match {\n case Some(ps) ⇒ ps.zipWithIndex.map { case (p, idx) ⇒\n RadioItem(\n content = HtmlContent(p.toDescription),\n value = Some(p.addressId),\n id = if (idx == 0) Some(\"addressId\") else Some(s\"addressId-$idx\"),\n checked = selectForm(s\"${p.addressId}\").value.isDefined)\n }\n case None ⇒ Seq.empty\n }))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/international/select.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukTextarea#","variableName":"textarea","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model.{Select => ModelSelect, _}\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios, page: page_template)\n@(id: String, journeyData: JourneyDataV2, selectForm: Form[ModelSelect], proposals: Proposals, filter: String, firstSearch: Boolean, isWelsh: Boolean = false)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@internationalMessage(key: String) = @{\n if (messages.isDefinedAt(s\"international.$key\"))\n messages(s\"international.$key\")\n else\n messages(key)\n}\n\n@errorPrefix = @{s\"${internationalMessage(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(selectForm.errors) {\n errorPrefix + internationalMessage(\"selectPage.title\")} else {\n internationalMessage(\"selectPage.title\")}\n}\n\n@page(titleWithError, Some(selectForm), journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">@{internationalMessage(\"selectPage.heading\")}</h1>\n\n @form(controllers.routes.InternationalAddressLookupController.handleSelect(id, filter)) {\n <p class=\"govuk-!-margin-bottom-6 govuk-body\">\n <a class=\"govuk-link\" href=\"@{routes.InternationalAddressLookupController.edit(id)}\" id=\"editAddress\">@{internationalMessage(\"selectPage.editAddressLinkText\")}</a>\n </p>\n\n @radios(Radios(\n formGroupClasses = \"form-group\",\n errorMessage = selectForm(\"addressId\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n name = \"addressId\",\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = HtmlContent(internationalMessage(\"selectPage.proposalListLabel\")),\n classes = \"govuk-visually-hidden\"\n ))\n )),\n items = proposals.proposals match {\n case Some(ps) ⇒ ps.zipWithIndex.map { case (p, idx) ⇒\n RadioItem(\n content = HtmlContent(p.toDescription),\n value = Some(p.addressId),\n id = if (idx == 0) Some(\"addressId\") else Some(s\"addressId-$idx\"),\n checked = selectForm(s\"${p.addressId}\").value.isDefined)\n }\n case None ⇒ Seq.empty\n }))\n\n @if(resolvedConf.options.selectPageConfig.showSearchAgainLink) {\n <p class=\"govuk-!-margin-bottom-7\">\n <a class=\"govuk-link\" href=\"@{routes.InternationalAddressLookupController.lookup(id, Some(filter))}\" id=\"searchAgainLink\">@{internationalMessage(\"confirmPage.searchAgainLinkText\")}</a>\n </p>\n }\n\n @button(Button(content = HtmlContent(internationalMessage(\"selectPage.submitLabel\")),\n name=Some(\"continue\"), inputType=Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/international/select.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukButton#","variableName":"button","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model.{Select => ModelSelect, _}\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios, page: page_template)\n@(id: String, journeyData: JourneyDataV2, selectForm: Form[ModelSelect], proposals: Proposals, filter: String, firstSearch: Boolean, isWelsh: Boolean = false)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@internationalMessage(key: String) = @{\n if (messages.isDefinedAt(s\"international.$key\"))\n messages(s\"international.$key\")\n else\n messages(key)\n}\n\n@errorPrefix = @{s\"${internationalMessage(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(selectForm.errors) {\n errorPrefix + internationalMessage(\"selectPage.title\")} else {\n internationalMessage(\"selectPage.title\")}\n}\n\n@page(titleWithError, Some(selectForm), journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">@{internationalMessage(\"selectPage.heading\")}</h1>\n\n @form(controllers.routes.InternationalAddressLookupController.handleSelect(id, filter)) {\n <p class=\"govuk-!-margin-bottom-6 govuk-body\">\n <a class=\"govuk-link\" href=\"@{routes.InternationalAddressLookupController.edit(id)}\" id=\"editAddress\">@{internationalMessage(\"selectPage.editAddressLinkText\")}</a>\n </p>\n\n @radios(Radios(\n formGroupClasses = \"form-group\",\n errorMessage = selectForm(\"addressId\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n name = \"addressId\",\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = HtmlContent(internationalMessage(\"selectPage.proposalListLabel\")),\n classes = \"govuk-visually-hidden\"\n ))\n )),\n items = proposals.proposals match {\n case Some(ps) ⇒ ps.zipWithIndex.map { case (p, idx) ⇒\n RadioItem(\n content = HtmlContent(p.toDescription),\n value = Some(p.addressId),\n id = if (idx == 0) Some(\"addressId\") else Some(s\"addressId-$idx\"),\n checked = selectForm(s\"${p.addressId}\").value.isDefined)\n }\n case None ⇒ Seq.empty\n }))\n\n @if(resolvedConf.options.selectPageConfig.showSearchAgainLink) {\n <p class=\"govuk-!-margin-bottom-7\">\n <a class=\"govuk-link\" href=\"@{routes.InternationalAddressLookupController.lookup(id, Some(filter))}\" id=\"searchAgainLink\">@{internationalMessage(\"confirmPage.searchAgainLinkText\")}</a>\n </p>\n }\n\n @button(Button(content = HtmlContent(internationalMessage(\"selectPage.submitLabel\")),\n name=Some(\"continue\"), inputType=Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n","usages":["@button(Button(content = HtmlContent(internationalMessage(\"selectPage.submitLabel\")),\n name=Some(\"continue\"), inputType=Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/international/select.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukInput#","variableName":"textInput","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model.{Select => ModelSelect, _}\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios, page: page_template)\n@(id: String, journeyData: JourneyDataV2, selectForm: Form[ModelSelect], proposals: Proposals, filter: String, firstSearch: Boolean, isWelsh: Boolean = false)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@internationalMessage(key: String) = @{\n if (messages.isDefinedAt(s\"international.$key\"))\n messages(s\"international.$key\")\n else\n messages(key)\n}\n\n@errorPrefix = @{s\"${internationalMessage(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(selectForm.errors) {\n errorPrefix + internationalMessage(\"selectPage.title\")} else {\n internationalMessage(\"selectPage.title\")}\n}\n\n@page(titleWithError, Some(selectForm), journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">@{internationalMessage(\"selectPage.heading\")}</h1>\n\n @form(controllers.routes.InternationalAddressLookupController.handleSelect(id, filter)) {\n <p class=\"govuk-!-margin-bottom-6 govuk-body\">\n <a class=\"govuk-link\" href=\"@{routes.InternationalAddressLookupController.edit(id)}\" id=\"editAddress\">@{internationalMessage(\"selectPage.editAddressLinkText\")}</a>\n </p>\n\n @radios(Radios(\n formGroupClasses = \"form-group\",\n errorMessage = selectForm(\"addressId\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n name = \"addressId\",\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = HtmlContent(internationalMessage(\"selectPage.proposalListLabel\")),\n classes = \"govuk-visually-hidden\"\n ))\n )),\n items = proposals.proposals match {\n case Some(ps) ⇒ ps.zipWithIndex.map { case (p, idx) ⇒\n RadioItem(\n content = HtmlContent(p.toDescription),\n value = Some(p.addressId),\n id = if (idx == 0) Some(\"addressId\") else Some(s\"addressId-$idx\"),\n checked = selectForm(s\"${p.addressId}\").value.isDefined)\n }\n case None ⇒ Seq.empty\n }))\n\n @if(resolvedConf.options.selectPageConfig.showSearchAgainLink) {\n <p class=\"govuk-!-margin-bottom-7\">\n <a class=\"govuk-link\" href=\"@{routes.InternationalAddressLookupController.lookup(id, Some(filter))}\" id=\"searchAgainLink\">@{internationalMessage(\"confirmPage.searchAgainLinkText\")}</a>\n </p>\n }\n\n @button(Button(content = HtmlContent(internationalMessage(\"selectPage.submitLabel\")),\n name=Some(\"continue\"), inputType=Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/international/select.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"form","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model.{Select => ModelSelect, _}\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, textInput: GovukInput, radios: GovukRadios, page: page_template)\n@(id: String, journeyData: JourneyDataV2, selectForm: Form[ModelSelect], proposals: Proposals, filter: String, firstSearch: Boolean, isWelsh: Boolean = false)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@internationalMessage(key: String) = @{\n if (messages.isDefinedAt(s\"international.$key\"))\n messages(s\"international.$key\")\n else\n messages(key)\n}\n\n@errorPrefix = @{s\"${internationalMessage(\"constants.error.prefix\")} \"}\n\n@titleWithError = @{\n if(selectForm.errors) {\n errorPrefix + internationalMessage(\"selectPage.title\")} else {\n internationalMessage(\"selectPage.title\")}\n}\n\n@page(titleWithError, Some(selectForm), journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">@{internationalMessage(\"selectPage.heading\")}</h1>\n\n @form(controllers.routes.InternationalAddressLookupController.handleSelect(id, filter)) {\n <p class=\"govuk-!-margin-bottom-6 govuk-body\">\n <a class=\"govuk-link\" href=\"@{routes.InternationalAddressLookupController.edit(id)}\" id=\"editAddress\">@{internationalMessage(\"selectPage.editAddressLinkText\")}</a>\n </p>\n\n @radios(Radios(\n formGroupClasses = \"form-group\",\n errorMessage = selectForm(\"addressId\").error.map(fe ⇒ ErrorMessage(content = HtmlContent(fe.message), visuallyHiddenText = Some(messages(\"constants.error\")))),\n name = \"addressId\",\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = HtmlContent(internationalMessage(\"selectPage.proposalListLabel\")),\n classes = \"govuk-visually-hidden\"\n ))\n )),\n items = proposals.proposals match {\n case Some(ps) ⇒ ps.zipWithIndex.map { case (p, idx) ⇒\n RadioItem(\n content = HtmlContent(p.toDescription),\n value = Some(p.addressId),\n id = if (idx == 0) Some(\"addressId\") else Some(s\"addressId-$idx\"),\n checked = selectForm(s\"${p.addressId}\").value.isDefined)\n }\n case None ⇒ Seq.empty\n }))\n\n @if(resolvedConf.options.selectPageConfig.showSearchAgainLink) {\n <p class=\"govuk-!-margin-bottom-7\">\n <a class=\"govuk-link\" href=\"@{routes.InternationalAddressLookupController.lookup(id, Some(filter))}\" id=\"searchAgainLink\">@{internationalMessage(\"confirmPage.searchAgainLinkText\")}</a>\n </p>\n }\n\n @button(Button(content = HtmlContent(internationalMessage(\"selectPage.submitLabel\")),\n name=Some(\"continue\"), inputType=Some(\"submit\"), attributes = Map(\"id\" -> \"continue\")))\n }\n}\n","usages":["@form(controllers.routes.InternationalAddressLookupController.handleSelect(id, filter))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/international/too_many_results.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukButton#","variableName":"button","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import model._\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n\n@this(button: GovukButton, page: page_template)\n@(id: String, journeyData: JourneyDataV2, filter: String, firstLookup: Boolean, isWelsh: Boolean = false)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@resolvedConf = @{\n journeyData.resolveConfigV2(appConfig)\n}\n\n@resolvedProposalListLimit = @{\n resolvedConf.options.selectPageConfig.proposalListLimit.get\n}\n\n@internationalMessage(key: String) = @{\n if (messages.isDefinedAt(s\"international.$key\"))\n messages(s\"international.$key\").replaceAll(\"\\\\$limit\", resolvedProposalListLimit.toString)\n else\n messages(key)\n}\n\n@page(internationalMessage(\"constants.noResultsFoundTitle\"), None, journeyData) {\n\n <h1 class=\"@{resolvedConf.options.pageHeadingStyle}\" id=\"pageHeading\">\n @{if(firstLookup) {\n internationalMessage(\"constants.tooManyResultsText\")\n } else {\n internationalMessage(\"constants.cannotFindText\")\n }}\n </h1>\n\n <p class=\"govuk-heading-m\" >@internationalMessage(\"constants.youEntered\")</p>\n <ul class=\"govuk-list govuk-list-bullet\">\n <li>@{s\"'${filter}' ${internationalMessage(\"constants.nameNumberText\")}\"}</li>\n </ul>\n <br />\n\n <p><a id=\"anotherSearch\" class=\"govuk-button\" href=\"@{routes.InternationalAddressLookupController.lookup(id, Some(filter))}\">\n @internationalMessage(\"constants.anotherSearchText\")\n </a></p>\n\n <p><a class=\"govuk-link\" href=\"@{routes.InternationalAddressLookupController.edit(id)}\" id=\"enterManual\">@internationalMessage(\"constants.tooManyResultsManualLink\")</a></p>\n}\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/templates/page_template.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"form","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.{FooterLinks, FrontendAppConfig}\n@import model.JourneyDataV2\n@import java.net.URI\n@import uk.gov.hmrc.hmrcfrontend.views.viewmodels.header.Header\n@import uk.gov.hmrc.govukfrontend.views.Aliases.Footer\n@import uk.gov.hmrc.govukfrontend.views.Aliases.Meta\n@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcStandardFooter\n\n@this(govukLayout: GovukLayout, footer: GovukFooter, banner: HmrcBanner, help: HmrcReportTechnicalIssue,\nform: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, govukBackLink: GovukBackLink, languageSwitch:\nHmrcLanguageSelect, errorSummary: GovukErrorSummary, phaseBanner: GovukPhaseBanner, timeoutDialog: HmrcTimeoutDialog,\nheader: HmrcHeader, standardFooter: HmrcStandardFooter)\n@(title: String, form: Option[Form[_]], journeyData: JourneyDataV2)(content: Html)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n @userAction = @{\n new URI(request.uri).getPath().split(\"/\").lastOption.getOrElse(\"\")\n }\n\n @head = {\n @resolvedJourneyConfig.options.timeoutConfig.map(t =>\n timeoutDialog(TimeoutDialog(\n language = Some(messages.lang.code),\n countdown = Some(120),\n title = None,\n keepAliveUrl = t.timeoutKeepAliveUrl.orElse(Some(\"/lookup-address/renewSession\")),\n timeout = Some(t.timeoutAmount),\n signOutUrl = Some(s\"/lookup-address/destroySession?timeoutUrl=${t.timeoutUrl}\")\n ))\n )\n <!--[if lte IE 8]><link href='@controllers.routes.Assets.at(\"stylesheets/application-ie-8.css\")' rel=\"stylesheet\" type=\"text/css\" /><![endif]-->\n <!--[if gt IE 8]><!--><link href='@controllers.routes.Assets.at(\"stylesheets/application.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" /><!--<![endif]-->\n <link href='@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n }\n\n @resolvedJourneyConfig = @{\n journeyData.resolveConfigV2(appConfig)\n }\n\n @scriptElem = {\n <script src='@controllers.routes.Assets.at(\"lib/govuk-frontend/govuk/all.js\")'></script>\n <script src='@controllers.routes.Assets.at(\"lib/hmrc-frontend/hmrc/all.js\")'></script>\n <script>\n window.onpageshow = function(event) {\n const disabledButton = document.querySelector('button[disabled]');\n if(disabledButton) {\n disabledButton.disabled = false\n };\n };\n\n window.GOVUKFrontend.initAll();\n const timeoutDialog = document.getElementsByName(\"hmrc-timeout-dialog\").item(0);\n if (timeoutDialog && window.HMRCFrontend.TimeoutDialog) {\n new window.HMRCFrontend.TimeoutDialog(timeoutDialog).init();\n }\n </script>\n }\n\n @beforeContent = {\n @if(resolvedJourneyConfig.options.showPhaseBanner){\n @phaseBanner(PhaseBanner(\n tag = Some(Tag(\n content = HtmlContent(resolvedJourneyConfig.options.phase)\n )),\n content = uk.gov.hmrc.govukfrontend.views.html.components.HtmlContent(\n messages(\"phaseBannerHtml\").replace(\"$link\", resolvedJourneyConfig.options.phaseFeedbackLink)\n )\n ))\n }\n\n @if(resolvedJourneyConfig.options.includeHMRCBranding) {\n @banner(Banner(language = appConfig.langToLanguage(messages.lang.code)))\n }\n\n @if(resolvedJourneyConfig.options.showBackButtons) {\n @govukBackLink(BackLink(href=\"javascript:history.back()\", content = HtmlContent(messages(\"constants.back\"))))\n }\n\n @if(!resolvedJourneyConfig.options.disableTranslations) {\n @languageSwitch(LanguageSelect(messages.lang.code match {\n case \"en\" ⇒ En\n case \"cy\" ⇒ Cy\n }, En -> s\"${controllers.routes.LanguageController.switchToLanguage(\"english\")}\",\n Cy -> s\"${controllers.routes.LanguageController.switchToLanguage(\"cymraeg\")}\"\n ))\n }\n }\n\n @fullTitle = @{\n if (messages.isDefinedAt(\"navTitle\")) s\"$title - ${messages(\"navTitle\")} - GOV.UK\"\n else title\n }\n\n @govukLayout(\n pageTitle = Some(fullTitle),\n headBlock = Some(head),\n headerBlock = Some(header(Header(\n signOutHref = resolvedJourneyConfig.options.signOutHref,\n homepageUrl = resolvedJourneyConfig.options.homeNavHref.getOrElse(\"https://www.gov.uk/\"),\n serviceName = if(messages.isDefinedAt(\"navTitle\")) Some(messages(\"navTitle\")) else None,\n serviceUrl = resolvedJourneyConfig.options.serviceHref.getOrElse(\"\"),\n language = if (messages.lang.code == \"cy\") Cy else En\n ))),\n beforeContentBlock = Some(beforeContent),\n scriptsBlock = Some(scriptElem),\n footerBlock = Some(standardFooter(accessibilityStatementUrl = resolvedJourneyConfig.options.accessibilityFooterUrl))\n ) {\n @form.map { f =>\n @if(f.hasErrors) {\n @errorSummary(ErrorSummary(title = HtmlContent(messages(\"constants.errorText\")),\n errorList = f.errors.map{error ⇒ ErrorLink(href=Some(s\"#${error.key}\"),\n content = HtmlContent(messages(error.message)))}))\n }\n }\n\n @content\n\n @help(ReportTechnicalIssue(\n serviceCode = resolvedJourneyConfig.options.deskProServiceName.getOrElse(appConfig.contactFormServiceIdentifier),\n language = messages.lang.code match {\n case \"en\" => En\n case \"cy\" => Cy\n }\n ))\n }\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/templates/page_template.scala.html","component":"uk/gov/hmrc/hmrcfrontend/views/html/components/HmrcReportTechnicalIssue#","variableName":"help","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.{FooterLinks, FrontendAppConfig}\n@import model.JourneyDataV2\n@import java.net.URI\n@import uk.gov.hmrc.hmrcfrontend.views.viewmodels.header.Header\n@import uk.gov.hmrc.govukfrontend.views.Aliases.Footer\n@import uk.gov.hmrc.govukfrontend.views.Aliases.Meta\n@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcStandardFooter\n\n@this(govukLayout: GovukLayout, footer: GovukFooter, banner: HmrcBanner, help: HmrcReportTechnicalIssue,\nform: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, govukBackLink: GovukBackLink, languageSwitch:\nHmrcLanguageSelect, errorSummary: GovukErrorSummary, phaseBanner: GovukPhaseBanner, timeoutDialog: HmrcTimeoutDialog,\nheader: HmrcHeader, standardFooter: HmrcStandardFooter)\n@(title: String, form: Option[Form[_]], journeyData: JourneyDataV2)(content: Html)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n @userAction = @{\n new URI(request.uri).getPath().split(\"/\").lastOption.getOrElse(\"\")\n }\n\n @head = {\n @resolvedJourneyConfig.options.timeoutConfig.map(t =>\n timeoutDialog(TimeoutDialog(\n language = Some(messages.lang.code),\n countdown = Some(120),\n title = None,\n keepAliveUrl = t.timeoutKeepAliveUrl.orElse(Some(\"/lookup-address/renewSession\")),\n timeout = Some(t.timeoutAmount),\n signOutUrl = Some(s\"/lookup-address/destroySession?timeoutUrl=${t.timeoutUrl}\")\n ))\n )\n <!--[if lte IE 8]><link href='@controllers.routes.Assets.at(\"stylesheets/application-ie-8.css\")' rel=\"stylesheet\" type=\"text/css\" /><![endif]-->\n <!--[if gt IE 8]><!--><link href='@controllers.routes.Assets.at(\"stylesheets/application.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" /><!--<![endif]-->\n <link href='@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n }\n\n @resolvedJourneyConfig = @{\n journeyData.resolveConfigV2(appConfig)\n }\n\n @scriptElem = {\n <script src='@controllers.routes.Assets.at(\"lib/govuk-frontend/govuk/all.js\")'></script>\n <script src='@controllers.routes.Assets.at(\"lib/hmrc-frontend/hmrc/all.js\")'></script>\n <script>\n window.onpageshow = function(event) {\n const disabledButton = document.querySelector('button[disabled]');\n if(disabledButton) {\n disabledButton.disabled = false\n };\n };\n\n window.GOVUKFrontend.initAll();\n const timeoutDialog = document.getElementsByName(\"hmrc-timeout-dialog\").item(0);\n if (timeoutDialog && window.HMRCFrontend.TimeoutDialog) {\n new window.HMRCFrontend.TimeoutDialog(timeoutDialog).init();\n }\n </script>\n }\n\n @beforeContent = {\n @if(resolvedJourneyConfig.options.showPhaseBanner){\n @phaseBanner(PhaseBanner(\n tag = Some(Tag(\n content = HtmlContent(resolvedJourneyConfig.options.phase)\n )),\n content = uk.gov.hmrc.govukfrontend.views.html.components.HtmlContent(\n messages(\"phaseBannerHtml\").replace(\"$link\", resolvedJourneyConfig.options.phaseFeedbackLink)\n )\n ))\n }\n\n @if(resolvedJourneyConfig.options.includeHMRCBranding) {\n @banner(Banner(language = appConfig.langToLanguage(messages.lang.code)))\n }\n\n @if(resolvedJourneyConfig.options.showBackButtons) {\n @govukBackLink(BackLink(href=\"javascript:history.back()\", content = HtmlContent(messages(\"constants.back\"))))\n }\n\n @if(!resolvedJourneyConfig.options.disableTranslations) {\n @languageSwitch(LanguageSelect(messages.lang.code match {\n case \"en\" ⇒ En\n case \"cy\" ⇒ Cy\n }, En -> s\"${controllers.routes.LanguageController.switchToLanguage(\"english\")}\",\n Cy -> s\"${controllers.routes.LanguageController.switchToLanguage(\"cymraeg\")}\"\n ))\n }\n }\n\n @fullTitle = @{\n if (messages.isDefinedAt(\"navTitle\")) s\"$title - ${messages(\"navTitle\")} - GOV.UK\"\n else title\n }\n\n @govukLayout(\n pageTitle = Some(fullTitle),\n headBlock = Some(head),\n headerBlock = Some(header(Header(\n signOutHref = resolvedJourneyConfig.options.signOutHref,\n homepageUrl = resolvedJourneyConfig.options.homeNavHref.getOrElse(\"https://www.gov.uk/\"),\n serviceName = if(messages.isDefinedAt(\"navTitle\")) Some(messages(\"navTitle\")) else None,\n serviceUrl = resolvedJourneyConfig.options.serviceHref.getOrElse(\"\"),\n language = if (messages.lang.code == \"cy\") Cy else En\n ))),\n beforeContentBlock = Some(beforeContent),\n scriptsBlock = Some(scriptElem),\n footerBlock = Some(standardFooter(accessibilityStatementUrl = resolvedJourneyConfig.options.accessibilityFooterUrl))\n ) {\n @form.map { f =>\n @if(f.hasErrors) {\n @errorSummary(ErrorSummary(title = HtmlContent(messages(\"constants.errorText\")),\n errorList = f.errors.map{error ⇒ ErrorLink(href=Some(s\"#${error.key}\"),\n content = HtmlContent(messages(error.message)))}))\n }\n }\n\n @content\n\n @help(ReportTechnicalIssue(\n serviceCode = resolvedJourneyConfig.options.deskProServiceName.getOrElse(appConfig.contactFormServiceIdentifier),\n language = messages.lang.code match {\n case \"en\" => En\n case \"cy\" => Cy\n }\n ))\n }\n","usages":["@help(ReportTechnicalIssue(\n serviceCode = resolvedJourneyConfig.options.deskProServiceName.getOrElse(appConfig.contactFormServiceIdentifier),\n language = messages.lang.code match {\n case \"en\" => En\n case \"cy\" => Cy\n }\n ))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/templates/page_template.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukErrorSummary#","variableName":"errorSummary","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.{FooterLinks, FrontendAppConfig}\n@import model.JourneyDataV2\n@import java.net.URI\n@import uk.gov.hmrc.hmrcfrontend.views.viewmodels.header.Header\n@import uk.gov.hmrc.govukfrontend.views.Aliases.Footer\n@import uk.gov.hmrc.govukfrontend.views.Aliases.Meta\n@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcStandardFooter\n\n@this(govukLayout: GovukLayout, footer: GovukFooter, banner: HmrcBanner, help: HmrcReportTechnicalIssue,\nform: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, govukBackLink: GovukBackLink, languageSwitch:\nHmrcLanguageSelect, errorSummary: GovukErrorSummary, phaseBanner: GovukPhaseBanner, timeoutDialog: HmrcTimeoutDialog,\nheader: HmrcHeader, standardFooter: HmrcStandardFooter)\n@(title: String, form: Option[Form[_]], journeyData: JourneyDataV2)(content: Html)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n @userAction = @{\n new URI(request.uri).getPath().split(\"/\").lastOption.getOrElse(\"\")\n }\n\n @head = {\n @resolvedJourneyConfig.options.timeoutConfig.map(t =>\n timeoutDialog(TimeoutDialog(\n language = Some(messages.lang.code),\n countdown = Some(120),\n title = None,\n keepAliveUrl = t.timeoutKeepAliveUrl.orElse(Some(\"/lookup-address/renewSession\")),\n timeout = Some(t.timeoutAmount),\n signOutUrl = Some(s\"/lookup-address/destroySession?timeoutUrl=${t.timeoutUrl}\")\n ))\n )\n <!--[if lte IE 8]><link href='@controllers.routes.Assets.at(\"stylesheets/application-ie-8.css\")' rel=\"stylesheet\" type=\"text/css\" /><![endif]-->\n <!--[if gt IE 8]><!--><link href='@controllers.routes.Assets.at(\"stylesheets/application.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" /><!--<![endif]-->\n <link href='@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n }\n\n @resolvedJourneyConfig = @{\n journeyData.resolveConfigV2(appConfig)\n }\n\n @scriptElem = {\n <script src='@controllers.routes.Assets.at(\"lib/govuk-frontend/govuk/all.js\")'></script>\n <script src='@controllers.routes.Assets.at(\"lib/hmrc-frontend/hmrc/all.js\")'></script>\n <script>\n window.onpageshow = function(event) {\n const disabledButton = document.querySelector('button[disabled]');\n if(disabledButton) {\n disabledButton.disabled = false\n };\n };\n\n window.GOVUKFrontend.initAll();\n const timeoutDialog = document.getElementsByName(\"hmrc-timeout-dialog\").item(0);\n if (timeoutDialog && window.HMRCFrontend.TimeoutDialog) {\n new window.HMRCFrontend.TimeoutDialog(timeoutDialog).init();\n }\n </script>\n }\n\n @beforeContent = {\n @if(resolvedJourneyConfig.options.showPhaseBanner){\n @phaseBanner(PhaseBanner(\n tag = Some(Tag(\n content = HtmlContent(resolvedJourneyConfig.options.phase)\n )),\n content = uk.gov.hmrc.govukfrontend.views.html.components.HtmlContent(\n messages(\"phaseBannerHtml\").replace(\"$link\", resolvedJourneyConfig.options.phaseFeedbackLink)\n )\n ))\n }\n\n @if(resolvedJourneyConfig.options.includeHMRCBranding) {\n @banner(Banner(language = appConfig.langToLanguage(messages.lang.code)))\n }\n\n @if(resolvedJourneyConfig.options.showBackButtons) {\n @govukBackLink(BackLink(href=\"javascript:history.back()\", content = HtmlContent(messages(\"constants.back\"))))\n }\n\n @if(!resolvedJourneyConfig.options.disableTranslations) {\n @languageSwitch(LanguageSelect(messages.lang.code match {\n case \"en\" ⇒ En\n case \"cy\" ⇒ Cy\n }, En -> s\"${controllers.routes.LanguageController.switchToLanguage(\"english\")}\",\n Cy -> s\"${controllers.routes.LanguageController.switchToLanguage(\"cymraeg\")}\"\n ))\n }\n }\n\n @fullTitle = @{\n if (messages.isDefinedAt(\"navTitle\")) s\"$title - ${messages(\"navTitle\")} - GOV.UK\"\n else title\n }\n\n @govukLayout(\n pageTitle = Some(fullTitle),\n headBlock = Some(head),\n headerBlock = Some(header(Header(\n signOutHref = resolvedJourneyConfig.options.signOutHref,\n homepageUrl = resolvedJourneyConfig.options.homeNavHref.getOrElse(\"https://www.gov.uk/\"),\n serviceName = if(messages.isDefinedAt(\"navTitle\")) Some(messages(\"navTitle\")) else None,\n serviceUrl = resolvedJourneyConfig.options.serviceHref.getOrElse(\"\"),\n language = if (messages.lang.code == \"cy\") Cy else En\n ))),\n beforeContentBlock = Some(beforeContent),\n scriptsBlock = Some(scriptElem),\n footerBlock = Some(standardFooter(accessibilityStatementUrl = resolvedJourneyConfig.options.accessibilityFooterUrl))\n ) {\n @form.map { f =>\n @if(f.hasErrors) {\n @errorSummary(ErrorSummary(title = HtmlContent(messages(\"constants.errorText\")),\n errorList = f.errors.map{error ⇒ ErrorLink(href=Some(s\"#${error.key}\"),\n content = HtmlContent(messages(error.message)))}))\n }\n }\n\n @content\n\n @help(ReportTechnicalIssue(\n serviceCode = resolvedJourneyConfig.options.deskProServiceName.getOrElse(appConfig.contactFormServiceIdentifier),\n language = messages.lang.code match {\n case \"en\" => En\n case \"cy\" => Cy\n }\n ))\n }\n","usages":["@errorSummary(ErrorSummary(title = HtmlContent(messages(\"constants.errorText\")),\n errorList = f.errors.map{error ⇒ ErrorLink(href=Some(s\"#${error.key}\"),\n content = HtmlContent(messages(error.message)))}))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/templates/page_template.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukTextarea#","variableName":"textarea","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.{FooterLinks, FrontendAppConfig}\n@import model.JourneyDataV2\n@import java.net.URI\n@import uk.gov.hmrc.hmrcfrontend.views.viewmodels.header.Header\n@import uk.gov.hmrc.govukfrontend.views.Aliases.Footer\n@import uk.gov.hmrc.govukfrontend.views.Aliases.Meta\n@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcStandardFooter\n\n@this(govukLayout: GovukLayout, footer: GovukFooter, banner: HmrcBanner, help: HmrcReportTechnicalIssue,\nform: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, govukBackLink: GovukBackLink, languageSwitch:\nHmrcLanguageSelect, errorSummary: GovukErrorSummary, phaseBanner: GovukPhaseBanner, timeoutDialog: HmrcTimeoutDialog,\nheader: HmrcHeader, standardFooter: HmrcStandardFooter)\n@(title: String, form: Option[Form[_]], journeyData: JourneyDataV2)(content: Html)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n @userAction = @{\n new URI(request.uri).getPath().split(\"/\").lastOption.getOrElse(\"\")\n }\n\n @head = {\n @resolvedJourneyConfig.options.timeoutConfig.map(t =>\n timeoutDialog(TimeoutDialog(\n language = Some(messages.lang.code),\n countdown = Some(120),\n title = None,\n keepAliveUrl = t.timeoutKeepAliveUrl.orElse(Some(\"/lookup-address/renewSession\")),\n timeout = Some(t.timeoutAmount),\n signOutUrl = Some(s\"/lookup-address/destroySession?timeoutUrl=${t.timeoutUrl}\")\n ))\n )\n <!--[if lte IE 8]><link href='@controllers.routes.Assets.at(\"stylesheets/application-ie-8.css\")' rel=\"stylesheet\" type=\"text/css\" /><![endif]-->\n <!--[if gt IE 8]><!--><link href='@controllers.routes.Assets.at(\"stylesheets/application.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" /><!--<![endif]-->\n <link href='@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n }\n\n @resolvedJourneyConfig = @{\n journeyData.resolveConfigV2(appConfig)\n }\n\n @scriptElem = {\n <script src='@controllers.routes.Assets.at(\"lib/govuk-frontend/govuk/all.js\")'></script>\n <script src='@controllers.routes.Assets.at(\"lib/hmrc-frontend/hmrc/all.js\")'></script>\n <script>\n window.onpageshow = function(event) {\n const disabledButton = document.querySelector('button[disabled]');\n if(disabledButton) {\n disabledButton.disabled = false\n };\n };\n\n window.GOVUKFrontend.initAll();\n const timeoutDialog = document.getElementsByName(\"hmrc-timeout-dialog\").item(0);\n if (timeoutDialog && window.HMRCFrontend.TimeoutDialog) {\n new window.HMRCFrontend.TimeoutDialog(timeoutDialog).init();\n }\n </script>\n }\n\n @beforeContent = {\n @if(resolvedJourneyConfig.options.showPhaseBanner){\n @phaseBanner(PhaseBanner(\n tag = Some(Tag(\n content = HtmlContent(resolvedJourneyConfig.options.phase)\n )),\n content = uk.gov.hmrc.govukfrontend.views.html.components.HtmlContent(\n messages(\"phaseBannerHtml\").replace(\"$link\", resolvedJourneyConfig.options.phaseFeedbackLink)\n )\n ))\n }\n\n @if(resolvedJourneyConfig.options.includeHMRCBranding) {\n @banner(Banner(language = appConfig.langToLanguage(messages.lang.code)))\n }\n\n @if(resolvedJourneyConfig.options.showBackButtons) {\n @govukBackLink(BackLink(href=\"javascript:history.back()\", content = HtmlContent(messages(\"constants.back\"))))\n }\n\n @if(!resolvedJourneyConfig.options.disableTranslations) {\n @languageSwitch(LanguageSelect(messages.lang.code match {\n case \"en\" ⇒ En\n case \"cy\" ⇒ Cy\n }, En -> s\"${controllers.routes.LanguageController.switchToLanguage(\"english\")}\",\n Cy -> s\"${controllers.routes.LanguageController.switchToLanguage(\"cymraeg\")}\"\n ))\n }\n }\n\n @fullTitle = @{\n if (messages.isDefinedAt(\"navTitle\")) s\"$title - ${messages(\"navTitle\")} - GOV.UK\"\n else title\n }\n\n @govukLayout(\n pageTitle = Some(fullTitle),\n headBlock = Some(head),\n headerBlock = Some(header(Header(\n signOutHref = resolvedJourneyConfig.options.signOutHref,\n homepageUrl = resolvedJourneyConfig.options.homeNavHref.getOrElse(\"https://www.gov.uk/\"),\n serviceName = if(messages.isDefinedAt(\"navTitle\")) Some(messages(\"navTitle\")) else None,\n serviceUrl = resolvedJourneyConfig.options.serviceHref.getOrElse(\"\"),\n language = if (messages.lang.code == \"cy\") Cy else En\n ))),\n beforeContentBlock = Some(beforeContent),\n scriptsBlock = Some(scriptElem),\n footerBlock = Some(standardFooter(accessibilityStatementUrl = resolvedJourneyConfig.options.accessibilityFooterUrl))\n ) {\n @form.map { f =>\n @if(f.hasErrors) {\n @errorSummary(ErrorSummary(title = HtmlContent(messages(\"constants.errorText\")),\n errorList = f.errors.map{error ⇒ ErrorLink(href=Some(s\"#${error.key}\"),\n content = HtmlContent(messages(error.message)))}))\n }\n }\n\n @content\n\n @help(ReportTechnicalIssue(\n serviceCode = resolvedJourneyConfig.options.deskProServiceName.getOrElse(appConfig.contactFormServiceIdentifier),\n language = messages.lang.code match {\n case \"en\" => En\n case \"cy\" => Cy\n }\n ))\n }\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/templates/page_template.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukFooter#","variableName":"footer","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.{FooterLinks, FrontendAppConfig}\n@import model.JourneyDataV2\n@import java.net.URI\n@import uk.gov.hmrc.hmrcfrontend.views.viewmodels.header.Header\n@import uk.gov.hmrc.govukfrontend.views.Aliases.Footer\n@import uk.gov.hmrc.govukfrontend.views.Aliases.Meta\n@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcStandardFooter\n\n@this(govukLayout: GovukLayout, footer: GovukFooter, banner: HmrcBanner, help: HmrcReportTechnicalIssue,\nform: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, govukBackLink: GovukBackLink, languageSwitch:\nHmrcLanguageSelect, errorSummary: GovukErrorSummary, phaseBanner: GovukPhaseBanner, timeoutDialog: HmrcTimeoutDialog,\nheader: HmrcHeader, standardFooter: HmrcStandardFooter)\n@(title: String, form: Option[Form[_]], journeyData: JourneyDataV2)(content: Html)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n @userAction = @{\n new URI(request.uri).getPath().split(\"/\").lastOption.getOrElse(\"\")\n }\n\n @head = {\n @resolvedJourneyConfig.options.timeoutConfig.map(t =>\n timeoutDialog(TimeoutDialog(\n language = Some(messages.lang.code),\n countdown = Some(120),\n title = None,\n keepAliveUrl = t.timeoutKeepAliveUrl.orElse(Some(\"/lookup-address/renewSession\")),\n timeout = Some(t.timeoutAmount),\n signOutUrl = Some(s\"/lookup-address/destroySession?timeoutUrl=${t.timeoutUrl}\")\n ))\n )\n <!--[if lte IE 8]><link href='@controllers.routes.Assets.at(\"stylesheets/application-ie-8.css\")' rel=\"stylesheet\" type=\"text/css\" /><![endif]-->\n <!--[if gt IE 8]><!--><link href='@controllers.routes.Assets.at(\"stylesheets/application.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" /><!--<![endif]-->\n <link href='@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n }\n\n @resolvedJourneyConfig = @{\n journeyData.resolveConfigV2(appConfig)\n }\n\n @scriptElem = {\n <script src='@controllers.routes.Assets.at(\"lib/govuk-frontend/govuk/all.js\")'></script>\n <script src='@controllers.routes.Assets.at(\"lib/hmrc-frontend/hmrc/all.js\")'></script>\n <script>\n window.onpageshow = function(event) {\n const disabledButton = document.querySelector('button[disabled]');\n if(disabledButton) {\n disabledButton.disabled = false\n };\n };\n\n window.GOVUKFrontend.initAll();\n const timeoutDialog = document.getElementsByName(\"hmrc-timeout-dialog\").item(0);\n if (timeoutDialog && window.HMRCFrontend.TimeoutDialog) {\n new window.HMRCFrontend.TimeoutDialog(timeoutDialog).init();\n }\n </script>\n }\n\n @beforeContent = {\n @if(resolvedJourneyConfig.options.showPhaseBanner){\n @phaseBanner(PhaseBanner(\n tag = Some(Tag(\n content = HtmlContent(resolvedJourneyConfig.options.phase)\n )),\n content = uk.gov.hmrc.govukfrontend.views.html.components.HtmlContent(\n messages(\"phaseBannerHtml\").replace(\"$link\", resolvedJourneyConfig.options.phaseFeedbackLink)\n )\n ))\n }\n\n @if(resolvedJourneyConfig.options.includeHMRCBranding) {\n @banner(Banner(language = appConfig.langToLanguage(messages.lang.code)))\n }\n\n @if(resolvedJourneyConfig.options.showBackButtons) {\n @govukBackLink(BackLink(href=\"javascript:history.back()\", content = HtmlContent(messages(\"constants.back\"))))\n }\n\n @if(!resolvedJourneyConfig.options.disableTranslations) {\n @languageSwitch(LanguageSelect(messages.lang.code match {\n case \"en\" ⇒ En\n case \"cy\" ⇒ Cy\n }, En -> s\"${controllers.routes.LanguageController.switchToLanguage(\"english\")}\",\n Cy -> s\"${controllers.routes.LanguageController.switchToLanguage(\"cymraeg\")}\"\n ))\n }\n }\n\n @fullTitle = @{\n if (messages.isDefinedAt(\"navTitle\")) s\"$title - ${messages(\"navTitle\")} - GOV.UK\"\n else title\n }\n\n @govukLayout(\n pageTitle = Some(fullTitle),\n headBlock = Some(head),\n headerBlock = Some(header(Header(\n signOutHref = resolvedJourneyConfig.options.signOutHref,\n homepageUrl = resolvedJourneyConfig.options.homeNavHref.getOrElse(\"https://www.gov.uk/\"),\n serviceName = if(messages.isDefinedAt(\"navTitle\")) Some(messages(\"navTitle\")) else None,\n serviceUrl = resolvedJourneyConfig.options.serviceHref.getOrElse(\"\"),\n language = if (messages.lang.code == \"cy\") Cy else En\n ))),\n beforeContentBlock = Some(beforeContent),\n scriptsBlock = Some(scriptElem),\n footerBlock = Some(standardFooter(accessibilityStatementUrl = resolvedJourneyConfig.options.accessibilityFooterUrl))\n ) {\n @form.map { f =>\n @if(f.hasErrors) {\n @errorSummary(ErrorSummary(title = HtmlContent(messages(\"constants.errorText\")),\n errorList = f.errors.map{error ⇒ ErrorLink(href=Some(s\"#${error.key}\"),\n content = HtmlContent(messages(error.message)))}))\n }\n }\n\n @content\n\n @help(ReportTechnicalIssue(\n serviceCode = resolvedJourneyConfig.options.deskProServiceName.getOrElse(appConfig.contactFormServiceIdentifier),\n language = messages.lang.code match {\n case \"en\" => En\n case \"cy\" => Cy\n }\n ))\n }\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/templates/page_template.scala.html","component":"uk/gov/hmrc/hmrcfrontend/views/html/components/HmrcBanner#","variableName":"banner","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.{FooterLinks, FrontendAppConfig}\n@import model.JourneyDataV2\n@import java.net.URI\n@import uk.gov.hmrc.hmrcfrontend.views.viewmodels.header.Header\n@import uk.gov.hmrc.govukfrontend.views.Aliases.Footer\n@import uk.gov.hmrc.govukfrontend.views.Aliases.Meta\n@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcStandardFooter\n\n@this(govukLayout: GovukLayout, footer: GovukFooter, banner: HmrcBanner, help: HmrcReportTechnicalIssue,\nform: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, govukBackLink: GovukBackLink, languageSwitch:\nHmrcLanguageSelect, errorSummary: GovukErrorSummary, phaseBanner: GovukPhaseBanner, timeoutDialog: HmrcTimeoutDialog,\nheader: HmrcHeader, standardFooter: HmrcStandardFooter)\n@(title: String, form: Option[Form[_]], journeyData: JourneyDataV2)(content: Html)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n @userAction = @{\n new URI(request.uri).getPath().split(\"/\").lastOption.getOrElse(\"\")\n }\n\n @head = {\n @resolvedJourneyConfig.options.timeoutConfig.map(t =>\n timeoutDialog(TimeoutDialog(\n language = Some(messages.lang.code),\n countdown = Some(120),\n title = None,\n keepAliveUrl = t.timeoutKeepAliveUrl.orElse(Some(\"/lookup-address/renewSession\")),\n timeout = Some(t.timeoutAmount),\n signOutUrl = Some(s\"/lookup-address/destroySession?timeoutUrl=${t.timeoutUrl}\")\n ))\n )\n <!--[if lte IE 8]><link href='@controllers.routes.Assets.at(\"stylesheets/application-ie-8.css\")' rel=\"stylesheet\" type=\"text/css\" /><![endif]-->\n <!--[if gt IE 8]><!--><link href='@controllers.routes.Assets.at(\"stylesheets/application.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" /><!--<![endif]-->\n <link href='@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n }\n\n @resolvedJourneyConfig = @{\n journeyData.resolveConfigV2(appConfig)\n }\n\n @scriptElem = {\n <script src='@controllers.routes.Assets.at(\"lib/govuk-frontend/govuk/all.js\")'></script>\n <script src='@controllers.routes.Assets.at(\"lib/hmrc-frontend/hmrc/all.js\")'></script>\n <script>\n window.onpageshow = function(event) {\n const disabledButton = document.querySelector('button[disabled]');\n if(disabledButton) {\n disabledButton.disabled = false\n };\n };\n\n window.GOVUKFrontend.initAll();\n const timeoutDialog = document.getElementsByName(\"hmrc-timeout-dialog\").item(0);\n if (timeoutDialog && window.HMRCFrontend.TimeoutDialog) {\n new window.HMRCFrontend.TimeoutDialog(timeoutDialog).init();\n }\n </script>\n }\n\n @beforeContent = {\n @if(resolvedJourneyConfig.options.showPhaseBanner){\n @phaseBanner(PhaseBanner(\n tag = Some(Tag(\n content = HtmlContent(resolvedJourneyConfig.options.phase)\n )),\n content = uk.gov.hmrc.govukfrontend.views.html.components.HtmlContent(\n messages(\"phaseBannerHtml\").replace(\"$link\", resolvedJourneyConfig.options.phaseFeedbackLink)\n )\n ))\n }\n\n @if(resolvedJourneyConfig.options.includeHMRCBranding) {\n @banner(Banner(language = appConfig.langToLanguage(messages.lang.code)))\n }\n\n @if(resolvedJourneyConfig.options.showBackButtons) {\n @govukBackLink(BackLink(href=\"javascript:history.back()\", content = HtmlContent(messages(\"constants.back\"))))\n }\n\n @if(!resolvedJourneyConfig.options.disableTranslations) {\n @languageSwitch(LanguageSelect(messages.lang.code match {\n case \"en\" ⇒ En\n case \"cy\" ⇒ Cy\n }, En -> s\"${controllers.routes.LanguageController.switchToLanguage(\"english\")}\",\n Cy -> s\"${controllers.routes.LanguageController.switchToLanguage(\"cymraeg\")}\"\n ))\n }\n }\n\n @fullTitle = @{\n if (messages.isDefinedAt(\"navTitle\")) s\"$title - ${messages(\"navTitle\")} - GOV.UK\"\n else title\n }\n\n @govukLayout(\n pageTitle = Some(fullTitle),\n headBlock = Some(head),\n headerBlock = Some(header(Header(\n signOutHref = resolvedJourneyConfig.options.signOutHref,\n homepageUrl = resolvedJourneyConfig.options.homeNavHref.getOrElse(\"https://www.gov.uk/\"),\n serviceName = if(messages.isDefinedAt(\"navTitle\")) Some(messages(\"navTitle\")) else None,\n serviceUrl = resolvedJourneyConfig.options.serviceHref.getOrElse(\"\"),\n language = if (messages.lang.code == \"cy\") Cy else En\n ))),\n beforeContentBlock = Some(beforeContent),\n scriptsBlock = Some(scriptElem),\n footerBlock = Some(standardFooter(accessibilityStatementUrl = resolvedJourneyConfig.options.accessibilityFooterUrl))\n ) {\n @form.map { f =>\n @if(f.hasErrors) {\n @errorSummary(ErrorSummary(title = HtmlContent(messages(\"constants.errorText\")),\n errorList = f.errors.map{error ⇒ ErrorLink(href=Some(s\"#${error.key}\"),\n content = HtmlContent(messages(error.message)))}))\n }\n }\n\n @content\n\n @help(ReportTechnicalIssue(\n serviceCode = resolvedJourneyConfig.options.deskProServiceName.getOrElse(appConfig.contactFormServiceIdentifier),\n language = messages.lang.code match {\n case \"en\" => En\n case \"cy\" => Cy\n }\n ))\n }\n","usages":["@banner(Banner(language = appConfig.langToLanguage(messages.lang.code)))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/templates/page_template.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukPhaseBanner#","variableName":"phaseBanner","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.{FooterLinks, FrontendAppConfig}\n@import model.JourneyDataV2\n@import java.net.URI\n@import uk.gov.hmrc.hmrcfrontend.views.viewmodels.header.Header\n@import uk.gov.hmrc.govukfrontend.views.Aliases.Footer\n@import uk.gov.hmrc.govukfrontend.views.Aliases.Meta\n@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcStandardFooter\n\n@this(govukLayout: GovukLayout, footer: GovukFooter, banner: HmrcBanner, help: HmrcReportTechnicalIssue,\nform: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, govukBackLink: GovukBackLink, languageSwitch:\nHmrcLanguageSelect, errorSummary: GovukErrorSummary, phaseBanner: GovukPhaseBanner, timeoutDialog: HmrcTimeoutDialog,\nheader: HmrcHeader, standardFooter: HmrcStandardFooter)\n@(title: String, form: Option[Form[_]], journeyData: JourneyDataV2)(content: Html)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n @userAction = @{\n new URI(request.uri).getPath().split(\"/\").lastOption.getOrElse(\"\")\n }\n\n @head = {\n @resolvedJourneyConfig.options.timeoutConfig.map(t =>\n timeoutDialog(TimeoutDialog(\n language = Some(messages.lang.code),\n countdown = Some(120),\n title = None,\n keepAliveUrl = t.timeoutKeepAliveUrl.orElse(Some(\"/lookup-address/renewSession\")),\n timeout = Some(t.timeoutAmount),\n signOutUrl = Some(s\"/lookup-address/destroySession?timeoutUrl=${t.timeoutUrl}\")\n ))\n )\n <!--[if lte IE 8]><link href='@controllers.routes.Assets.at(\"stylesheets/application-ie-8.css\")' rel=\"stylesheet\" type=\"text/css\" /><![endif]-->\n <!--[if gt IE 8]><!--><link href='@controllers.routes.Assets.at(\"stylesheets/application.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" /><!--<![endif]-->\n <link href='@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n }\n\n @resolvedJourneyConfig = @{\n journeyData.resolveConfigV2(appConfig)\n }\n\n @scriptElem = {\n <script src='@controllers.routes.Assets.at(\"lib/govuk-frontend/govuk/all.js\")'></script>\n <script src='@controllers.routes.Assets.at(\"lib/hmrc-frontend/hmrc/all.js\")'></script>\n <script>\n window.onpageshow = function(event) {\n const disabledButton = document.querySelector('button[disabled]');\n if(disabledButton) {\n disabledButton.disabled = false\n };\n };\n\n window.GOVUKFrontend.initAll();\n const timeoutDialog = document.getElementsByName(\"hmrc-timeout-dialog\").item(0);\n if (timeoutDialog && window.HMRCFrontend.TimeoutDialog) {\n new window.HMRCFrontend.TimeoutDialog(timeoutDialog).init();\n }\n </script>\n }\n\n @beforeContent = {\n @if(resolvedJourneyConfig.options.showPhaseBanner){\n @phaseBanner(PhaseBanner(\n tag = Some(Tag(\n content = HtmlContent(resolvedJourneyConfig.options.phase)\n )),\n content = uk.gov.hmrc.govukfrontend.views.html.components.HtmlContent(\n messages(\"phaseBannerHtml\").replace(\"$link\", resolvedJourneyConfig.options.phaseFeedbackLink)\n )\n ))\n }\n\n @if(resolvedJourneyConfig.options.includeHMRCBranding) {\n @banner(Banner(language = appConfig.langToLanguage(messages.lang.code)))\n }\n\n @if(resolvedJourneyConfig.options.showBackButtons) {\n @govukBackLink(BackLink(href=\"javascript:history.back()\", content = HtmlContent(messages(\"constants.back\"))))\n }\n\n @if(!resolvedJourneyConfig.options.disableTranslations) {\n @languageSwitch(LanguageSelect(messages.lang.code match {\n case \"en\" ⇒ En\n case \"cy\" ⇒ Cy\n }, En -> s\"${controllers.routes.LanguageController.switchToLanguage(\"english\")}\",\n Cy -> s\"${controllers.routes.LanguageController.switchToLanguage(\"cymraeg\")}\"\n ))\n }\n }\n\n @fullTitle = @{\n if (messages.isDefinedAt(\"navTitle\")) s\"$title - ${messages(\"navTitle\")} - GOV.UK\"\n else title\n }\n\n @govukLayout(\n pageTitle = Some(fullTitle),\n headBlock = Some(head),\n headerBlock = Some(header(Header(\n signOutHref = resolvedJourneyConfig.options.signOutHref,\n homepageUrl = resolvedJourneyConfig.options.homeNavHref.getOrElse(\"https://www.gov.uk/\"),\n serviceName = if(messages.isDefinedAt(\"navTitle\")) Some(messages(\"navTitle\")) else None,\n serviceUrl = resolvedJourneyConfig.options.serviceHref.getOrElse(\"\"),\n language = if (messages.lang.code == \"cy\") Cy else En\n ))),\n beforeContentBlock = Some(beforeContent),\n scriptsBlock = Some(scriptElem),\n footerBlock = Some(standardFooter(accessibilityStatementUrl = resolvedJourneyConfig.options.accessibilityFooterUrl))\n ) {\n @form.map { f =>\n @if(f.hasErrors) {\n @errorSummary(ErrorSummary(title = HtmlContent(messages(\"constants.errorText\")),\n errorList = f.errors.map{error ⇒ ErrorLink(href=Some(s\"#${error.key}\"),\n content = HtmlContent(messages(error.message)))}))\n }\n }\n\n @content\n\n @help(ReportTechnicalIssue(\n serviceCode = resolvedJourneyConfig.options.deskProServiceName.getOrElse(appConfig.contactFormServiceIdentifier),\n language = messages.lang.code match {\n case \"en\" => En\n case \"cy\" => Cy\n }\n ))\n }\n","usages":["@phaseBanner(PhaseBanner(\n tag = Some(Tag(\n content = HtmlContent(resolvedJourneyConfig.options.phase)\n )),\n content = uk.gov.hmrc.govukfrontend.views.html.components.HtmlContent(\n messages(\"phaseBannerHtml\").replace(\"$link\", resolvedJourneyConfig.options.phaseFeedbackLink)\n )\n ))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/templates/page_template.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukLayout#","variableName":"govukLayout","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.{FooterLinks, FrontendAppConfig}\n@import model.JourneyDataV2\n@import java.net.URI\n@import uk.gov.hmrc.hmrcfrontend.views.viewmodels.header.Header\n@import uk.gov.hmrc.govukfrontend.views.Aliases.Footer\n@import uk.gov.hmrc.govukfrontend.views.Aliases.Meta\n@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcStandardFooter\n\n@this(govukLayout: GovukLayout, footer: GovukFooter, banner: HmrcBanner, help: HmrcReportTechnicalIssue,\nform: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, govukBackLink: GovukBackLink, languageSwitch:\nHmrcLanguageSelect, errorSummary: GovukErrorSummary, phaseBanner: GovukPhaseBanner, timeoutDialog: HmrcTimeoutDialog,\nheader: HmrcHeader, standardFooter: HmrcStandardFooter)\n@(title: String, form: Option[Form[_]], journeyData: JourneyDataV2)(content: Html)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n @userAction = @{\n new URI(request.uri).getPath().split(\"/\").lastOption.getOrElse(\"\")\n }\n\n @head = {\n @resolvedJourneyConfig.options.timeoutConfig.map(t =>\n timeoutDialog(TimeoutDialog(\n language = Some(messages.lang.code),\n countdown = Some(120),\n title = None,\n keepAliveUrl = t.timeoutKeepAliveUrl.orElse(Some(\"/lookup-address/renewSession\")),\n timeout = Some(t.timeoutAmount),\n signOutUrl = Some(s\"/lookup-address/destroySession?timeoutUrl=${t.timeoutUrl}\")\n ))\n )\n <!--[if lte IE 8]><link href='@controllers.routes.Assets.at(\"stylesheets/application-ie-8.css\")' rel=\"stylesheet\" type=\"text/css\" /><![endif]-->\n <!--[if gt IE 8]><!--><link href='@controllers.routes.Assets.at(\"stylesheets/application.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" /><!--<![endif]-->\n <link href='@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n }\n\n @resolvedJourneyConfig = @{\n journeyData.resolveConfigV2(appConfig)\n }\n\n @scriptElem = {\n <script src='@controllers.routes.Assets.at(\"lib/govuk-frontend/govuk/all.js\")'></script>\n <script src='@controllers.routes.Assets.at(\"lib/hmrc-frontend/hmrc/all.js\")'></script>\n <script>\n window.onpageshow = function(event) {\n const disabledButton = document.querySelector('button[disabled]');\n if(disabledButton) {\n disabledButton.disabled = false\n };\n };\n\n window.GOVUKFrontend.initAll();\n const timeoutDialog = document.getElementsByName(\"hmrc-timeout-dialog\").item(0);\n if (timeoutDialog && window.HMRCFrontend.TimeoutDialog) {\n new window.HMRCFrontend.TimeoutDialog(timeoutDialog).init();\n }\n </script>\n }\n\n @beforeContent = {\n @if(resolvedJourneyConfig.options.showPhaseBanner){\n @phaseBanner(PhaseBanner(\n tag = Some(Tag(\n content = HtmlContent(resolvedJourneyConfig.options.phase)\n )),\n content = uk.gov.hmrc.govukfrontend.views.html.components.HtmlContent(\n messages(\"phaseBannerHtml\").replace(\"$link\", resolvedJourneyConfig.options.phaseFeedbackLink)\n )\n ))\n }\n\n @if(resolvedJourneyConfig.options.includeHMRCBranding) {\n @banner(Banner(language = appConfig.langToLanguage(messages.lang.code)))\n }\n\n @if(resolvedJourneyConfig.options.showBackButtons) {\n @govukBackLink(BackLink(href=\"javascript:history.back()\", content = HtmlContent(messages(\"constants.back\"))))\n }\n\n @if(!resolvedJourneyConfig.options.disableTranslations) {\n @languageSwitch(LanguageSelect(messages.lang.code match {\n case \"en\" ⇒ En\n case \"cy\" ⇒ Cy\n }, En -> s\"${controllers.routes.LanguageController.switchToLanguage(\"english\")}\",\n Cy -> s\"${controllers.routes.LanguageController.switchToLanguage(\"cymraeg\")}\"\n ))\n }\n }\n\n @fullTitle = @{\n if (messages.isDefinedAt(\"navTitle\")) s\"$title - ${messages(\"navTitle\")} - GOV.UK\"\n else title\n }\n\n @govukLayout(\n pageTitle = Some(fullTitle),\n headBlock = Some(head),\n headerBlock = Some(header(Header(\n signOutHref = resolvedJourneyConfig.options.signOutHref,\n homepageUrl = resolvedJourneyConfig.options.homeNavHref.getOrElse(\"https://www.gov.uk/\"),\n serviceName = if(messages.isDefinedAt(\"navTitle\")) Some(messages(\"navTitle\")) else None,\n serviceUrl = resolvedJourneyConfig.options.serviceHref.getOrElse(\"\"),\n language = if (messages.lang.code == \"cy\") Cy else En\n ))),\n beforeContentBlock = Some(beforeContent),\n scriptsBlock = Some(scriptElem),\n footerBlock = Some(standardFooter(accessibilityStatementUrl = resolvedJourneyConfig.options.accessibilityFooterUrl))\n ) {\n @form.map { f =>\n @if(f.hasErrors) {\n @errorSummary(ErrorSummary(title = HtmlContent(messages(\"constants.errorText\")),\n errorList = f.errors.map{error ⇒ ErrorLink(href=Some(s\"#${error.key}\"),\n content = HtmlContent(messages(error.message)))}))\n }\n }\n\n @content\n\n @help(ReportTechnicalIssue(\n serviceCode = resolvedJourneyConfig.options.deskProServiceName.getOrElse(appConfig.contactFormServiceIdentifier),\n language = messages.lang.code match {\n case \"en\" => En\n case \"cy\" => Cy\n }\n ))\n }\n","usages":["@govukLayout(\n pageTitle = Some(fullTitle),\n headBlock = Some(head),\n headerBlock = Some(header(Header(\n signOutHref = resolvedJourneyConfig.options.signOutHref,\n homepageUrl = resolvedJourneyConfig.options.homeNavHref.getOrElse(\"https://www.gov.uk/\"),\n serviceName = if(messages.isDefinedAt(\"navTitle\")) Some(messages(\"navTitle\")) else None,\n serviceUrl = resolvedJourneyConfig.options.serviceHref.getOrElse(\"\"),\n language = if (messages.lang.code == \"cy\") Cy else En\n ))),\n beforeContentBlock = Some(beforeContent),\n scriptsBlock = Some(scriptElem),\n footerBlock = Some(standardFooter(accessibilityStatementUrl = resolvedJourneyConfig.options.accessibilityFooterUrl))\n )"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/templates/page_template.scala.html","component":"uk/gov/hmrc/hmrcfrontend/views/html/components/HmrcHeader#","variableName":"header","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.{FooterLinks, FrontendAppConfig}\n@import model.JourneyDataV2\n@import java.net.URI\n@import uk.gov.hmrc.hmrcfrontend.views.viewmodels.header.Header\n@import uk.gov.hmrc.govukfrontend.views.Aliases.Footer\n@import uk.gov.hmrc.govukfrontend.views.Aliases.Meta\n@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcStandardFooter\n\n@this(govukLayout: GovukLayout, footer: GovukFooter, banner: HmrcBanner, help: HmrcReportTechnicalIssue,\nform: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, govukBackLink: GovukBackLink, languageSwitch:\nHmrcLanguageSelect, errorSummary: GovukErrorSummary, phaseBanner: GovukPhaseBanner, timeoutDialog: HmrcTimeoutDialog,\nheader: HmrcHeader, standardFooter: HmrcStandardFooter)\n@(title: String, form: Option[Form[_]], journeyData: JourneyDataV2)(content: Html)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n @userAction = @{\n new URI(request.uri).getPath().split(\"/\").lastOption.getOrElse(\"\")\n }\n\n @head = {\n @resolvedJourneyConfig.options.timeoutConfig.map(t =>\n timeoutDialog(TimeoutDialog(\n language = Some(messages.lang.code),\n countdown = Some(120),\n title = None,\n keepAliveUrl = t.timeoutKeepAliveUrl.orElse(Some(\"/lookup-address/renewSession\")),\n timeout = Some(t.timeoutAmount),\n signOutUrl = Some(s\"/lookup-address/destroySession?timeoutUrl=${t.timeoutUrl}\")\n ))\n )\n <!--[if lte IE 8]><link href='@controllers.routes.Assets.at(\"stylesheets/application-ie-8.css\")' rel=\"stylesheet\" type=\"text/css\" /><![endif]-->\n <!--[if gt IE 8]><!--><link href='@controllers.routes.Assets.at(\"stylesheets/application.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" /><!--<![endif]-->\n <link href='@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n }\n\n @resolvedJourneyConfig = @{\n journeyData.resolveConfigV2(appConfig)\n }\n\n @scriptElem = {\n <script src='@controllers.routes.Assets.at(\"lib/govuk-frontend/govuk/all.js\")'></script>\n <script src='@controllers.routes.Assets.at(\"lib/hmrc-frontend/hmrc/all.js\")'></script>\n <script>\n window.onpageshow = function(event) {\n const disabledButton = document.querySelector('button[disabled]');\n if(disabledButton) {\n disabledButton.disabled = false\n };\n };\n\n window.GOVUKFrontend.initAll();\n const timeoutDialog = document.getElementsByName(\"hmrc-timeout-dialog\").item(0);\n if (timeoutDialog && window.HMRCFrontend.TimeoutDialog) {\n new window.HMRCFrontend.TimeoutDialog(timeoutDialog).init();\n }\n </script>\n }\n\n @beforeContent = {\n @if(resolvedJourneyConfig.options.showPhaseBanner){\n @phaseBanner(PhaseBanner(\n tag = Some(Tag(\n content = HtmlContent(resolvedJourneyConfig.options.phase)\n )),\n content = uk.gov.hmrc.govukfrontend.views.html.components.HtmlContent(\n messages(\"phaseBannerHtml\").replace(\"$link\", resolvedJourneyConfig.options.phaseFeedbackLink)\n )\n ))\n }\n\n @if(resolvedJourneyConfig.options.includeHMRCBranding) {\n @banner(Banner(language = appConfig.langToLanguage(messages.lang.code)))\n }\n\n @if(resolvedJourneyConfig.options.showBackButtons) {\n @govukBackLink(BackLink(href=\"javascript:history.back()\", content = HtmlContent(messages(\"constants.back\"))))\n }\n\n @if(!resolvedJourneyConfig.options.disableTranslations) {\n @languageSwitch(LanguageSelect(messages.lang.code match {\n case \"en\" ⇒ En\n case \"cy\" ⇒ Cy\n }, En -> s\"${controllers.routes.LanguageController.switchToLanguage(\"english\")}\",\n Cy -> s\"${controllers.routes.LanguageController.switchToLanguage(\"cymraeg\")}\"\n ))\n }\n }\n\n @fullTitle = @{\n if (messages.isDefinedAt(\"navTitle\")) s\"$title - ${messages(\"navTitle\")} - GOV.UK\"\n else title\n }\n\n @govukLayout(\n pageTitle = Some(fullTitle),\n headBlock = Some(head),\n headerBlock = Some(header(Header(\n signOutHref = resolvedJourneyConfig.options.signOutHref,\n homepageUrl = resolvedJourneyConfig.options.homeNavHref.getOrElse(\"https://www.gov.uk/\"),\n serviceName = if(messages.isDefinedAt(\"navTitle\")) Some(messages(\"navTitle\")) else None,\n serviceUrl = resolvedJourneyConfig.options.serviceHref.getOrElse(\"\"),\n language = if (messages.lang.code == \"cy\") Cy else En\n ))),\n beforeContentBlock = Some(beforeContent),\n scriptsBlock = Some(scriptElem),\n footerBlock = Some(standardFooter(accessibilityStatementUrl = resolvedJourneyConfig.options.accessibilityFooterUrl))\n ) {\n @form.map { f =>\n @if(f.hasErrors) {\n @errorSummary(ErrorSummary(title = HtmlContent(messages(\"constants.errorText\")),\n errorList = f.errors.map{error ⇒ ErrorLink(href=Some(s\"#${error.key}\"),\n content = HtmlContent(messages(error.message)))}))\n }\n }\n\n @content\n\n @help(ReportTechnicalIssue(\n serviceCode = resolvedJourneyConfig.options.deskProServiceName.getOrElse(appConfig.contactFormServiceIdentifier),\n language = messages.lang.code match {\n case \"en\" => En\n case \"cy\" => Cy\n }\n ))\n }\n","usages":["header(Header(\n signOutHref = resolvedJourneyConfig.options.signOutHref,\n homepageUrl = resolvedJourneyConfig.options.homeNavHref.getOrElse(\"https://www.gov.uk/\"),\n serviceName = if(messages.isDefinedAt(\"navTitle\")) Some(messages(\"navTitle\")) else None,\n serviceUrl = resolvedJourneyConfig.options.serviceHref.getOrElse(\"\"),\n language = if (messages.lang.code == \"cy\") Cy else En\n ))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/templates/page_template.scala.html","component":"uk/gov/hmrc/hmrcfrontend/views/html/helpers/HmrcStandardFooter#","variableName":"standardFooter","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.{FooterLinks, FrontendAppConfig}\n@import model.JourneyDataV2\n@import java.net.URI\n@import uk.gov.hmrc.hmrcfrontend.views.viewmodels.header.Header\n@import uk.gov.hmrc.govukfrontend.views.Aliases.Footer\n@import uk.gov.hmrc.govukfrontend.views.Aliases.Meta\n@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcStandardFooter\n\n@this(govukLayout: GovukLayout, footer: GovukFooter, banner: HmrcBanner, help: HmrcReportTechnicalIssue,\nform: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, govukBackLink: GovukBackLink, languageSwitch:\nHmrcLanguageSelect, errorSummary: GovukErrorSummary, phaseBanner: GovukPhaseBanner, timeoutDialog: HmrcTimeoutDialog,\nheader: HmrcHeader, standardFooter: HmrcStandardFooter)\n@(title: String, form: Option[Form[_]], journeyData: JourneyDataV2)(content: Html)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n @userAction = @{\n new URI(request.uri).getPath().split(\"/\").lastOption.getOrElse(\"\")\n }\n\n @head = {\n @resolvedJourneyConfig.options.timeoutConfig.map(t =>\n timeoutDialog(TimeoutDialog(\n language = Some(messages.lang.code),\n countdown = Some(120),\n title = None,\n keepAliveUrl = t.timeoutKeepAliveUrl.orElse(Some(\"/lookup-address/renewSession\")),\n timeout = Some(t.timeoutAmount),\n signOutUrl = Some(s\"/lookup-address/destroySession?timeoutUrl=${t.timeoutUrl}\")\n ))\n )\n <!--[if lte IE 8]><link href='@controllers.routes.Assets.at(\"stylesheets/application-ie-8.css\")' rel=\"stylesheet\" type=\"text/css\" /><![endif]-->\n <!--[if gt IE 8]><!--><link href='@controllers.routes.Assets.at(\"stylesheets/application.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" /><!--<![endif]-->\n <link href='@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n }\n\n @resolvedJourneyConfig = @{\n journeyData.resolveConfigV2(appConfig)\n }\n\n @scriptElem = {\n <script src='@controllers.routes.Assets.at(\"lib/govuk-frontend/govuk/all.js\")'></script>\n <script src='@controllers.routes.Assets.at(\"lib/hmrc-frontend/hmrc/all.js\")'></script>\n <script>\n window.onpageshow = function(event) {\n const disabledButton = document.querySelector('button[disabled]');\n if(disabledButton) {\n disabledButton.disabled = false\n };\n };\n\n window.GOVUKFrontend.initAll();\n const timeoutDialog = document.getElementsByName(\"hmrc-timeout-dialog\").item(0);\n if (timeoutDialog && window.HMRCFrontend.TimeoutDialog) {\n new window.HMRCFrontend.TimeoutDialog(timeoutDialog).init();\n }\n </script>\n }\n\n @beforeContent = {\n @if(resolvedJourneyConfig.options.showPhaseBanner){\n @phaseBanner(PhaseBanner(\n tag = Some(Tag(\n content = HtmlContent(resolvedJourneyConfig.options.phase)\n )),\n content = uk.gov.hmrc.govukfrontend.views.html.components.HtmlContent(\n messages(\"phaseBannerHtml\").replace(\"$link\", resolvedJourneyConfig.options.phaseFeedbackLink)\n )\n ))\n }\n\n @if(resolvedJourneyConfig.options.includeHMRCBranding) {\n @banner(Banner(language = appConfig.langToLanguage(messages.lang.code)))\n }\n\n @if(resolvedJourneyConfig.options.showBackButtons) {\n @govukBackLink(BackLink(href=\"javascript:history.back()\", content = HtmlContent(messages(\"constants.back\"))))\n }\n\n @if(!resolvedJourneyConfig.options.disableTranslations) {\n @languageSwitch(LanguageSelect(messages.lang.code match {\n case \"en\" ⇒ En\n case \"cy\" ⇒ Cy\n }, En -> s\"${controllers.routes.LanguageController.switchToLanguage(\"english\")}\",\n Cy -> s\"${controllers.routes.LanguageController.switchToLanguage(\"cymraeg\")}\"\n ))\n }\n }\n\n @fullTitle = @{\n if (messages.isDefinedAt(\"navTitle\")) s\"$title - ${messages(\"navTitle\")} - GOV.UK\"\n else title\n }\n\n @govukLayout(\n pageTitle = Some(fullTitle),\n headBlock = Some(head),\n headerBlock = Some(header(Header(\n signOutHref = resolvedJourneyConfig.options.signOutHref,\n homepageUrl = resolvedJourneyConfig.options.homeNavHref.getOrElse(\"https://www.gov.uk/\"),\n serviceName = if(messages.isDefinedAt(\"navTitle\")) Some(messages(\"navTitle\")) else None,\n serviceUrl = resolvedJourneyConfig.options.serviceHref.getOrElse(\"\"),\n language = if (messages.lang.code == \"cy\") Cy else En\n ))),\n beforeContentBlock = Some(beforeContent),\n scriptsBlock = Some(scriptElem),\n footerBlock = Some(standardFooter(accessibilityStatementUrl = resolvedJourneyConfig.options.accessibilityFooterUrl))\n ) {\n @form.map { f =>\n @if(f.hasErrors) {\n @errorSummary(ErrorSummary(title = HtmlContent(messages(\"constants.errorText\")),\n errorList = f.errors.map{error ⇒ ErrorLink(href=Some(s\"#${error.key}\"),\n content = HtmlContent(messages(error.message)))}))\n }\n }\n\n @content\n\n @help(ReportTechnicalIssue(\n serviceCode = resolvedJourneyConfig.options.deskProServiceName.getOrElse(appConfig.contactFormServiceIdentifier),\n language = messages.lang.code match {\n case \"en\" => En\n case \"cy\" => Cy\n }\n ))\n }\n","usages":["standardFooter(accessibilityStatementUrl = resolvedJourneyConfig.options.accessibilityFooterUrl)"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/templates/page_template.scala.html","component":"uk/gov/hmrc/hmrcfrontend/views/html/components/HmrcLanguageSelect#","variableName":"languageSwitch","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.{FooterLinks, FrontendAppConfig}\n@import model.JourneyDataV2\n@import java.net.URI\n@import uk.gov.hmrc.hmrcfrontend.views.viewmodels.header.Header\n@import uk.gov.hmrc.govukfrontend.views.Aliases.Footer\n@import uk.gov.hmrc.govukfrontend.views.Aliases.Meta\n@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcStandardFooter\n\n@this(govukLayout: GovukLayout, footer: GovukFooter, banner: HmrcBanner, help: HmrcReportTechnicalIssue,\nform: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, govukBackLink: GovukBackLink, languageSwitch:\nHmrcLanguageSelect, errorSummary: GovukErrorSummary, phaseBanner: GovukPhaseBanner, timeoutDialog: HmrcTimeoutDialog,\nheader: HmrcHeader, standardFooter: HmrcStandardFooter)\n@(title: String, form: Option[Form[_]], journeyData: JourneyDataV2)(content: Html)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n @userAction = @{\n new URI(request.uri).getPath().split(\"/\").lastOption.getOrElse(\"\")\n }\n\n @head = {\n @resolvedJourneyConfig.options.timeoutConfig.map(t =>\n timeoutDialog(TimeoutDialog(\n language = Some(messages.lang.code),\n countdown = Some(120),\n title = None,\n keepAliveUrl = t.timeoutKeepAliveUrl.orElse(Some(\"/lookup-address/renewSession\")),\n timeout = Some(t.timeoutAmount),\n signOutUrl = Some(s\"/lookup-address/destroySession?timeoutUrl=${t.timeoutUrl}\")\n ))\n )\n <!--[if lte IE 8]><link href='@controllers.routes.Assets.at(\"stylesheets/application-ie-8.css\")' rel=\"stylesheet\" type=\"text/css\" /><![endif]-->\n <!--[if gt IE 8]><!--><link href='@controllers.routes.Assets.at(\"stylesheets/application.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" /><!--<![endif]-->\n <link href='@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n }\n\n @resolvedJourneyConfig = @{\n journeyData.resolveConfigV2(appConfig)\n }\n\n @scriptElem = {\n <script src='@controllers.routes.Assets.at(\"lib/govuk-frontend/govuk/all.js\")'></script>\n <script src='@controllers.routes.Assets.at(\"lib/hmrc-frontend/hmrc/all.js\")'></script>\n <script>\n window.onpageshow = function(event) {\n const disabledButton = document.querySelector('button[disabled]');\n if(disabledButton) {\n disabledButton.disabled = false\n };\n };\n\n window.GOVUKFrontend.initAll();\n const timeoutDialog = document.getElementsByName(\"hmrc-timeout-dialog\").item(0);\n if (timeoutDialog && window.HMRCFrontend.TimeoutDialog) {\n new window.HMRCFrontend.TimeoutDialog(timeoutDialog).init();\n }\n </script>\n }\n\n @beforeContent = {\n @if(resolvedJourneyConfig.options.showPhaseBanner){\n @phaseBanner(PhaseBanner(\n tag = Some(Tag(\n content = HtmlContent(resolvedJourneyConfig.options.phase)\n )),\n content = uk.gov.hmrc.govukfrontend.views.html.components.HtmlContent(\n messages(\"phaseBannerHtml\").replace(\"$link\", resolvedJourneyConfig.options.phaseFeedbackLink)\n )\n ))\n }\n\n @if(resolvedJourneyConfig.options.includeHMRCBranding) {\n @banner(Banner(language = appConfig.langToLanguage(messages.lang.code)))\n }\n\n @if(resolvedJourneyConfig.options.showBackButtons) {\n @govukBackLink(BackLink(href=\"javascript:history.back()\", content = HtmlContent(messages(\"constants.back\"))))\n }\n\n @if(!resolvedJourneyConfig.options.disableTranslations) {\n @languageSwitch(LanguageSelect(messages.lang.code match {\n case \"en\" ⇒ En\n case \"cy\" ⇒ Cy\n }, En -> s\"${controllers.routes.LanguageController.switchToLanguage(\"english\")}\",\n Cy -> s\"${controllers.routes.LanguageController.switchToLanguage(\"cymraeg\")}\"\n ))\n }\n }\n\n @fullTitle = @{\n if (messages.isDefinedAt(\"navTitle\")) s\"$title - ${messages(\"navTitle\")} - GOV.UK\"\n else title\n }\n\n @govukLayout(\n pageTitle = Some(fullTitle),\n headBlock = Some(head),\n headerBlock = Some(header(Header(\n signOutHref = resolvedJourneyConfig.options.signOutHref,\n homepageUrl = resolvedJourneyConfig.options.homeNavHref.getOrElse(\"https://www.gov.uk/\"),\n serviceName = if(messages.isDefinedAt(\"navTitle\")) Some(messages(\"navTitle\")) else None,\n serviceUrl = resolvedJourneyConfig.options.serviceHref.getOrElse(\"\"),\n language = if (messages.lang.code == \"cy\") Cy else En\n ))),\n beforeContentBlock = Some(beforeContent),\n scriptsBlock = Some(scriptElem),\n footerBlock = Some(standardFooter(accessibilityStatementUrl = resolvedJourneyConfig.options.accessibilityFooterUrl))\n ) {\n @form.map { f =>\n @if(f.hasErrors) {\n @errorSummary(ErrorSummary(title = HtmlContent(messages(\"constants.errorText\")),\n errorList = f.errors.map{error ⇒ ErrorLink(href=Some(s\"#${error.key}\"),\n content = HtmlContent(messages(error.message)))}))\n }\n }\n\n @content\n\n @help(ReportTechnicalIssue(\n serviceCode = resolvedJourneyConfig.options.deskProServiceName.getOrElse(appConfig.contactFormServiceIdentifier),\n language = messages.lang.code match {\n case \"en\" => En\n case \"cy\" => Cy\n }\n ))\n }\n","usages":["@languageSwitch(LanguageSelect(messages.lang.code match {\n case \"en\" ⇒ En\n case \"cy\" ⇒ Cy\n }, En -> s\"${controllers.routes.LanguageController.switchToLanguage(\"english\")}\",\n Cy -> s\"${controllers.routes.LanguageController.switchToLanguage(\"cymraeg\")}\"\n ))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/templates/page_template.scala.html","component":"uk/gov/hmrc/hmrcfrontend/views/html/components/HmrcTimeoutDialog#","variableName":"timeoutDialog","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.{FooterLinks, FrontendAppConfig}\n@import model.JourneyDataV2\n@import java.net.URI\n@import uk.gov.hmrc.hmrcfrontend.views.viewmodels.header.Header\n@import uk.gov.hmrc.govukfrontend.views.Aliases.Footer\n@import uk.gov.hmrc.govukfrontend.views.Aliases.Meta\n@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcStandardFooter\n\n@this(govukLayout: GovukLayout, footer: GovukFooter, banner: HmrcBanner, help: HmrcReportTechnicalIssue,\nform: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, govukBackLink: GovukBackLink, languageSwitch:\nHmrcLanguageSelect, errorSummary: GovukErrorSummary, phaseBanner: GovukPhaseBanner, timeoutDialog: HmrcTimeoutDialog,\nheader: HmrcHeader, standardFooter: HmrcStandardFooter)\n@(title: String, form: Option[Form[_]], journeyData: JourneyDataV2)(content: Html)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n @userAction = @{\n new URI(request.uri).getPath().split(\"/\").lastOption.getOrElse(\"\")\n }\n\n @head = {\n @resolvedJourneyConfig.options.timeoutConfig.map(t =>\n timeoutDialog(TimeoutDialog(\n language = Some(messages.lang.code),\n countdown = Some(120),\n title = None,\n keepAliveUrl = t.timeoutKeepAliveUrl.orElse(Some(\"/lookup-address/renewSession\")),\n timeout = Some(t.timeoutAmount),\n signOutUrl = Some(s\"/lookup-address/destroySession?timeoutUrl=${t.timeoutUrl}\")\n ))\n )\n <!--[if lte IE 8]><link href='@controllers.routes.Assets.at(\"stylesheets/application-ie-8.css\")' rel=\"stylesheet\" type=\"text/css\" /><![endif]-->\n <!--[if gt IE 8]><!--><link href='@controllers.routes.Assets.at(\"stylesheets/application.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" /><!--<![endif]-->\n <link href='@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n }\n\n @resolvedJourneyConfig = @{\n journeyData.resolveConfigV2(appConfig)\n }\n\n @scriptElem = {\n <script src='@controllers.routes.Assets.at(\"lib/govuk-frontend/govuk/all.js\")'></script>\n <script src='@controllers.routes.Assets.at(\"lib/hmrc-frontend/hmrc/all.js\")'></script>\n <script>\n window.onpageshow = function(event) {\n const disabledButton = document.querySelector('button[disabled]');\n if(disabledButton) {\n disabledButton.disabled = false\n };\n };\n\n window.GOVUKFrontend.initAll();\n const timeoutDialog = document.getElementsByName(\"hmrc-timeout-dialog\").item(0);\n if (timeoutDialog && window.HMRCFrontend.TimeoutDialog) {\n new window.HMRCFrontend.TimeoutDialog(timeoutDialog).init();\n }\n </script>\n }\n\n @beforeContent = {\n @if(resolvedJourneyConfig.options.showPhaseBanner){\n @phaseBanner(PhaseBanner(\n tag = Some(Tag(\n content = HtmlContent(resolvedJourneyConfig.options.phase)\n )),\n content = uk.gov.hmrc.govukfrontend.views.html.components.HtmlContent(\n messages(\"phaseBannerHtml\").replace(\"$link\", resolvedJourneyConfig.options.phaseFeedbackLink)\n )\n ))\n }\n\n @if(resolvedJourneyConfig.options.includeHMRCBranding) {\n @banner(Banner(language = appConfig.langToLanguage(messages.lang.code)))\n }\n\n @if(resolvedJourneyConfig.options.showBackButtons) {\n @govukBackLink(BackLink(href=\"javascript:history.back()\", content = HtmlContent(messages(\"constants.back\"))))\n }\n\n @if(!resolvedJourneyConfig.options.disableTranslations) {\n @languageSwitch(LanguageSelect(messages.lang.code match {\n case \"en\" ⇒ En\n case \"cy\" ⇒ Cy\n }, En -> s\"${controllers.routes.LanguageController.switchToLanguage(\"english\")}\",\n Cy -> s\"${controllers.routes.LanguageController.switchToLanguage(\"cymraeg\")}\"\n ))\n }\n }\n\n @fullTitle = @{\n if (messages.isDefinedAt(\"navTitle\")) s\"$title - ${messages(\"navTitle\")} - GOV.UK\"\n else title\n }\n\n @govukLayout(\n pageTitle = Some(fullTitle),\n headBlock = Some(head),\n headerBlock = Some(header(Header(\n signOutHref = resolvedJourneyConfig.options.signOutHref,\n homepageUrl = resolvedJourneyConfig.options.homeNavHref.getOrElse(\"https://www.gov.uk/\"),\n serviceName = if(messages.isDefinedAt(\"navTitle\")) Some(messages(\"navTitle\")) else None,\n serviceUrl = resolvedJourneyConfig.options.serviceHref.getOrElse(\"\"),\n language = if (messages.lang.code == \"cy\") Cy else En\n ))),\n beforeContentBlock = Some(beforeContent),\n scriptsBlock = Some(scriptElem),\n footerBlock = Some(standardFooter(accessibilityStatementUrl = resolvedJourneyConfig.options.accessibilityFooterUrl))\n ) {\n @form.map { f =>\n @if(f.hasErrors) {\n @errorSummary(ErrorSummary(title = HtmlContent(messages(\"constants.errorText\")),\n errorList = f.errors.map{error ⇒ ErrorLink(href=Some(s\"#${error.key}\"),\n content = HtmlContent(messages(error.message)))}))\n }\n }\n\n @content\n\n @help(ReportTechnicalIssue(\n serviceCode = resolvedJourneyConfig.options.deskProServiceName.getOrElse(appConfig.contactFormServiceIdentifier),\n language = messages.lang.code match {\n case \"en\" => En\n case \"cy\" => Cy\n }\n ))\n }\n","usages":["timeoutDialog(TimeoutDialog(\n language = Some(messages.lang.code),\n countdown = Some(120),\n title = None,\n keepAliveUrl = t.timeoutKeepAliveUrl.orElse(Some(\"/lookup-address/renewSession\")),\n timeout = Some(t.timeoutAmount),\n signOutUrl = Some(s\"/lookup-address/destroySession?timeoutUrl=${t.timeoutUrl}\")\n ))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/templates/page_template.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukButton#","variableName":"button","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.{FooterLinks, FrontendAppConfig}\n@import model.JourneyDataV2\n@import java.net.URI\n@import uk.gov.hmrc.hmrcfrontend.views.viewmodels.header.Header\n@import uk.gov.hmrc.govukfrontend.views.Aliases.Footer\n@import uk.gov.hmrc.govukfrontend.views.Aliases.Meta\n@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcStandardFooter\n\n@this(govukLayout: GovukLayout, footer: GovukFooter, banner: HmrcBanner, help: HmrcReportTechnicalIssue,\nform: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, govukBackLink: GovukBackLink, languageSwitch:\nHmrcLanguageSelect, errorSummary: GovukErrorSummary, phaseBanner: GovukPhaseBanner, timeoutDialog: HmrcTimeoutDialog,\nheader: HmrcHeader, standardFooter: HmrcStandardFooter)\n@(title: String, form: Option[Form[_]], journeyData: JourneyDataV2)(content: Html)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n @userAction = @{\n new URI(request.uri).getPath().split(\"/\").lastOption.getOrElse(\"\")\n }\n\n @head = {\n @resolvedJourneyConfig.options.timeoutConfig.map(t =>\n timeoutDialog(TimeoutDialog(\n language = Some(messages.lang.code),\n countdown = Some(120),\n title = None,\n keepAliveUrl = t.timeoutKeepAliveUrl.orElse(Some(\"/lookup-address/renewSession\")),\n timeout = Some(t.timeoutAmount),\n signOutUrl = Some(s\"/lookup-address/destroySession?timeoutUrl=${t.timeoutUrl}\")\n ))\n )\n <!--[if lte IE 8]><link href='@controllers.routes.Assets.at(\"stylesheets/application-ie-8.css\")' rel=\"stylesheet\" type=\"text/css\" /><![endif]-->\n <!--[if gt IE 8]><!--><link href='@controllers.routes.Assets.at(\"stylesheets/application.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" /><!--<![endif]-->\n <link href='@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n }\n\n @resolvedJourneyConfig = @{\n journeyData.resolveConfigV2(appConfig)\n }\n\n @scriptElem = {\n <script src='@controllers.routes.Assets.at(\"lib/govuk-frontend/govuk/all.js\")'></script>\n <script src='@controllers.routes.Assets.at(\"lib/hmrc-frontend/hmrc/all.js\")'></script>\n <script>\n window.onpageshow = function(event) {\n const disabledButton = document.querySelector('button[disabled]');\n if(disabledButton) {\n disabledButton.disabled = false\n };\n };\n\n window.GOVUKFrontend.initAll();\n const timeoutDialog = document.getElementsByName(\"hmrc-timeout-dialog\").item(0);\n if (timeoutDialog && window.HMRCFrontend.TimeoutDialog) {\n new window.HMRCFrontend.TimeoutDialog(timeoutDialog).init();\n }\n </script>\n }\n\n @beforeContent = {\n @if(resolvedJourneyConfig.options.showPhaseBanner){\n @phaseBanner(PhaseBanner(\n tag = Some(Tag(\n content = HtmlContent(resolvedJourneyConfig.options.phase)\n )),\n content = uk.gov.hmrc.govukfrontend.views.html.components.HtmlContent(\n messages(\"phaseBannerHtml\").replace(\"$link\", resolvedJourneyConfig.options.phaseFeedbackLink)\n )\n ))\n }\n\n @if(resolvedJourneyConfig.options.includeHMRCBranding) {\n @banner(Banner(language = appConfig.langToLanguage(messages.lang.code)))\n }\n\n @if(resolvedJourneyConfig.options.showBackButtons) {\n @govukBackLink(BackLink(href=\"javascript:history.back()\", content = HtmlContent(messages(\"constants.back\"))))\n }\n\n @if(!resolvedJourneyConfig.options.disableTranslations) {\n @languageSwitch(LanguageSelect(messages.lang.code match {\n case \"en\" ⇒ En\n case \"cy\" ⇒ Cy\n }, En -> s\"${controllers.routes.LanguageController.switchToLanguage(\"english\")}\",\n Cy -> s\"${controllers.routes.LanguageController.switchToLanguage(\"cymraeg\")}\"\n ))\n }\n }\n\n @fullTitle = @{\n if (messages.isDefinedAt(\"navTitle\")) s\"$title - ${messages(\"navTitle\")} - GOV.UK\"\n else title\n }\n\n @govukLayout(\n pageTitle = Some(fullTitle),\n headBlock = Some(head),\n headerBlock = Some(header(Header(\n signOutHref = resolvedJourneyConfig.options.signOutHref,\n homepageUrl = resolvedJourneyConfig.options.homeNavHref.getOrElse(\"https://www.gov.uk/\"),\n serviceName = if(messages.isDefinedAt(\"navTitle\")) Some(messages(\"navTitle\")) else None,\n serviceUrl = resolvedJourneyConfig.options.serviceHref.getOrElse(\"\"),\n language = if (messages.lang.code == \"cy\") Cy else En\n ))),\n beforeContentBlock = Some(beforeContent),\n scriptsBlock = Some(scriptElem),\n footerBlock = Some(standardFooter(accessibilityStatementUrl = resolvedJourneyConfig.options.accessibilityFooterUrl))\n ) {\n @form.map { f =>\n @if(f.hasErrors) {\n @errorSummary(ErrorSummary(title = HtmlContent(messages(\"constants.errorText\")),\n errorList = f.errors.map{error ⇒ ErrorLink(href=Some(s\"#${error.key}\"),\n content = HtmlContent(messages(error.message)))}))\n }\n }\n\n @content\n\n @help(ReportTechnicalIssue(\n serviceCode = resolvedJourneyConfig.options.deskProServiceName.getOrElse(appConfig.contactFormServiceIdentifier),\n language = messages.lang.code match {\n case \"en\" => En\n case \"cy\" => Cy\n }\n ))\n }\n","usages":[]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/templates/page_template.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukBackLink#","variableName":"govukBackLink","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.{FooterLinks, FrontendAppConfig}\n@import model.JourneyDataV2\n@import java.net.URI\n@import uk.gov.hmrc.hmrcfrontend.views.viewmodels.header.Header\n@import uk.gov.hmrc.govukfrontend.views.Aliases.Footer\n@import uk.gov.hmrc.govukfrontend.views.Aliases.Meta\n@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcStandardFooter\n\n@this(govukLayout: GovukLayout, footer: GovukFooter, banner: HmrcBanner, help: HmrcReportTechnicalIssue,\nform: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, govukBackLink: GovukBackLink, languageSwitch:\nHmrcLanguageSelect, errorSummary: GovukErrorSummary, phaseBanner: GovukPhaseBanner, timeoutDialog: HmrcTimeoutDialog,\nheader: HmrcHeader, standardFooter: HmrcStandardFooter)\n@(title: String, form: Option[Form[_]], journeyData: JourneyDataV2)(content: Html)(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n @userAction = @{\n new URI(request.uri).getPath().split(\"/\").lastOption.getOrElse(\"\")\n }\n\n @head = {\n @resolvedJourneyConfig.options.timeoutConfig.map(t =>\n timeoutDialog(TimeoutDialog(\n language = Some(messages.lang.code),\n countdown = Some(120),\n title = None,\n keepAliveUrl = t.timeoutKeepAliveUrl.orElse(Some(\"/lookup-address/renewSession\")),\n timeout = Some(t.timeoutAmount),\n signOutUrl = Some(s\"/lookup-address/destroySession?timeoutUrl=${t.timeoutUrl}\")\n ))\n )\n <!--[if lte IE 8]><link href='@controllers.routes.Assets.at(\"stylesheets/application-ie-8.css\")' rel=\"stylesheet\" type=\"text/css\" /><![endif]-->\n <!--[if gt IE 8]><!--><link href='@controllers.routes.Assets.at(\"stylesheets/application.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" /><!--<![endif]-->\n <link href='@controllers.routes.Assets.at(\"accessible-autocomplete-2.0.2.min.css\")' media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n }\n\n @resolvedJourneyConfig = @{\n journeyData.resolveConfigV2(appConfig)\n }\n\n @scriptElem = {\n <script src='@controllers.routes.Assets.at(\"lib/govuk-frontend/govuk/all.js\")'></script>\n <script src='@controllers.routes.Assets.at(\"lib/hmrc-frontend/hmrc/all.js\")'></script>\n <script>\n window.onpageshow = function(event) {\n const disabledButton = document.querySelector('button[disabled]');\n if(disabledButton) {\n disabledButton.disabled = false\n };\n };\n\n window.GOVUKFrontend.initAll();\n const timeoutDialog = document.getElementsByName(\"hmrc-timeout-dialog\").item(0);\n if (timeoutDialog && window.HMRCFrontend.TimeoutDialog) {\n new window.HMRCFrontend.TimeoutDialog(timeoutDialog).init();\n }\n </script>\n }\n\n @beforeContent = {\n @if(resolvedJourneyConfig.options.showPhaseBanner){\n @phaseBanner(PhaseBanner(\n tag = Some(Tag(\n content = HtmlContent(resolvedJourneyConfig.options.phase)\n )),\n content = uk.gov.hmrc.govukfrontend.views.html.components.HtmlContent(\n messages(\"phaseBannerHtml\").replace(\"$link\", resolvedJourneyConfig.options.phaseFeedbackLink)\n )\n ))\n }\n\n @if(resolvedJourneyConfig.options.includeHMRCBranding) {\n @banner(Banner(language = appConfig.langToLanguage(messages.lang.code)))\n }\n\n @if(resolvedJourneyConfig.options.showBackButtons) {\n @govukBackLink(BackLink(href=\"javascript:history.back()\", content = HtmlContent(messages(\"constants.back\"))))\n }\n\n @if(!resolvedJourneyConfig.options.disableTranslations) {\n @languageSwitch(LanguageSelect(messages.lang.code match {\n case \"en\" ⇒ En\n case \"cy\" ⇒ Cy\n }, En -> s\"${controllers.routes.LanguageController.switchToLanguage(\"english\")}\",\n Cy -> s\"${controllers.routes.LanguageController.switchToLanguage(\"cymraeg\")}\"\n ))\n }\n }\n\n @fullTitle = @{\n if (messages.isDefinedAt(\"navTitle\")) s\"$title - ${messages(\"navTitle\")} - GOV.UK\"\n else title\n }\n\n @govukLayout(\n pageTitle = Some(fullTitle),\n headBlock = Some(head),\n headerBlock = Some(header(Header(\n signOutHref = resolvedJourneyConfig.options.signOutHref,\n homepageUrl = resolvedJourneyConfig.options.homeNavHref.getOrElse(\"https://www.gov.uk/\"),\n serviceName = if(messages.isDefinedAt(\"navTitle\")) Some(messages(\"navTitle\")) else None,\n serviceUrl = resolvedJourneyConfig.options.serviceHref.getOrElse(\"\"),\n language = if (messages.lang.code == \"cy\") Cy else En\n ))),\n beforeContentBlock = Some(beforeContent),\n scriptsBlock = Some(scriptElem),\n footerBlock = Some(standardFooter(accessibilityStatementUrl = resolvedJourneyConfig.options.accessibilityFooterUrl))\n ) {\n @form.map { f =>\n @if(f.hasErrors) {\n @errorSummary(ErrorSummary(title = HtmlContent(messages(\"constants.errorText\")),\n errorList = f.errors.map{error ⇒ ErrorLink(href=Some(s\"#${error.key}\"),\n content = HtmlContent(messages(error.message)))}))\n }\n }\n\n @content\n\n @help(ReportTechnicalIssue(\n serviceCode = resolvedJourneyConfig.options.deskProServiceName.getOrElse(appConfig.contactFormServiceIdentifier),\n language = messages.lang.code match {\n case \"en\" => En\n case \"cy\" => Cy\n }\n ))\n }\n","usages":["@govukBackLink(BackLink(href=\"javascript:history.back()\", content = HtmlContent(messages(\"constants.back\"))))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/testonly/setup_journey_v2_stub_page.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukTextarea#","variableName":"textarea","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n@import model.JourneyDataV2\n@import model.JourneyOptions\n@import model.JourneyConfigV2\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, page: page_template)\n@(stubForm: Form[String])(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@dummyJourney = @{\n JourneyDataV2(JourneyConfigV2(2, JourneyOptions(\"\")))\n}\n\n@page(\"Stub For starting new journey in ALF with V2 config\", Some(stubForm), dummyJourney) {\n\n @form(controllers.testonly.routes.StubController.submitStubForNewJourneyV2) {\n <h1 class=\"form-title govuk-heading-l\" id=\"pageHeading\">Stub For starting new journey in ALF with V2 config</h1>\n\n @textarea(Textarea(name = \"journeyConfig\", id = \"journeyConfig\", rows = 15, value = stubForm(\"journeyConfig\").value))\n\n @button(Button(name = Some(\"continue\"), inputType = Some(\"submit\"), content = HtmlContent(\"Start New Journey\")))\n }\n\n}\n","usages":["@textarea(Textarea(name = \"journeyConfig\", id = \"journeyConfig\", rows = 15, value = stubForm(\"journeyConfig\").value))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/testonly/setup_journey_v2_stub_page.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukButton#","variableName":"button","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n@import model.JourneyDataV2\n@import model.JourneyOptions\n@import model.JourneyConfigV2\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, page: page_template)\n@(stubForm: Form[String])(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@dummyJourney = @{\n JourneyDataV2(JourneyConfigV2(2, JourneyOptions(\"\")))\n}\n\n@page(\"Stub For starting new journey in ALF with V2 config\", Some(stubForm), dummyJourney) {\n\n @form(controllers.testonly.routes.StubController.submitStubForNewJourneyV2) {\n <h1 class=\"form-title govuk-heading-l\" id=\"pageHeading\">Stub For starting new journey in ALF with V2 config</h1>\n\n @textarea(Textarea(name = \"journeyConfig\", id = \"journeyConfig\", rows = 15, value = stubForm(\"journeyConfig\").value))\n\n @button(Button(name = Some(\"continue\"), inputType = Some(\"submit\"), content = HtmlContent(\"Start New Journey\")))\n }\n\n}\n","usages":["@button(Button(name = Some(\"continue\"), inputType = Some(\"submit\"), content = HtmlContent(\"Start New Journey\")))"]}
{"repoName":"address-lookup-frontend","templatePath":"app/views/testonly/setup_journey_v2_stub_page.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"form","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.FrontendAppConfig\n@import views.html.templates.page_template\n@import model.JourneyDataV2\n@import model.JourneyOptions\n@import model.JourneyConfigV2\n\n@this(form: FormWithCSRF, textarea: GovukTextarea, button: GovukButton, page: page_template)\n@(stubForm: Form[String])(implicit request: Request[_], messages: Messages, appConfig: FrontendAppConfig)\n\n@dummyJourney = @{\n JourneyDataV2(JourneyConfigV2(2, JourneyOptions(\"\")))\n}\n\n@page(\"Stub For starting new journey in ALF with V2 config\", Some(stubForm), dummyJourney) {\n\n @form(controllers.testonly.routes.StubController.submitStubForNewJourneyV2) {\n <h1 class=\"form-title govuk-heading-l\" id=\"pageHeading\">Stub For starting new journey in ALF with V2 config</h1>\n\n @textarea(Textarea(name = \"journeyConfig\", id = \"journeyConfig\", rows = 15, value = stubForm(\"journeyConfig\").value))\n\n @button(Button(name = Some(\"continue\"), inputType = Some(\"submit\"), content = HtmlContent(\"Start New Journey\")))\n }\n\n}\n","usages":["@form(controllers.testonly.routes.StubController.submitStubForNewJourneyV2)"]}
{"repoName":"amls-frontend","templatePath":"app/views/asp/OtherBusinessTaxMattersView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import uk.gov.hmrc.hmrcfrontend.views.config.HmrcYesNoRadioItems\n@import views.html.components.forms.{ErrorSummary, InputYesNo}\n@import views.html.components.{Button, ReturnLink, SectionSubtitle}\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n formHelper: FormWithCSRF,\n inputYesNo: InputYesNo,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean)(implicit requestHeader: RequestHeader, messages: Messages, appConfig: ApplicationConfig)\n\n@layout(pageTitle = messages(\"asp.other.business.tax.matters.title\") + \" - \" + messages(\"summary.asp\")) {\n\n @errorSummary(form)\n\n @subtitle(\"summary.asp\")\n\n @formHelper(action = controllers.asp.routes.OtherBusinessTaxMattersController.post(edit)) {\n\n @inputYesNo(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"asp.other.business.tax.matters.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n name = \"otherBusinessTaxMatters\",\n items = HmrcYesNoRadioItems(),\n classes = \"govuk-radios govuk-radios--inline\"\n ).withFormField(form(\"otherBusinessTaxMatters\"))\n )\n\n @button()\n\n @returnLink(true)\n }\n}\n","usages":["@formHelper(action = controllers.asp.routes.OtherBusinessTaxMattersController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/asp/ServicesOfBusinessView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import models.asp.Service\n@import views.html.components.{Button, Heading, SectionSubtitle, ReturnLink}\n@import views.html.components.forms.{ErrorSummary, InputCheckbox}\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichCheckboxes\n\n@this(\n layout: Layout,\n formHelper: FormWithCSRF,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n inputCheckbox: InputCheckbox,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean)(implicit messages: Messages, requestHeader: RequestHeader, appConfig: ApplicationConfig)\n\n@layout(pageTitle = messages(\"asp.services.title\") + \" - \" + messages(\"summary.asp\")) {\n\n @errorSummary(form, Some(Map(\"services\" -> \"services_0\")))\n\n @subtitle(\"summary.asp\")\n\n @formHelper(action = controllers.asp.routes.ServicesOfBusinessController.post(edit)) {\n\n @inputCheckbox(\n Checkboxes(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"asp.services.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n name = \"services\",\n hint = Some(Hint(content = Text(messages(\"lbl.select.all\")))),\n items = Service.formValues\n ).withFormField(form(\"services\"))\n )\n\n @button()\n\n @returnLink(true)\n }\n}\n","usages":["@formHelper(action = controllers.asp.routes.ServicesOfBusinessController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/asp/SummaryView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.{ApplicationConfig}\n@import views.html.components.{Heading, SectionSubtitle, Button}\n@import models.asp._\n\n@this(\n layout: Layout,\n formHelper: FormWithCSRF,\n subtitle: SectionSubtitle,\n heading: Heading,\n govukSummaryList: GovukSummaryList,\n button: Button\n)\n\n@(model: Asp)(implicit requestHeader: RequestHeader, messages: Messages, appConfig: ApplicationConfig)\n\n@header = {\n @heading(\"title.cya\", \"summary.asp\")\n}\n\n@servicesValue(services: Set[Service]) = @{\n services.toList match {\n case service :: Nil => Value(Text(service.getMessage))\n case services =>\n Value(HtmlContent(\n \"<ul class=\\\"govuk-list govuk-list--bullet\\\">\" +\n services.sortBy(_.toString).map { x =>\n s\"<li>${x.getMessage}</li>\"\n }.mkString +\n \"</ul>\"\n ))\n }\n}\n\n@yesNoValue(answer: OtherBusinessTaxMatters) = @{\n answer match {\n case OtherBusinessTaxMattersNo => Value(Text(messages(\"lbl.no\")))\n case OtherBusinessTaxMattersYes => Value(Text(messages(\"lbl.yes\")))\n }\n}\n\n@layout(\n pageTitle = messages(\"title.cya\") + \" - \" + messages(\"summary.asp\"),\n showBackLink = false\n) {\n\n @subtitle(\"summary.asp\")\n\n @heading(\"title.cya\")\n\n @govukSummaryList(\n SummaryList(\n Seq(\n model.services.map { servicesOfBusiness =>\n SummaryListRow(\n Key(Text(messages(\"asp.services.title\"))),\n servicesValue(servicesOfBusiness.services),\n actions = Some(Actions(\n items = Seq(ActionItem(\n controllers.asp.routes.ServicesOfBusinessController.get(true).url,\n Text(messages(\"button.edit\")),\n attributes = Map(\"id\" -> \"aspservices-edit\")\n ))\n ))\n )\n },\n model.otherBusinessTaxMatters.map { otm =>\n SummaryListRow(\n Key(Text(messages(\"asp.other.business.tax.matters.title\"))),\n yesNoValue(otm),\n actions = Some(Actions(\n items = Seq(ActionItem(\n controllers.asp.routes.OtherBusinessTaxMattersController.get(true).url,\n Text(messages(\"button.edit\")),\n attributes = Map(\"id\" -> \"aspotherbusinesstaxmatters-edit\")\n ))\n ))\n )\n }\n ).flatten\n )\n )\n\n @formHelper(action = controllers.asp.routes.SummaryController.post()) {\n @button(\"button.checkyouranswers.acceptandcomplete\")\n }\n}\n","usages":["@formHelper(action = controllers.asp.routes.SummaryController.post())"]}
{"repoName":"amls-frontend","templatePath":"app/views/asp/SummaryView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukSummaryList#","variableName":"govukSummaryList","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.{ApplicationConfig}\n@import views.html.components.{Heading, SectionSubtitle, Button}\n@import models.asp._\n\n@this(\n layout: Layout,\n formHelper: FormWithCSRF,\n subtitle: SectionSubtitle,\n heading: Heading,\n govukSummaryList: GovukSummaryList,\n button: Button\n)\n\n@(model: Asp)(implicit requestHeader: RequestHeader, messages: Messages, appConfig: ApplicationConfig)\n\n@header = {\n @heading(\"title.cya\", \"summary.asp\")\n}\n\n@servicesValue(services: Set[Service]) = @{\n services.toList match {\n case service :: Nil => Value(Text(service.getMessage))\n case services =>\n Value(HtmlContent(\n \"<ul class=\\\"govuk-list govuk-list--bullet\\\">\" +\n services.sortBy(_.toString).map { x =>\n s\"<li>${x.getMessage}</li>\"\n }.mkString +\n \"</ul>\"\n ))\n }\n}\n\n@yesNoValue(answer: OtherBusinessTaxMatters) = @{\n answer match {\n case OtherBusinessTaxMattersNo => Value(Text(messages(\"lbl.no\")))\n case OtherBusinessTaxMattersYes => Value(Text(messages(\"lbl.yes\")))\n }\n}\n\n@layout(\n pageTitle = messages(\"title.cya\") + \" - \" + messages(\"summary.asp\"),\n showBackLink = false\n) {\n\n @subtitle(\"summary.asp\")\n\n @heading(\"title.cya\")\n\n @govukSummaryList(\n SummaryList(\n Seq(\n model.services.map { servicesOfBusiness =>\n SummaryListRow(\n Key(Text(messages(\"asp.services.title\"))),\n servicesValue(servicesOfBusiness.services),\n actions = Some(Actions(\n items = Seq(ActionItem(\n controllers.asp.routes.ServicesOfBusinessController.get(true).url,\n Text(messages(\"button.edit\")),\n attributes = Map(\"id\" -> \"aspservices-edit\")\n ))\n ))\n )\n },\n model.otherBusinessTaxMatters.map { otm =>\n SummaryListRow(\n Key(Text(messages(\"asp.other.business.tax.matters.title\"))),\n yesNoValue(otm),\n actions = Some(Actions(\n items = Seq(ActionItem(\n controllers.asp.routes.OtherBusinessTaxMattersController.get(true).url,\n Text(messages(\"button.edit\")),\n attributes = Map(\"id\" -> \"aspotherbusinesstaxmatters-edit\")\n ))\n ))\n )\n }\n ).flatten\n )\n )\n\n @formHelper(action = controllers.asp.routes.SummaryController.post()) {\n @button(\"button.checkyouranswers.acceptandcomplete\")\n }\n}\n","usages":["@govukSummaryList(\n SummaryList(\n Seq(\n model.services.map { servicesOfBusiness =>\n SummaryListRow(\n Key(Text(messages(\"asp.services.title\"))),\n servicesValue(servicesOfBusiness.services),\n actions = Some(Actions(\n items = Seq(ActionItem(\n controllers.asp.routes.ServicesOfBusinessController.get(true).url,\n Text(messages(\"button.edit\")),\n attributes = Map(\"id\" -> \"aspservices-edit\")\n ))\n ))\n )\n },\n model.otherBusinessTaxMatters.map { otm =>\n SummaryListRow(\n Key(Text(messages(\"asp.other.business.tax.matters.title\"))),\n yesNoValue(otm),\n actions = Some(Actions(\n items = Seq(ActionItem(\n controllers.asp.routes.OtherBusinessTaxMattersController.get(true).url,\n Text(messages(\"button.edit\")),\n attributes = Map(\"id\" -> \"aspotherbusinesstaxmatters-edit\")\n ))\n ))\n )\n }\n ).flatten\n )\n )"]}
{"repoName":"amls-frontend","templatePath":"app/views/bankdetails/BankAccountHasIBANView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import uk.gov.hmrc.hmrcfrontend.views.config.HmrcYesNoRadioItems\n@import views.html.components.forms.{ErrorSummary, InputYesNo}\n@import views.html.components.{Button, ReturnLink, SectionSubtitle}\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n formHelper: FormWithCSRF,\n inputYesNo: InputYesNo,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean, index: Int)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(pageTitle = messages(\"bankdetails.bankaccount.hasiban\") + \" - \" + messages(\"summary.bankdetails\")) {\n\n @errorSummary(form)\n\n @subtitle(\"summary.bankdetails\")\n\n @formHelper(action = controllers.bankdetails.routes.BankAccountHasIbanController.post(index, edit)) {\n\n @inputYesNo(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"bankdetails.bankaccount.hasiban\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n name = \"hasIBAN\",\n items = HmrcYesNoRadioItems(),\n classes = \"govuk-radios govuk-radios--inline\"\n ).withFormField(form(\"hasIBAN\"))\n )\n\n @button()\n\n @returnLink(true)\n }\n}\n","usages":["@formHelper(action = controllers.bankdetails.routes.BankAccountHasIbanController.post(index, edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/bankdetails/BankAccountIBANNumberView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import views.html.components.forms.{InputText, ErrorSummary}\n@import views.html.components.{SectionSubtitle, Button, ReturnLink}\n@import config.ApplicationConfig\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n formHelper: FormWithCSRF,\n inputText: InputText,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean, index:Int)(implicit messages: Messages, request: Request[_], appConfig: ApplicationConfig)\n\n@layout(pageTitle = messages(\"bankdetails.bankaccount.iban.title\") + \" - \" + messages(\"summary.bankdetails\")) {\n\n @errorSummary(form)\n\n @formHelper(action = controllers.bankdetails.routes.BankAccountIbanController.post(index, edit)) {\n\n @subtitle(\"summary.bankdetails\")\n\n @inputText(\n input = Input(\n label = Label(\n isPageHeading = true,\n content = Text(messages(\"bankdetails.bankaccount.iban.title\")),\n classes = \"govuk-label--xl\"\n ),\n hint = Some(\n Hint(\n content = Text(messages(\"bankdetails.bankaccount.iban.hint\"))\n )\n ),\n name = \"IBANNumber\",\n id = \"IBANNumber\",\n inputmode = Some(\"numeric\"),\n classes = \"govuk-!-width-two-thirds\"\n ),\n field = form(\"IBANNumber\")\n )\n\n @button()\n\n @returnLink(true)\n }\n}\n","usages":["@formHelper(action = controllers.bankdetails.routes.BankAccountIbanController.post(index, edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/bankdetails/BankAccountIsUKView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import uk.gov.hmrc.hmrcfrontend.views.config.HmrcYesNoRadioItems\n@import views.html.components.forms.{ErrorSummary, InputYesNo}\n@import views.html.components.{Button, ReturnLink, SectionSubtitle}\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n formHelper: FormWithCSRF,\n inputYesNo: InputYesNo,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean, index: Int)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(pageTitle = messages(\"bankdetails.bankaccount.accounttype.title\") + \" - \" + messages(\"summary.bankdetails\")) {\n\n @errorSummary(form)\n\n @subtitle(\"summary.bankdetails\")\n\n @formHelper(action = controllers.bankdetails.routes.BankAccountIsUKController.post(index, edit)) {\n\n @inputYesNo(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"bankdetails.bankaccount.accounttype.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n name = \"isUK\",\n items = HmrcYesNoRadioItems(),\n classes = \"govuk-radios govuk-radios--inline\"\n ).withFormField(form(\"isUK\"))\n )\n\n @button()\n\n @returnLink(true)\n }\n}\n","usages":["@formHelper(action = controllers.bankdetails.routes.BankAccountIsUKController.post(index, edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/bankdetails/BankAccountNameView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import views.html.components.forms.{ErrorSummary, InputText}\n@import views.html.components.{Button, Heading, ReturnLink, SectionSubtitle}\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n inputText: InputText,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean, index: Option[Int])(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@postAction = @{\n if(index.isDefined) {\n controllers.bankdetails.routes.BankAccountNameController.postIndex(index.get, edit)\n } else {\n controllers.bankdetails.routes.BankAccountNameController.postNoIndex\n }\n}\n\n@layout(pageTitle = messages(\"bankdetails.bankaccount.accountname.title\") + \" - \" + messages(\"summary.bankdetails\")) {\n\n @errorSummary(form)\n\n @subtitle(\"summary.bankdetails\")\n\n @formHelper(action = postAction) {\n\n @inputText(\n Input(\n id = \"accountName\",\n name = \"accountName\",\n classes = \"govuk-!-width-three-quarters\",\n hint = Some(Hint(content = Text(messages(\"bankdetails.bankaccount.hint\")))),\n label = Label(\n isPageHeading = true,\n content = Text(messages(\"bankdetails.bankaccount.accountname.title\")),\n classes = \"govuk-label--xl\"\n )\n ),\n form(\"accountName\")\n )\n\n @button()\n\n @returnLink(true)\n }\n}","usages":["@formHelper(action = postAction)"]}
{"repoName":"amls-frontend","templatePath":"app/views/bankdetails/BankAccountNonUKView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import views.html.components.forms.{InputText, ErrorSummary}\n@import views.html.components.{SectionSubtitle, Button, ReturnLink}\n@import config.ApplicationConfig\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n formHelper: FormWithCSRF,\n inputText: InputText,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean, index:Int)(implicit messages: Messages, request: Request[_], appConfig: ApplicationConfig)\n\n@layout(pageTitle = messages(\"bankdetails.bankaccount.accountnumber.nonuk.title\") + \" - \" + messages(\"summary.bankdetails\")) {\n\n @errorSummary(form)\n\n @formHelper(action = controllers.bankdetails.routes.BankAccountNonUKController.post(index, edit)) {\n\n @subtitle(\"summary.bankdetails\")\n\n @inputText(\n input = Input(\n label = Label(\n isPageHeading = true,\n content = Text(messages(\"bankdetails.bankaccount.accountnumber.nonuk.title\")),\n classes = \"govuk-label--xl\"\n ),\n hint = Some(\n Hint(\n content = Text(messages(\"bankdetails.bankaccount.accountnumber.nonuk.hint\"))\n )\n ),\n name = \"nonUKAccountNumber\",\n id = \"nonUKAccountNumber\",\n inputmode = Some(\"numeric\"),\n classes = \"govuk-!-width-three-quarters\"\n ),\n field = form(\"nonUKAccountNumber\")\n )\n\n @button()\n\n @returnLink(true)\n }\n}","usages":["@formHelper(action = controllers.bankdetails.routes.BankAccountNonUKController.post(index, edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/bankdetails/BankAccountTypesView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import models.bankdetails.BankAccountType\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import views.html.components.forms.{ErrorSummary, InputYesNo}\n@import views.html.components.{Button, ReturnLink, SectionSubtitle}\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n formHelper: FormWithCSRF,\n inputYesNo: InputYesNo,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean, index: Int)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(pageTitle = messages(\"bankdetails.accounttype.title\") + \" - \" + messages(\"summary.bankdetails\")) {\n\n @errorSummary(form, Some(Map(\"bankAccountType\" -> BankAccountType.BelongsToOtherBusiness.toString)))\n\n @subtitle(\"summary.bankdetails\")\n\n @formHelper(action = controllers.bankdetails.routes.BankAccountTypeController.post(index, edit)) {\n\n @inputYesNo(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"bankdetails.accounttype.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n name = \"bankAccountType\",\n items = BankAccountType.formItems,\n classes = \"govuk-radios\"\n ).withFormField(form(\"bankAccountType\"))\n )\n\n @button()\n\n @returnLink(true)\n }\n}","usages":["@formHelper(action = controllers.bankdetails.routes.BankAccountTypeController.post(index, edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/bankdetails/BankAccountUKView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import views.html.components.forms.{ErrorSummary, InputText}\n@import views.html.components.{Button, Heading, ReturnLink, SectionSubtitle}\n\n@this(\n layout: Layout,\n formHelper: FormWithCSRF,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n inputText: InputText,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean, index: Int)(implicit request: Request[_], messages: Messages, lang:Lang, appConfig: ApplicationConfig)\n\n@layout(pageTitle = s\"${messages(\"bankdetails.bankaccount.ukaccount\")} - ${messages(\"summary.bankdetails\")}\") {\n\n @errorSummary(form)\n\n @subtitle(messages(\"summary.bankdetails\"))\n\n @formHelper(action = controllers.bankdetails.routes.BankAccountUKController.post(index, edit)) {\n\n @heading(\"bankdetails.bankaccount.ukaccount\")\n\n @inputText(\n Input(\n id = \"sortCode\",\n name = \"sortCode\",\n inputmode = Some(\"numeric\"),\n label = Label(\n content = Text(messages(\"bankdetails.bankaccount.sortcode\"))\n ),\n hint = Some(Hint(\n content = Text(messages(\"bankdetails.bankaccount.sortcode.hint\"))\n )),\n classes = \"govuk-!-width-one-quarter\"\n ),\n form(\"sortCode\")\n )\n\n @inputText(\n Input(\n id = \"accountNumber\",\n name = \"accountNumber\",\n inputmode = Some(\"numeric\"),\n label = Label(\n content = Text(messages(\"bankdetails.bankaccount.accountnumber\"))\n ),\n hint = Some(Hint(\n content = Text(messages(\"bankdetails.bankaccount.accountnumber.hint\"))\n )),\n classes = \"govuk-!-width-one-third\"\n ),\n form(\"accountNumber\")\n )\n\n @button()\n\n @returnLink(true)\n }\n}","usages":["@formHelper(action = controllers.bankdetails.routes.BankAccountUKController.post(index, edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/bankdetails/CheckYourAnswersView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukSummaryList#","variableName":"govukSummaryList","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import components.{Button, Heading, SectionSubtitle}\n\n@this(\n layout: Layout,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n govukSummaryList: GovukSummaryList,\n button: Button\n)\n\n@(summaryList: SummaryList, index: Int)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(\n pageTitle = messages(\"title.cya\") + \" - \" + messages(\"summary.bankdetails\"),\n showBackLink = false\n) {\n\n @subtitle(\"summary.bankdetails\")\n\n @heading(\"title.cya\")\n\n @govukSummaryList(summaryList)\n\n @formHelper(action = controllers.bankdetails.routes.SummaryController.post(index)) {\n @button(\"button.checkyouranswers.acceptandaddbankaccount\")\n }\n\n}\n","usages":["@govukSummaryList(summaryList)"]}
{"repoName":"amls-frontend","templatePath":"app/views/bankdetails/CheckYourAnswersView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import components.{Button, Heading, SectionSubtitle}\n\n@this(\n layout: Layout,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n govukSummaryList: GovukSummaryList,\n button: Button\n)\n\n@(summaryList: SummaryList, index: Int)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(\n pageTitle = messages(\"title.cya\") + \" - \" + messages(\"summary.bankdetails\"),\n showBackLink = false\n) {\n\n @subtitle(\"summary.bankdetails\")\n\n @heading(\"title.cya\")\n\n @govukSummaryList(summaryList)\n\n @formHelper(action = controllers.bankdetails.routes.SummaryController.post(index)) {\n @button(\"button.checkyouranswers.acceptandaddbankaccount\")\n }\n\n}\n","usages":["@formHelper(action = controllers.bankdetails.routes.SummaryController.post(index))"]}
{"repoName":"amls-frontend","templatePath":"app/views/bankdetails/HasBankAccountView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import uk.gov.hmrc.hmrcfrontend.views.config.HmrcYesNoRadioItems\n@import views.html.components.forms.{ErrorSummary, InputYesNo}\n@import views.html.components.{Button, ReturnLink, SectionSubtitle}\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n formHelper: FormWithCSRF,\n inputYesNo: InputYesNo,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_])(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(pageTitle = messages(\"bankdetails.hasbankaccount.title\") + \" - \" + messages(\"summary.bankdetails\")) {\n\n @errorSummary(form)\n\n @subtitle(\"summary.bankdetails\")\n\n @formHelper(action = controllers.bankdetails.routes.HasBankAccountController.post()) {\n\n @inputYesNo(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"bankdetails.hasbankaccount.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n name = \"hasBankAccount\",\n items = HmrcYesNoRadioItems(),\n classes = \"govuk-radios govuk-radios--inline\"\n ).withFormField(form(\"hasBankAccount\"))\n )\n\n @button()\n\n @returnLink(true)\n }\n}","usages":["@formHelper(action = controllers.bankdetails.routes.HasBankAccountController.post())"]}
{"repoName":"amls-frontend","templatePath":"app/views/bankdetails/RemoveBankDetailsView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import views.html.components.{Button, Heading, ReturnLink, SectionSubtitle}\n\n@this(\n layout: Layout,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(index: Int, accountName: String)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(pageTitle = messages(\"bankdetails.remove.bank.account.title\") + \" - \" + messages(\"summary.bankdetails\")) {\n\n @subtitle(\"summary.bankdetails\")\n\n @heading(\"bankdetails.remove.bank.account.title\")\n\n @formHelper(action = controllers.bankdetails.routes.RemoveBankDetailsController.remove(index)) {\n\n <p class=\"govuk-body govuk-!-margin-bottom-6\">@messages(\"bankdetails.remove.bank.account.text\", accountName)</p>\n\n @button(\"bankdetails.remove.bank.account.btn\", \"remove-bank-account\", classes = \"govuk-button--warning\")\n }\n\n @returnLink(true)\n}\n","usages":["@formHelper(action = controllers.bankdetails.routes.RemoveBankDetailsController.remove(index))"]}
{"repoName":"amls-frontend","templatePath":"app/views/bankdetails/YourBankAccountsView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import models.bankdetails._\n@import views.html.components.{SectionSubtitle, Heading, Button, Anchor, ReturnLink, Panel => PanelComponent}\n\n@this(\n layout: Layout,\n subtitle: SectionSubtitle,\n heading: Heading,\n panel: PanelComponent,\n formHelper: FormWithCSRF,\n anchor: Anchor,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(inCompleteModel: Seq[(BankDetails, Int)], completedModel: Seq[(BankDetails, Int)])(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@ukAccount(details: BankDetails, account: UKAccount) = {\n <div>@BankDetails.getBankAccountDescription(details)<br/>\n @messages(\"bankdetails.yourbankaccount.accountnumber\") @account.accountNumber<br/>\n @messages(\"bankdetails.yourbankaccount.sortcode\") @account.displaySortCode<br/>\n </div>\n}\n\n@nonUkAccountNumber(details: BankDetails, account: NonUKAccountNumber) = {\n <div>@BankDetails.getBankAccountDescription(details)<br/>\n @messages(\"bankdetails.yourbankaccount.accountnumber\") @account.accountNumber<br/>\n </div>\n}\n\n@nonUKIBANNumber(details: BankDetails, account: NonUKIBANNumber) = {\n <div>@BankDetails.getBankAccountDescription(details)<br/>\n @messages(\"bankdetails.yourbankaccount.iban\") @account.IBANNumber<br/>\n </div>\n}\n\n@bankAccount(bankDetail: BankDetails) = {\n @bankDetail.accountName.getOrElse(messages(\"bankdetails.yourbankaccounts.noaccountname\"))<br/>\n\n @(bankDetail.bankAccount.map(acc => acc.account match {\n case Some(account: UKAccount) => ukAccount(bankDetail, account)\n case Some(account: NonUKAccountNumber) => nonUkAccountNumber(bankDetail, account)\n case Some(account: NonUKIBANNumber) => nonUKIBANNumber(bankDetail, account)\n case _ => <div>{bankDetail.bankAccountType.map(x => messages(s\"bankdetails.summary.accounttype.lbl.${x.getBankAccountTypeID}\")).getOrElse(\"\")}</div>\n }).getOrElse(<div>{bankDetail.bankAccountType.map(x => messages(s\"bankdetails.summary.accounttype.lbl.${x.getBankAccountTypeID}\")).getOrElse(\"\")}</div>))}\n\n@layout(pageTitle = messages(\"bankdetails.yourbankaccounts.title\") + \" - \" + messages(\"summary.bankdetails\")) {\n\n @subtitle(\"summary.bankdetails\")\n\n @heading(\"bankdetails.yourbankaccounts.title\", \"summary.bankdetails\")\n\n @panel(\n jsHidden = false,\n panel = false\n ) {\n <p class=\"govuk-body\">@messages(\"bankdetails.yourbankaccount.intro\")</p>\n <p class=\"govuk-body\">\n @anchor(\n \"bankdetails.yourbankaccount.add.account\",\n controllers.bankdetails.routes.WhatYouNeedController.get.url,\n \"add-account\"\n )\n </p>\n }\n\n @if(inCompleteModel.isEmpty && completedModel.isEmpty) {\n <p class=\"govuk-body\" id=\"no-bank-account\">@messages(\"bankdetails.yourbankaccounts.nobank.account\")</p>\n }\n\n @if(inCompleteModel.nonEmpty) {\n <h2 id=\"incomplete-header\" class=\"govuk-heading-m\">@messages(\"bankdetails.yourbankaccounts.incomplete\")</h2>\n <div class=\"form-group\">\n <dl class=\"hmrc-add-to-a-list hmrc-add-to-a-list--short\">\n\n @inCompleteModel.map { case(bankDetail, index) =>\n <div class=\"hmrc-add-to-a-list__contents\">\n <dt id=\"incomplete-detail-@index\" class=\"hmrc-add-to-a-list__identifier hmrc-add-to-a-list__identifier--light govuk-!-width-three-quarters\">\n @bankAccount(bankDetail)\n </dt>\n <dd id=\"incomplete-action-panel-@index\" class=\"hmrc-add-to-a-list__change\">\n <a id=\"incomplete-detail-edit-@index\" class=\"govuk-link\" href=\"@controllers.bankdetails.routes.BankAccountNameController.getIndex(index + 1).url\">\n <span aria-label=\"true\">@messages(\"bankdetails.yourbankaccount.edit\")</span>\n <span class=\"govuk-visually-hidden\">@messages(\"bankdetails.yourbankaccount.edit\") @bankDetail.accountName</span>\n </a>\n </dd>\n <dd class=\"hmrc-add-to-a-list__remove\">\n <a id=\"incomplete-detail-remove-@index\" class=\"govuk-link\" href=\"@controllers.bankdetails.routes.RemoveBankDetailsController.get(index + 1).url\">\n <span aria-label=\"Remove\">@messages(\"bankdetails.yourbankaccount.remove\")</span>\n <span class=\"govuk-visually-hidden\">@messages(\"bankdetails.yourbankaccount.remove\") @bankDetail.accountName</span>\n </a>\n </dd>\n </div>\n }\n </dl>\n </div>\n }\n\n @if(completedModel.nonEmpty) {\n @if(inCompleteModel.nonEmpty) {\n <h2 id=\"completed-header\" class=\"govuk-heading-m\">@messages(\"bankdetails.yourbankaccounts.complete\")</h2>\n }\n <div class=\"form-group\">\n <dl class=\"hmrc-add-to-a-list hmrc-add-to-a-list--short\">\n\n @completedModel.map { case(bankDetail, index) =>\n <div class=\"hmrc-add-to-a-list__contents\">\n <dt id=\"completed-detail-@index\" class=\"hmrc-add-to-a-list__identifier hmrc-add-to-a-list__identifier--light govuk-!-width-three-quarters\">\n @bankAccount(bankDetail)\n </dt>\n <dd id=\"completed-action-panel-@index\" class=\"hmrc-add-to-a-list__remove\">\n <a id=\"completed-detail-remove-@index\" class=\"govuk-link\" href=\"@controllers.bankdetails.routes.RemoveBankDetailsController.get(index + 1).url\">\n <span aria-label=\"Remove\">@messages(\"bankdetails.yourbankaccount.remove\")</span>\n <span class=\"govuk-visually-hidden\">@messages(\"bankdetails.yourbankaccount.remove\") @bankDetail.accountName</span>\n </a>\n </dd>\n </div>\n }\n </dl>\n </div>\n }\n\n\n @formHelper(action = controllers.routes.RegistrationProgressController.get) {\n @(inCompleteModel.isEmpty, completedModel.isEmpty) match {\n case (true, false) => {\n @button(\"button.bankdetails.yourbankaccount.acceptandcomplete\", \"accept-and-complete\")\n @returnLink(true)\n }\n case _ => {\n @button(\"link.return.registration.progress\", \"return-to-application\")\n }\n }\n }\n\n}\n","usages":["@formHelper(action = controllers.routes.RegistrationProgressController.get)"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessactivities/AccountantForAMLSRegulationsView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import uk.gov.hmrc.hmrcfrontend.views.config.HmrcYesNoRadioItems\n@import views.html.components.forms.{ErrorSummary, InputYesNo}\n@import views.html.components.{Button, ReturnLink, SectionSubtitle, Heading}\n\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n inputYesNo: InputYesNo,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(pageTitle = messages(\"businessactivities.accountantForAMLSRegulations.title\") + \" - \" + messages(\"summary.businessactivities\")) {\n\n @errorSummary(form)\n\n @subtitle(\"summary.businessactivities\")\n\n @heading(\"businessactivities.accountantForAMLSRegulations.title\")\n\n <p class=\"govuk-body\">@messages(\"businessactivities.accountantForAMLSRegulations.subtext\")</p>\n\n @formHelper(action = controllers.businessactivities.routes.AccountantForAMLSRegulationsController.post(edit)) {\n\n @inputYesNo(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessactivities.accountantForAMLSRegulations.legend\")),\n classes = \"govuk-fieldset__legend--m\",\n isPageHeading = false\n ))\n )),\n name = \"accountantForAMLSRegulations\",\n items = HmrcYesNoRadioItems(),\n classes = \"govuk-radios govuk-radios--inline\"\n ).withFormField(form(\"accountantForAMLSRegulations\"))\n )\n\n @button()\n\n @returnLink(true)\n }\n}\n","usages":["@formHelper(action = controllers.businessactivities.routes.AccountantForAMLSRegulationsController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessactivities/AccountantIsUKAddressView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import uk.gov.hmrc.hmrcfrontend.views.config.HmrcYesNoRadioItems\n@import views.html.components.forms.{ErrorSummary, InputYesNo}\n@import views.html.components.{Button, ReturnLink, SectionSubtitle}\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n formHelper: FormWithCSRF,\n inputYesNo: InputYesNo,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean, accountantName: String)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(pageTitle = messages(\"businessactivities.whoisyouraccountant.location.title\") + \" - \" + messages(\"summary.businessactivities\")) {\n\n @errorSummary(form)\n\n @subtitle(\"summary.businessactivities\")\n\n @formHelper(action = controllers.businessactivities.routes.WhoIsYourAccountantIsUkController.post(edit)) {\n\n @inputYesNo(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessactivities.whoisyouraccountant.location.header\", accountantName)),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n name = \"isUK\",\n items = HmrcYesNoRadioItems(),\n classes = \"govuk-radios govuk-radios--inline\"\n ).withFormField(form(\"isUK\"))\n )\n\n @button()\n\n @returnLink(true)\n }\n}\n","usages":["@formHelper(action = controllers.businessactivities.routes.WhoIsYourAccountantIsUkController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessactivities/AccountantNonUKAddressView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import components.forms.{ErrorSummary, InputAddressLines, InputCountry}\n@import components.{Button, Heading, ReturnLink, SectionSubtitle}\n@import config.ApplicationConfig\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n inputAddressLines: InputAddressLines,\n inputCountry: InputCountry,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean, personName: String, countryData: Seq[SelectItem])(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@preparedErrorSummaryMapping = @{\n\n if(form.error(\"country\").isDefined) {\n Some(Map(\"country\" -> \"location-autocomplete\"))\n } else None\n}\n\n@layout(\n pageTitle = messages(\"businessactivities.whoisyouraccountant.address.title\") + \" - \" + messages(\"summary.businessactivities\")\n) {\n\n @errorSummary(form, preparedErrorSummaryMapping)\n\n @subtitle(\"summary.businessactivities\")\n\n @heading(\"businessactivities.whoisyouraccountant.address.header\", personName)\n\n @formHelper(action = controllers.businessactivities.routes.WhoIsYourAccountantNonUkAddressController.post(edit)) {\n\n @inputAddressLines(form)\n\n @inputCountry(form, countryData)\n\n @button()\n\n @returnLink(true)\n }\n}","usages":["@formHelper(action = controllers.businessactivities.routes.WhoIsYourAccountantNonUkAddressController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessactivities/AccountantUKAddressView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import components.forms.{ErrorSummary, InputAddressLines, InputPostcode}\n@import components.{Button, Heading, ReturnLink, SectionSubtitle}\n@import config.ApplicationConfig\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n inputAddressLines: InputAddressLines,\n inputPostcode: InputPostcode,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean, personName: String)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(\n pageTitle = messages(\"businessactivities.whoisyouraccountant.address.title\") + \" - \" + messages(\"summary.businessactivities\")\n) {\n\n @errorSummary(form)\n\n @subtitle(\"summary.businessactivities\")\n\n @heading(\"businessactivities.whoisyouraccountant.address.header\", personName)\n\n @formHelper(action = controllers.businessactivities.routes.WhoIsYourAccountantUkAddressController.post(edit)) {\n\n @inputAddressLines(form)\n\n @inputPostcode(form)\n\n @button()\n\n @returnLink(true)\n }\n}","usages":["@formHelper(action = controllers.businessactivities.routes.WhoIsYourAccountantUkAddressController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessactivities/BusinessEmployeesAMLSSupervisionView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import views.html.components.forms.{ErrorSummary, InputText}\n@import views.html.components.{Button, Heading, ReturnLink, SectionSubtitle}\n\n@this(\n layout: Layout,\n subtitle: SectionSubtitle,\n heading: Heading,\n errorSummary: ErrorSummary,\n formHelper: FormWithCSRF,\n inputText: InputText,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(\n pageTitle = messages(\"businessactivities.employees.amls.supervision.title\") + \" - \" + messages(\"summary.businessactivities\")) {\n\n @errorSummary(form)\n\n @subtitle(\"summary.businessactivities\")\n\n @formHelper(action = controllers.businessactivities.routes.EmployeeCountAMLSSupervisionController.post(edit)) {\n\n @inputText(\n input = Input(\n hint = Some(\n Hint(\n content = Text(messages(\"businessactivities.employees.line2.hint\"))\n )\n ),\n name = \"employeeCountAMLSSupervision\",\n id = \"employeeCountAMLSSupervision\",\n inputmode = Some(\"numeric\"),\n classes = \"govuk-!-width-one-quarter\",\n label = Label(\n content = Text(messages(\"businessactivities.employees.amls.supervision.title\")),\n classes = \"govuk-label--xl\",\n isPageHeading = true\n )\n ),\n field = form(\"employeeCountAMLSSupervision\")\n )\n\n @button()\n\n @returnLink(true)\n\n }\n}\n","usages":["@formHelper(action = controllers.businessactivities.routes.EmployeeCountAMLSSupervisionController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessactivities/BusinessEmployeesCountView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import views.html.components.forms.{ErrorSummary, InputText}\n@import views.html.components.{Button, Heading, ReturnLink, SectionSubtitle}\n\n@this(\n layout: Layout,\n subtitle: SectionSubtitle,\n heading: Heading,\n errorSummary: ErrorSummary,\n formHelper: FormWithCSRF,\n inputText: InputText,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(\n pageTitle = messages(\"businessactivities.employees.title\") + \" - \" + messages(\"summary.businessactivities\")) {\n\n @errorSummary(form)\n\n @subtitle(\"summary.businessactivities\")\n\n @formHelper(action = controllers.businessactivities.routes.HowManyEmployeesController.post(edit)) {\n\n @inputText(\n input = Input(\n hint = Some(\n Hint(\n content = Text(messages(\"businessactivities.employees.line1.hint\"))\n )\n ),\n name = \"employeeCount\",\n id = \"employeeCount\",\n inputmode = Some(\"numeric\"),\n classes = \"govuk-!-width-one-quarter\",\n label = Label(\n content = Text(messages(\"businessactivities.employees.title\")),\n classes = \"govuk-label--xl\",\n isPageHeading = true\n )\n ),\n field = form(\"employeeCount\")\n )\n\n @button()\n\n @returnLink(true)\n\n }\n}\n\n","usages":["@formHelper(action = controllers.businessactivities.routes.HowManyEmployeesController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessactivities/BusinessFranchiseNameView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import models.businessactivities.BusinessFranchise\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import views.html.components.forms.{ErrorSummary, InputText, InputYesNo}\n@import views.html.components.{Button, Heading, ReturnLink, SectionSubtitle}\n\n\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n inputText: InputText,\n inputYesNo: InputYesNo,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@hasFranchiseNameError = @{\n form.errors match {\n case Nil => false\n case x if x.head.key == \"franchiseName\" => true\n case _ => false\n }\n}\n\n@preparedErrorSummary = @{\n if(hasFranchiseNameError) {\n errorSummary(form, Some(Map(\"franchiseName\" -> \"franchiseName\")))\n } else {\n errorSummary(form, Some(Map(\"businessFranchise\" -> \"businessFranchise-true\")))\n }\n}\n\n@conditionalInput = @{\n\n inputText(\n Input(\n label = Label(\n content = Text(messages(\"businessactivities.businessfranchise.lbl.franchisename\")),\n classes = \"govuk-label\"\n ),\n hint = Some(Hint(\n content = Text(messages(\"businessactivities.businessfranchise.lbl.hint\"))\n )),\n id = \"franchiseName\",\n name = \"franchiseName\",\n ),\n form(\"franchiseName\")\n )\n\n}\n\n@layout(pageTitle = s\"${messages(\"businessactivities.businessfranchise.title\")} - ${messages(\"summary.businessactivities\")}\") {\n\n @preparedErrorSummary\n\n @subtitle(messages(\"summary.businessactivities\"))\n\n @heading(\"businessactivities.businessfranchise.title\")\n\n <p class=\"govuk-body\">@messages(\"businessactivities.businessfranchise.subtitle\")</p>\n\n @formHelper(action = controllers.businessactivities.routes.BusinessFranchiseController.post(edit)) {\n\n @inputYesNo(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessactivities.businessfranchise.heading\")),\n classes = \"govuk-fieldset__legend--m\",\n isPageHeading = false\n ))\n )),\n name = \"businessFranchise\",\n items = BusinessFranchise.formValues(conditionalInput),\n classes = \"govuk-radios govuk-radios--inline\"\n\n ).withFormField(form(\"businessFranchise\"))\n )\n\n @button()\n\n @returnLink(true)\n }\n}\n","usages":["@formHelper(action = controllers.businessactivities.routes.BusinessFranchiseController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessactivities/CheckYourAnswersView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.{ApplicationConfig}\n@import components.{Button, Heading, SectionSubtitle}\n\n@this(\n layout: Layout,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n govukSummaryList: GovukSummaryList,\n button: Button\n)\n\n@(summaryList: SummaryList)(implicit request: Request[_], messages: Messages, lang: Lang, appConfig: ApplicationConfig)\n\n@layout(\n pageTitle = messages(\"title.cya\") + \" - \" + messages(\"summary.businessactivities\"),\n showBackLink = false\n) {\n\n @subtitle(\"summary.businessactivities\")\n\n @heading(\"title.cya\")\n\n @govukSummaryList(summaryList)\n\n @formHelper(action = controllers.businessactivities.routes.SummaryController.post()) {\n @button(\"button.checkyouranswers.acceptandcomplete\")\n }\n\n}\n\n","usages":["@formHelper(action = controllers.businessactivities.routes.SummaryController.post())"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessactivities/CheckYourAnswersView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukSummaryList#","variableName":"govukSummaryList","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.{ApplicationConfig}\n@import components.{Button, Heading, SectionSubtitle}\n\n@this(\n layout: Layout,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n govukSummaryList: GovukSummaryList,\n button: Button\n)\n\n@(summaryList: SummaryList)(implicit request: Request[_], messages: Messages, lang: Lang, appConfig: ApplicationConfig)\n\n@layout(\n pageTitle = messages(\"title.cya\") + \" - \" + messages(\"summary.businessactivities\"),\n showBackLink = false\n) {\n\n @subtitle(\"summary.businessactivities\")\n\n @heading(\"title.cya\")\n\n @govukSummaryList(summaryList)\n\n @formHelper(action = controllers.businessactivities.routes.SummaryController.post()) {\n @button(\"button.checkyouranswers.acceptandcomplete\")\n }\n\n}\n\n","usages":["@govukSummaryList(summaryList)"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessactivities/CustomerTransactionRecordsView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import uk.gov.hmrc.hmrcfrontend.views.config.HmrcYesNoRadioItems\n@import views.html.components.forms.{ErrorSummary, InputYesNo}\n@import views.html.components.{Button, ReturnLink, SectionSubtitle}\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n formHelper: FormWithCSRF,\n inputYesNo: InputYesNo,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n\n@layout(pageTitle = messages(\"businessactivities.keep.customer.records.title\") + \" - \" + messages(\"summary.businessactivities\")) {\n\n @errorSummary(form)\n\n @subtitle(\"summary.businessactivities\")\n\n @formHelper(action = controllers.businessactivities.routes.TransactionRecordController.post(edit)) {\n\n @inputYesNo(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessactivities.keep.customer.records.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n name = \"isRecorded\",\n items = HmrcYesNoRadioItems(),\n classes = \"govuk-radios govuk-radios--inline\"\n ).withFormField(form(\"isRecorded\"))\n )\n\n @button()\n\n @returnLink(true)\n }\n}\n","usages":["@formHelper(action = controllers.businessactivities.routes.TransactionRecordController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessactivities/DocumentRiskAssessmentPolicyView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichCheckboxes\n@import config.ApplicationConfig\n@import models.businessactivities.RiskAssessmentTypes\n@import views.html.components.forms.{InputCheckbox, InputText, ErrorSummary}\n@import views.html.components.{SectionSubtitle, ReturnLink, Button}\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n formHelper: FormWithCSRF,\n inputCheckbox: InputCheckbox,\n inputText: InputText,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean)(implicit messages: Messages, request: Request[_], appConfig: ApplicationConfig)\n\n@preparedErrorSummary = @{\n errorSummary(form, Some(Map(\"riskassessments\" -> \"riskassessments_1\")))\n}\n\n@layout(pageTitle = messages(\"businessactivities.document.riskassessment.policy.title\") + \" - \" + messages(\"summary.businessactivities\")) {\n\n @preparedErrorSummary\n\n @subtitle(\"summary.businessactivities\")\n\n @formHelper(action = controllers.businessactivities.routes.DocumentRiskAssessmentController.post(edit)) {\n\n @inputCheckbox(\n Checkboxes(\n fieldset = Some(Fieldset(\n legend = Some(\n Legend(\n content = Text(messages(\"businessactivities.document.riskassessment.policy.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n )\n )\n )),\n hint = Some(\n Hint(\n content = Text(messages(\"lbl.select.all\"))\n )\n ),\n name = \"riskassessments\",\n items = RiskAssessmentTypes.formValues\n ).withFormField(form(\"riskassessments\"))\n )\n\n @button()\n\n @returnLink(true)\n }\n}\n","usages":["@formHelper(action = controllers.businessactivities.routes.DocumentRiskAssessmentController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessactivities/ExpectedAMLSTurnoverView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukRadios#","variableName":"inputRadio","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import models.businessactivities.ExpectedAMLSTurnover\n@import models.businessmatching._\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import views.html.components.forms.ErrorSummary\n@import views.html.components.{Button, Heading, ReturnLink, SectionSubtitle}\n\n@this(\n layout: Layout,\n formHelper: FormWithCSRF,\n inputRadio: GovukRadios,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean, businessMatching: BusinessMatching, businessTypes: Option[List[String]])(implicit messages: Messages, request: Request[_], appConfig: ApplicationConfig)\n\n@supportingContent = {\n @businessMatching.alphabeticalBusinessActivitiesLowerCase(false).map { types =>\n\n <p class=\"govuk-body\">@messages(\"businessactivities.confirm-activities.subtitle\")</p>\n <ul class=\"govuk-list govuk-list--bullet\">\n @types.map { businessType =>\n <li>@businessType</li>\n }\n </ul>\n }\n}\n\n@radioItems = @{\n ExpectedAMLSTurnover.all.map { i =>\n RadioItem(\n content = Text(messages(s\"businessactivities.turnover.lbl.${i.value}\")),\n id = Some(i.toString),\n value = Some(i.toString)\n )\n }\n}\n\n@layout(pageTitle = messages(\"businessactivities.turnover.title\") + \" - \" + messages(\"summary.businessactivities\")) {\n\n @formHelper(action = controllers.businessactivities.routes.ExpectedAMLSTurnoverController.post(edit)) {\n\n @errorSummary(form, Some(Map(\"expectedAMLSTurnover\" -> \"zeroPlus\")))\n\n @subtitle(\"summary.businessactivities\")\n\n @heading(messages(\"businessactivities.turnover.heading\"))\n\n @supportingContent\n\n @inputRadio(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessactivities.turnover.heading.fieldset\")),\n classes = \"govuk-fieldset__legend--m\",\n isPageHeading = false\n ))\n )),\n name = \"expectedAMLSTurnover\",\n items = radioItems\n ).withFormField(form(\"expectedAMLSTurnover\"))\n )\n\n @button()\n\n @returnLink(true)\n }\n}\n","usages":["@inputRadio(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessactivities.turnover.heading.fieldset\")),\n classes = \"govuk-fieldset__legend--m\",\n isPageHeading = false\n ))\n )),\n name = \"expectedAMLSTurnover\",\n items = radioItems\n ).withFormField(form(\"expectedAMLSTurnover\"))\n )"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessactivities/ExpectedAMLSTurnoverView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import models.businessactivities.ExpectedAMLSTurnover\n@import models.businessmatching._\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import views.html.components.forms.ErrorSummary\n@import views.html.components.{Button, Heading, ReturnLink, SectionSubtitle}\n\n@this(\n layout: Layout,\n formHelper: FormWithCSRF,\n inputRadio: GovukRadios,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean, businessMatching: BusinessMatching, businessTypes: Option[List[String]])(implicit messages: Messages, request: Request[_], appConfig: ApplicationConfig)\n\n@supportingContent = {\n @businessMatching.alphabeticalBusinessActivitiesLowerCase(false).map { types =>\n\n <p class=\"govuk-body\">@messages(\"businessactivities.confirm-activities.subtitle\")</p>\n <ul class=\"govuk-list govuk-list--bullet\">\n @types.map { businessType =>\n <li>@businessType</li>\n }\n </ul>\n }\n}\n\n@radioItems = @{\n ExpectedAMLSTurnover.all.map { i =>\n RadioItem(\n content = Text(messages(s\"businessactivities.turnover.lbl.${i.value}\")),\n id = Some(i.toString),\n value = Some(i.toString)\n )\n }\n}\n\n@layout(pageTitle = messages(\"businessactivities.turnover.title\") + \" - \" + messages(\"summary.businessactivities\")) {\n\n @formHelper(action = controllers.businessactivities.routes.ExpectedAMLSTurnoverController.post(edit)) {\n\n @errorSummary(form, Some(Map(\"expectedAMLSTurnover\" -> \"zeroPlus\")))\n\n @subtitle(\"summary.businessactivities\")\n\n @heading(messages(\"businessactivities.turnover.heading\"))\n\n @supportingContent\n\n @inputRadio(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessactivities.turnover.heading.fieldset\")),\n classes = \"govuk-fieldset__legend--m\",\n isPageHeading = false\n ))\n )),\n name = \"expectedAMLSTurnover\",\n items = radioItems\n ).withFormField(form(\"expectedAMLSTurnover\"))\n )\n\n @button()\n\n @returnLink(true)\n }\n}\n","usages":["@formHelper(action = controllers.businessactivities.routes.ExpectedAMLSTurnoverController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessactivities/ExpectedBusinessTurnoverView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import models.businessactivities.ExpectedBusinessTurnover\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import views.html.components.forms.ErrorSummary\n@import views.html.components.{Button, Heading, ReturnLink, SectionSubtitle}\n\n@this(\n layout: Layout,\n formHelper: FormWithCSRF,\n inputRadio: GovukRadios,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean)(implicit messages: Messages, request: Request[_], appConfig: ApplicationConfig)\n\n@radioItems = @{\n ExpectedBusinessTurnover.all.map { i =>\n RadioItem(\n content = Text(messages(s\"businessactivities.business-turnover.lbl.${i.value}\")),\n id = Some(i.toString),\n value = Some(i.toString)\n )\n }\n}\n\n@layout(pageTitle = messages(\"businessactivities.business-turnover.title\") + \" - \" + messages(\"summary.businessactivities\")) {\n\n @formHelper(action = controllers.businessactivities.routes.ExpectedBusinessTurnoverController.post(edit)) {\n\n @errorSummary(form, Some(Map(\"expectedBusinessTurnover\" -> \"zeroPlus\")))\n\n @subtitle(\"summary.businessactivities\")\n\n\n\n @inputRadio(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessactivities.business-turnover.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n name = \"expectedBusinessTurnover\",\n items = radioItems\n ).withFormField(form(\"expectedBusinessTurnover\"))\n )\n\n @button()\n\n @returnLink(true)\n }\n}\n","usages":["@formHelper(action = controllers.businessactivities.routes.ExpectedBusinessTurnoverController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessactivities/ExpectedBusinessTurnoverView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukRadios#","variableName":"inputRadio","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import models.businessactivities.ExpectedBusinessTurnover\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import views.html.components.forms.ErrorSummary\n@import views.html.components.{Button, Heading, ReturnLink, SectionSubtitle}\n\n@this(\n layout: Layout,\n formHelper: FormWithCSRF,\n inputRadio: GovukRadios,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean)(implicit messages: Messages, request: Request[_], appConfig: ApplicationConfig)\n\n@radioItems = @{\n ExpectedBusinessTurnover.all.map { i =>\n RadioItem(\n content = Text(messages(s\"businessactivities.business-turnover.lbl.${i.value}\")),\n id = Some(i.toString),\n value = Some(i.toString)\n )\n }\n}\n\n@layout(pageTitle = messages(\"businessactivities.business-turnover.title\") + \" - \" + messages(\"summary.businessactivities\")) {\n\n @formHelper(action = controllers.businessactivities.routes.ExpectedBusinessTurnoverController.post(edit)) {\n\n @errorSummary(form, Some(Map(\"expectedBusinessTurnover\" -> \"zeroPlus\")))\n\n @subtitle(\"summary.businessactivities\")\n\n\n\n @inputRadio(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessactivities.business-turnover.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n name = \"expectedBusinessTurnover\",\n items = radioItems\n ).withFormField(form(\"expectedBusinessTurnover\"))\n )\n\n @button()\n\n @returnLink(true)\n }\n}\n","usages":["@inputRadio(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessactivities.business-turnover.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n name = \"expectedBusinessTurnover\",\n items = radioItems\n ).withFormField(form(\"expectedBusinessTurnover\"))\n )"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessactivities/IdentifySuspiciousActivityView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import uk.gov.hmrc.hmrcfrontend.views.config.HmrcYesNoRadioItems\n@import views.html.components.forms.{ErrorSummary, InputYesNo}\n@import views.html.components.{Button, ReturnLink, SectionSubtitle}\n\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n formHelper: FormWithCSRF,\n inputYesNo: InputYesNo,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(pageTitle = messages(\"businessactivities.identify-suspicious-activity.title\") + \" - \" + messages(\"summary.businessactivities\")) {\n\n @errorSummary(form)\n\n @subtitle(\"summary.businessactivities\")\n\n @formHelper(action = controllers.businessactivities.routes.IdentifySuspiciousActivityController.post(edit)) {\n\n @inputYesNo(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessactivities.identify-suspicious-activity.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n name = \"hasWrittenGuidance\",\n items = HmrcYesNoRadioItems(),\n classes = \"govuk-radios govuk-radios--inline\"\n ).withFormField(form(\"hasWrittenGuidance\"))\n )\n\n @button()\n\n @returnLink(true)\n }\n}","usages":["@formHelper(action = controllers.businessactivities.routes.IdentifySuspiciousActivityController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessactivities/InvolvedInOtherNameView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukCharacterCount#","variableName":"inputTextArea","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import models.businessactivities.InvolvedInOther\n@import uk.gov.hmrc.govukfrontend.views.Aliases.CharacterCount\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichCharacterCount\n@import uk.gov.hmrc.govukfrontend.views.html.components.implicits._\n@import views.html.components.forms.{ErrorSummary, InputYesNo}\n@import views.html.components.{Button, Heading, ReturnLink, SectionSubtitle}\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n inputTextArea: GovukCharacterCount,\n inputYesNo: InputYesNo,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean, businessTypes: Option[List[String]], maxLength: Int)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@hasInvolvedInOtherError = @{\n form.errors match {\n case Nil => false\n case x if x.head.key == \"details\" => true\n case _ => false\n }\n}\n\n@preparedErrorSummary = @{\n if(hasInvolvedInOtherError) {\n errorSummary(form, Some(Map(\"details\" -> \"details\")))\n } else {\n errorSummary(form, Some(Map(\"involvedInOther\" -> \"involvedInOther-true\")))\n }\n}\n\n@conditionalInput = @{\n\n inputTextArea(\n CharacterCount(\n label = Label(\n isPageHeading = false,\n content = Text(messages(\"businessactivities.confirm-activities.lbl.details\"))\n ),\n id = \"details\",\n name = \"details\",\n rows = 6,\n errorMessage = form(\"details\").error.map(err => ErrorMessage(content = Text(messages(err.message, err.args:_*)))),\n maxLength = Some(maxLength)\n ).withFormField(form(\"details\"))\n )\n\n}\n\n@layout(pageTitle = s\"${messages(\"businessactivities.involved.other.title\")} - ${messages(\"summary.businessactivities\")}\") {\n\n @preparedErrorSummary\n\n @subtitle(messages(\"summary.businessactivities\"))\n\n @heading(\"businessactivities.involved.other.title\")\n\n @businessTypes.map { types =>\n @if(types.size > 1) {\n <p class=\"govuk-body\">@messages(\"businessactivities.confirm-activities.subtitle_4\"):</p>\n\n <ul class=\"govuk-list govuk-list--bullet\">\n @types.map { businessType =>\n <li>@businessType</li>\n }\n </ul>\n } else {\n <p class=\"govuk-body\">@messages(\"businessactivities.confirm-activities.subtitle_4\") @(types.head)</p>\n }\n }\n\n <p class=\"govuk-body\">@messages(\"businessactivities.involved.other.hint\")</p>\n <ul class=\"govuk-list govuk-list--bullet\">\n <li>@messages(\"businessactivities.involved.listline1\")</li>\n <li>@messages(\"businessactivities.involved.listline2\")</li>\n <li>@messages(\"businessactivities.involved.listline3\")</li>\n </ul>\n\n @formHelper(action = controllers.businessactivities.routes.InvolvedInOtherController.post(edit)) {\n\n @inputYesNo(\n Radios(\n Some(Fieldset(\n legend = Some(Legend(\n content = messages(\"businessactivities.involved.other.legend\").toText,\n classes = \"govuk-fieldset__legend--m\"\n ))\n )),\n name = \"involvedInOther\",\n items = InvolvedInOther.formValues(conditionalInput)\n ).withFormField(form(\"involvedInOther\"))\n )\n\n @button()\n\n @returnLink(true)\n }\n}\n","usages":["inputTextArea(\n CharacterCount(\n label = Label(\n isPageHeading = false,\n content = Text(messages(\"businessactivities.confirm-activities.lbl.details\"))\n ),\n id = \"details\",\n name = \"details\",\n rows = 6,\n errorMessage = form(\"details\").error.map(err => ErrorMessage(content = Text(messages(err.message, err.args:_*)))),\n maxLength = Some(maxLength)\n ).withFormField(form(\"details\"))\n )"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessactivities/InvolvedInOtherNameView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import models.businessactivities.InvolvedInOther\n@import uk.gov.hmrc.govukfrontend.views.Aliases.CharacterCount\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichCharacterCount\n@import uk.gov.hmrc.govukfrontend.views.html.components.implicits._\n@import views.html.components.forms.{ErrorSummary, InputYesNo}\n@import views.html.components.{Button, Heading, ReturnLink, SectionSubtitle}\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n inputTextArea: GovukCharacterCount,\n inputYesNo: InputYesNo,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean, businessTypes: Option[List[String]], maxLength: Int)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@hasInvolvedInOtherError = @{\n form.errors match {\n case Nil => false\n case x if x.head.key == \"details\" => true\n case _ => false\n }\n}\n\n@preparedErrorSummary = @{\n if(hasInvolvedInOtherError) {\n errorSummary(form, Some(Map(\"details\" -> \"details\")))\n } else {\n errorSummary(form, Some(Map(\"involvedInOther\" -> \"involvedInOther-true\")))\n }\n}\n\n@conditionalInput = @{\n\n inputTextArea(\n CharacterCount(\n label = Label(\n isPageHeading = false,\n content = Text(messages(\"businessactivities.confirm-activities.lbl.details\"))\n ),\n id = \"details\",\n name = \"details\",\n rows = 6,\n errorMessage = form(\"details\").error.map(err => ErrorMessage(content = Text(messages(err.message, err.args:_*)))),\n maxLength = Some(maxLength)\n ).withFormField(form(\"details\"))\n )\n\n}\n\n@layout(pageTitle = s\"${messages(\"businessactivities.involved.other.title\")} - ${messages(\"summary.businessactivities\")}\") {\n\n @preparedErrorSummary\n\n @subtitle(messages(\"summary.businessactivities\"))\n\n @heading(\"businessactivities.involved.other.title\")\n\n @businessTypes.map { types =>\n @if(types.size > 1) {\n <p class=\"govuk-body\">@messages(\"businessactivities.confirm-activities.subtitle_4\"):</p>\n\n <ul class=\"govuk-list govuk-list--bullet\">\n @types.map { businessType =>\n <li>@businessType</li>\n }\n </ul>\n } else {\n <p class=\"govuk-body\">@messages(\"businessactivities.confirm-activities.subtitle_4\") @(types.head)</p>\n }\n }\n\n <p class=\"govuk-body\">@messages(\"businessactivities.involved.other.hint\")</p>\n <ul class=\"govuk-list govuk-list--bullet\">\n <li>@messages(\"businessactivities.involved.listline1\")</li>\n <li>@messages(\"businessactivities.involved.listline2\")</li>\n <li>@messages(\"businessactivities.involved.listline3\")</li>\n </ul>\n\n @formHelper(action = controllers.businessactivities.routes.InvolvedInOtherController.post(edit)) {\n\n @inputYesNo(\n Radios(\n Some(Fieldset(\n legend = Some(Legend(\n content = messages(\"businessactivities.involved.other.legend\").toText,\n classes = \"govuk-fieldset__legend--m\"\n ))\n )),\n name = \"involvedInOther\",\n items = InvolvedInOther.formValues(conditionalInput)\n ).withFormField(form(\"involvedInOther\"))\n )\n\n @button()\n\n @returnLink(true)\n }\n}\n","usages":["@formHelper(action = controllers.businessactivities.routes.InvolvedInOtherController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessactivities/NCARegisteredView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import uk.gov.hmrc.hmrcfrontend.views.config.HmrcYesNoRadioItems\n@import views.html.components.forms.{ErrorSummary, InputYesNo}\n@import views.html.components.{Button, ReturnLink, SectionSubtitle, Heading}\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n inputYesNo: InputYesNo,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(pageTitle = messages(\"businessactivities.ncaRegistered.title\") + \" - \" + messages(\"summary.businessactivities\")) {\n\n @errorSummary(form)\n\n @subtitle(\"summary.businessactivities\")\n\n @heading(\"businessactivities.ncaRegistered.title\")\n\n <p class=\"govuk-body\">\n @messages(\"businessactivities.ncaRegistered.p1\")\n <a href=\"@appConfig.nationalCrimeAgencyUrl\" target=\"_blank\" class=\"govuk-link\"> @messages(\"businessactivities.ncaRegistered.link\")</a>.\n </p>\n <p class=\"govuk-body\">@messages(\"businessactivities.ncaRegistered.p2\")</p>\n\n @formHelper(action = controllers.businessactivities.routes.NCARegisteredController.post(edit)) {\n\n @inputYesNo(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessactivities.ncaRegistered.legend\")),\n classes = \"govuk-fieldset__legend--m\",\n isPageHeading = false\n ))\n )),\n name = \"ncaRegistered\",\n items = HmrcYesNoRadioItems(),\n classes = \"govuk-radios govuk-radios--inline\"\n ).withFormField(form(\"ncaRegistered\"))\n )\n\n @button()\n\n @returnLink(true)\n }\n}\n","usages":["@formHelper(action = controllers.businessactivities.routes.NCARegisteredController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessactivities/RiskAssessmentPolicyView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import uk.gov.hmrc.hmrcfrontend.views.config.HmrcYesNoRadioItems\n@import views.html.components.forms.{ErrorSummary, InputYesNo}\n@import views.html.components.{Button, ReturnLink, SectionSubtitle}\n\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n formHelper: FormWithCSRF,\n inputYesNo: InputYesNo,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(pageTitle = messages(\"businessactivities.riskassessment.policy.title\") + \" - \" + messages(\"summary.businessactivities\")) {\n\n @errorSummary(form)\n\n @subtitle(\"summary.businessactivities\")\n\n @formHelper(action = controllers.businessactivities.routes.RiskAssessmentController.post(edit)) {\n\n @inputYesNo(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessactivities.riskassessment.policy.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n name = \"hasPolicy\",\n items = HmrcYesNoRadioItems(),\n classes = \"govuk-radios govuk-radios--inline\"\n ).withFormField(form(\"hasPolicy\"))\n )\n\n @button()\n\n @returnLink(true)\n }\n}","usages":["@formHelper(action = controllers.businessactivities.routes.RiskAssessmentController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessactivities/TaxMattersView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import uk.gov.hmrc.hmrcfrontend.views.config.HmrcYesNoRadioItems\n@import views.html.components.forms.{ErrorSummary, InputYesNo}\n@import views.html.components.{Button, ReturnLink, SectionSubtitle}\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n formHelper: FormWithCSRF,\n inputYesNo: InputYesNo,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean, accountantName: String)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(pageTitle = messages(\"businessactivities.tax.matters.title\") + \" - \" + messages(\"summary.businessactivities\")) {\n\n @errorSummary(form)\n\n @subtitle(\"summary.businessactivities\")\n\n @formHelper(action = controllers.businessactivities.routes.TaxMattersController.post(edit)) {\n\n @inputYesNo(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessactivities.tax.matters.heading\", accountantName)),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n name = \"manageYourTaxAffairs\",\n items = HmrcYesNoRadioItems(),\n classes = \"govuk-radios govuk-radios--inline\"\n ).withFormField(form(\"manageYourTaxAffairs\"))\n )\n\n @button()\n\n @returnLink(true)\n }\n}\n","usages":["@formHelper(action = controllers.businessactivities.routes.TaxMattersController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessactivities/TransactionTypesView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichCheckboxes\n@import config.ApplicationConfig\n@import models.businessactivities.TransactionTypes\n@import views.html.components.forms.{InputCheckbox, InputText, ErrorSummary}\n@import views.html.components.{SectionSubtitle, ReturnLink, Button}\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n formHelper: FormWithCSRF,\n inputCheckbox: InputCheckbox,\n inputText: InputText,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean)(implicit messages: Messages, request: Request[_], appConfig: ApplicationConfig)\n\n@hasSoftwareNameError = @{\n form.errors match {\n case Nil => false\n case x if x.head.key == \"software\" => true\n case _ => false\n }\n}\n\n@preparedErrorSummary = @{\n if(hasSoftwareNameError) {\n errorSummary(form, Some(Map(\"software\" -> \"software\")))\n } else {\n errorSummary(form, Some(Map(\"types\" -> \"types_1\")))\n }\n}\n\n@conditionalHtml = @{\n inputText(\n Input(\n label = Label(\n isPageHeading = false,\n content = Text(messages(\"businessactivities.name.software.pkg.lbl\")),\n classes = \"govuk-label\"\n ),\n id = \"software\",\n name = \"software\",\n classes = \"\"\n ),\n form(\"software\")\n )\n}\n\n@layout(pageTitle = messages(\"businessactivities.do.keep.records\") + \" - \" + messages(\"summary.businessactivities\")) {\n\n @preparedErrorSummary\n\n @subtitle(\"summary.businessactivities\")\n\n @formHelper(action = controllers.businessactivities.routes.TransactionTypesController.post(edit)) {\n\n @inputCheckbox(\n Checkboxes(\n fieldset = Some(Fieldset(\n legend = Some(\n Legend(\n content = Text(messages(\"businessactivities.do.keep.records\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n )\n )\n )),\n hint = Some(\n Hint(\n content = Text(messages(\"lbl.select.all\"))\n )\n ),\n name = \"types\",\n items = TransactionTypes.formValues(conditionalHtml)\n ).withFormField(form(\"types\"))\n )\n\n @button()\n\n @returnLink(true)\n }\n}\n","usages":["@formHelper(action = controllers.businessactivities.routes.TransactionTypesController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessactivities/WhoIsYourAccountantNameView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import views.html.components.{SectionSubtitle, Heading, Button, ReturnLink}\n@import views.html.components.forms.{InputText, ErrorSummary}\n\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n inputText: InputText,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(pageTitle = messages(\"businessactivities.whoisyouraccountant.title\") + \" - \" + messages(\"summary.businessactivities\")) {\n\n @errorSummary(form)\n\n @subtitle(\"summary.businessactivities\")\n\n @heading(\"businessactivities.whoisyouraccountant.title\")\n\n @formHelper(action = controllers.businessactivities.routes.WhoIsYourAccountantNameController.post(edit)) {\n\n @inputText(\n Input(\n label = Label(\n content = Text(messages(\"businessactivities.whoisyouraccountant.name\"))\n ),\n id = \"name\",\n name = \"name\",\n classes = \"govuk-!-width-three-quarters\"\n ),\n form(\"name\")\n )\n\n @inputText(\n Input(\n label = Label(\n content = Text(messages(\"businessactivities.whoisyouraccountant.tradingName\"))\n ),\n id = \"tradingName\",\n name = \"tradingName\",\n classes = \"govuk-!-width-three-quarters\"\n ),\n form(\"tradingName\")\n )\n\n @button()\n\n @returnLink(true)\n }\n}\n","usages":["@formHelper(action = controllers.businessactivities.routes.WhoIsYourAccountantNameController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessdetails/ActivityStartDateView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.hmrcfrontend.views.Implicits.RichDateInput\n@import components.forms.DateErrorSummary\n@import components.{Button, ReturnLink, SectionSubtitle}\n@import config.ApplicationConfig\n\n@this(\n layout: Layout,\n formHelper: FormWithCSRF,\n errorSummary: DateErrorSummary,\n subtitle: SectionSubtitle,\n govukDateInput: GovukDateInput,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(\n pageTitle = s\"${messages(\"businessdetails.activity.start.date.title\")} - ${messages(\"summary.businessdetails\")}\",\n) {\n\n @errorSummary(form, \"value\")\n\n @subtitle(\"summary.businessdetails\")\n\n @formHelper(action = controllers.businessdetails.routes.ActivityStartDateController.post(edit)) {\n\n @govukDateInput(DateInput(\n id = \"startDate\",\n hint = Some(Hint(content = Text(messages(\"lbl.date.example\")))),\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessdetails.activity.start.date.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n ))\n ).withFormField(form(\"value\")))\n\n @button()\n }\n\n @returnLink(returnLink = true)\n}\n","usages":["@formHelper(action = controllers.businessdetails.routes.ActivityStartDateController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessdetails/ActivityStartDateView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukDateInput#","variableName":"govukDateInput","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.hmrcfrontend.views.Implicits.RichDateInput\n@import components.forms.DateErrorSummary\n@import components.{Button, ReturnLink, SectionSubtitle}\n@import config.ApplicationConfig\n\n@this(\n layout: Layout,\n formHelper: FormWithCSRF,\n errorSummary: DateErrorSummary,\n subtitle: SectionSubtitle,\n govukDateInput: GovukDateInput,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(\n pageTitle = s\"${messages(\"businessdetails.activity.start.date.title\")} - ${messages(\"summary.businessdetails\")}\",\n) {\n\n @errorSummary(form, \"value\")\n\n @subtitle(\"summary.businessdetails\")\n\n @formHelper(action = controllers.businessdetails.routes.ActivityStartDateController.post(edit)) {\n\n @govukDateInput(DateInput(\n id = \"startDate\",\n hint = Some(Hint(content = Text(messages(\"lbl.date.example\")))),\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessdetails.activity.start.date.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n ))\n ).withFormField(form(\"value\")))\n\n @button()\n }\n\n @returnLink(returnLink = true)\n}\n","usages":["@govukDateInput(DateInput(\n id = \"startDate\",\n hint = Some(Hint(content = Text(messages(\"lbl.date.example\")))),\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessdetails.activity.start.date.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n ))\n ).withFormField(form(\"value\")))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessdetails/BusinessEmailAddressView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import views.html.components.forms.{ErrorSummary, InputText}\n@import views.html.components.{Button, Heading, ReturnLink, SectionSubtitle}\n\n@this(\n layout: Layout,\n formHelper: FormWithCSRF,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n inputText: InputText,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean)(implicit request: Request[_], messages: Messages, lang:Lang, appConfig: ApplicationConfig)\n\n@layout(pageTitle = s\"${messages(\"businessdetails.contactingyou.email.title\")} - ${messages(\"summary.businessdetails\")}\") {\n\n @errorSummary(form)\n\n @subtitle(messages(\"summary.businessdetails\"))\n\n @formHelper(action = controllers.businessdetails.routes.BusinessEmailAddressController.post(edit)) {\n\n @heading(\"businessdetails.contactingyou.email.title\")\n\n <p class=\"govuk-body\">@messages(\"businessdetails.contactingyou.lbl\")</p>\n\n @inputText(\n Input(\n id = \"email\",\n name = \"email\",\n inputType = \"email\",\n label = Label(\n content = Text(messages(\"businessdetails.contactingyou.email.lbl\"))\n ),\n classes = \"govuk-!-width-full\",\n attributes = Map(\n \"autocomplete\" -> \"work email\",\n \"spellcheck\" -> \"false\"\n )\n ),\n form(\"email\")\n )\n\n @button()\n\n @returnLink(true)\n }\n}\n","usages":["@formHelper(action = controllers.businessdetails.routes.BusinessEmailAddressController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessdetails/BusinessTelephoneView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import views.html.components.forms.{ErrorSummary, InputText}\n@import views.html.components.{Button, Heading, ReturnLink, SectionSubtitle}\n\n@this(\n layout: Layout,\n formHelper: FormWithCSRF,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n inputText: InputText,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean)(implicit request: Request[_], messages: Messages)\n\n@layout(pageTitle = s\"${messages(\"businessdetails.contactingyou.phone.title\")} - ${messages(\"summary.businessdetails\")}\") {\n\n @errorSummary(form)\n\n @subtitle(messages(\"summary.businessdetails\"))\n\n @formHelper(action = controllers.businessdetails.routes.ContactingYouPhoneController.post(edit)) {\n\n @heading(\"businessdetails.contactingyou.phone.title\")\n\n @inputText(\n Input(\n id = \"phoneNumber\",\n name = \"phoneNumber\",\n inputType = \"tel\",\n autocomplete = Some(\"work tel\"),\n label = Label(\n content = Text(messages(\"businessdetails.contactingyou.phone.lbl2\"))\n ),\n hint = Some(Hint(\n content = Text(messages(\"businessdetails.contactingyou.phone.hint\"))\n )),\n classes = \"govuk-!-width-one-half\"\n ),\n form(\"phoneNumber\")\n )\n\n @button()\n\n @returnLink(true)\n }\n}\n","usages":["@formHelper(action = controllers.businessdetails.routes.ContactingYouPhoneController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessdetails/CheckYourAnswersView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukSummaryList#","variableName":"govukSummaryList","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.{ApplicationConfig}\n@import components.{Button, Heading, SectionSubtitle}\n\n@this(\n layout: Layout,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n govukSummaryList: GovukSummaryList,\n button: Button\n)\n\n@(summaryList: SummaryList)(implicit request: Request[_], messages: Messages, lang: Lang, appConfig: ApplicationConfig)\n\n@layout(\n pageTitle = messages(\"title.cya\") + \" - \" + messages(\"summary.businessdetails\"),\n showBackLink = false\n) {\n\n @subtitle(\"summary.businessdetails\")\n\n @heading(\"title.cya\")\n\n @govukSummaryList(summaryList)\n\n @formHelper(action = controllers.businessdetails.routes.SummaryController.post()) {\n @button(\"button.checkyouranswers.acceptandcomplete\")\n }\n\n}\n\n","usages":["@govukSummaryList(summaryList)"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessdetails/CheckYourAnswersView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.{ApplicationConfig}\n@import components.{Button, Heading, SectionSubtitle}\n\n@this(\n layout: Layout,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n govukSummaryList: GovukSummaryList,\n button: Button\n)\n\n@(summaryList: SummaryList)(implicit request: Request[_], messages: Messages, lang: Lang, appConfig: ApplicationConfig)\n\n@layout(\n pageTitle = messages(\"title.cya\") + \" - \" + messages(\"summary.businessdetails\"),\n showBackLink = false\n) {\n\n @subtitle(\"summary.businessdetails\")\n\n @heading(\"title.cya\")\n\n @govukSummaryList(summaryList)\n\n @formHelper(action = controllers.businessdetails.routes.SummaryController.post()) {\n @button(\"button.checkyouranswers.acceptandcomplete\")\n }\n\n}\n\n","usages":["@formHelper(action = controllers.businessdetails.routes.SummaryController.post())"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessdetails/ConfirmRegisteredOfficeOrMainPlaceView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import models.businessdetails._\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import uk.gov.hmrc.hmrcfrontend.views.config.HmrcYesNoRadioItems\n@import views.html.components.{SectionSubtitle, Button, Heading, ReturnLink, RegisteredOfficeHelper}\n@import views.html.components.forms.{InputYesNo, ErrorSummary}\n\n\n\n@this(\n layout: Layout,\n formHelper: FormWithCSRF,\n errorSummary: ErrorSummary,\n heading: Heading,\n officeHelper: RegisteredOfficeHelper,\n subtitle: SectionSubtitle,\n inputYesNo: InputYesNo,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], model: RegisteredOffice, edit: Boolean = false)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(\n pageTitle = messages(\"businessdetails.confirmingyouraddress.title\") + \" - \" + messages(\"summary.businessdetails\"),\n) {\n\n @errorSummary(form)\n\n @subtitle(\"summary.businessdetails\")\n\n @heading(\"businessdetails.confirmingyouraddress.title\")\n\n @officeHelper(model)\n\n @formHelper(action = controllers.businessdetails.routes.ConfirmRegisteredOfficeController.post(edit)) {\n\n @inputYesNo(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessdetails.confirmingyouraddress.title\")),\n classes = \"govuk-visually-hidden\",\n isPageHeading = false\n ))\n )),\n name = \"isRegOfficeOrMainPlaceOfBusiness\",\n items = HmrcYesNoRadioItems(),\n classes = \"govuk-radios govuk-radios--inline\"\n ).withFormField(form(\"isRegOfficeOrMainPlaceOfBusiness\"))\n )\n\n\n @button()\n\n @returnLink(true)\n\n }\n}\n","usages":["@formHelper(action = controllers.businessdetails.routes.ConfirmRegisteredOfficeController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessdetails/CorrespondenceAddressIsUKView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import uk.gov.hmrc.hmrcfrontend.views.config.HmrcYesNoRadioItems\n@import views.html.components.{SectionSubtitle, Button, Heading, ReturnLink}\n@import views.html.components.forms.{InputYesNo, ErrorSummary}\n\n@this(\n layout: Layout,\n formHelper: FormWithCSRF,\n errorSummary: ErrorSummary,\n heading: Heading,\n subtitle: SectionSubtitle,\n inputYesNo: InputYesNo,\n button: Button,\n returnLink: ReturnLink\n)\n\n\n@(form: Form[_], edit: Boolean)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(\n pageTitle = messages(\"businessdetails.correspondenceaddress.isuk.title\") + \" - \" + messages(\"summary.businessdetails\"),\n) {\n\n @errorSummary(form)\n\n @subtitle(\"summary.businessdetails\")\n\n @formHelper(action = controllers.businessdetails.routes.CorrespondenceAddressIsUkController.post(edit)) {\n\n @inputYesNo(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessdetails.correspondenceaddress.isuk.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n items = HmrcYesNoRadioItems(),\n classes = \"govuk-radios govuk-radios--inline\"\n ).withFormField(form(\"isUk\"))\n )\n\n @button()\n\n @returnLink(true)\n }\n}\n","usages":["@formHelper(action = controllers.businessdetails.routes.CorrespondenceAddressIsUkController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessdetails/CorrespondenceAddressNonUKView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import components.forms.{ErrorSummary, InputAddressLines, InputCountry, InputText}\n@import components.{Button, Heading, ReturnLink, SectionSubtitle}\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n inputText: InputText,\n inputAddressLines: InputAddressLines,\n inputCountry: InputCountry,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean, countryData: Seq[SelectItem])(implicit request: Request[_], messages: Messages)\n\n@preparedErrorSummaryMapping = @{\n\n if(form.error(\"country\").isDefined) {\n Some(Map(\"country\" -> \"location-autocomplete\"))\n } else None\n}\n@layout(\n pageTitle = messages(\"businessdetails.correspondenceaddress.title\") + \" - \" + messages(\"summary.businessdetails\")\n) {\n\n @errorSummary(form, preparedErrorSummaryMapping)\n\n @subtitle(\"summary.businessdetails\")\n\n @heading(\"businessdetails.correspondenceaddress.title\")\n\n @formHelper(action = controllers.businessdetails.routes.CorrespondenceAddressNonUkController.post(edit)) {\n\n @inputText(\n Input(\n id = \"yourName\",\n name = \"yourName\",\n autocomplete = Some(\"name\"),\n label = Label(\n content = Text(messages(\"businessdetails.correspondenceaddress.yourName\"))\n ),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false)\n ),\n form(\"yourName\")\n )\n\n @inputText(\n Input(\n id = \"businessName\",\n name = \"businessName\",\n autocomplete = Some(\"organization\"),\n label = Label(\n content = Text(messages(\"businessdetails.correspondenceaddress.businessName\"))\n ),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false)\n ),\n form(\"businessName\")\n )\n\n @inputAddressLines(form)\n\n @inputCountry(form, countryData)\n\n @button()\n\n @returnLink(true)\n }\n}","usages":["@formHelper(action = controllers.businessdetails.routes.CorrespondenceAddressNonUkController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessdetails/CorrespondenceAddressUKView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import components.forms.{ErrorSummary, InputAddressLines, InputPostcode, InputText}\n@import components.{Button, Heading, ReturnLink, SectionSubtitle}\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n inputText: InputText,\n inputAddressLines: InputAddressLines,\n inputPostcode: InputPostcode,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean)(implicit request: Request[_], messages: Messages)\n\n@layout(\n pageTitle = messages(\"businessdetails.correspondenceaddress.title\") + \" - \" + messages(\"summary.businessdetails\")\n) {\n\n @errorSummary(form)\n\n @subtitle(\"summary.businessdetails\")\n\n @heading(\"businessdetails.correspondenceaddress.title\")\n\n @formHelper(action = controllers.businessdetails.routes.CorrespondenceAddressUkController.post(edit)) {\n\n @inputText(\n Input(\n id = \"yourName\",\n name = \"yourName\",\n autocomplete = Some(\"name\"),\n label = Label(\n content = Text(messages(\"businessdetails.correspondenceaddress.yourName\"))\n ),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false)\n ),\n form(\"yourName\")\n )\n\n @inputText(\n Input(\n id = \"businessName\",\n name = \"businessName\",\n autocomplete = Some(\"organization\"),\n label = Label(\n content = Text(messages(\"businessdetails.correspondenceaddress.businessName\"))\n ),\n classes = \"govuk-!-width-two-thirds\",\n spellcheck = Some(false)\n ),\n form(\"businessName\")\n )\n\n @inputAddressLines(form)\n\n @inputPostcode(form)\n\n @button()\n\n @returnLink(true)\n }\n}\n","usages":["@formHelper(action = controllers.businessdetails.routes.CorrespondenceAddressUkController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessdetails/LettersAddressView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import models.businessdetails._\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import uk.gov.hmrc.hmrcfrontend.views.config.HmrcYesNoRadioItems\n@import views.html.components.{SectionSubtitle, Button, Heading, ReturnLink, RegisteredOfficeHelper}\n@import views.html.components.forms.{InputYesNo, ErrorSummary}\n\n\n\n@this(\n layout: Layout,\n formHelper: FormWithCSRF,\n errorSummary: ErrorSummary,\n heading: Heading,\n officeHelper: RegisteredOfficeHelper,\n subtitle: SectionSubtitle,\n inputYesNo: InputYesNo,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], model: RegisteredOffice, edit: Boolean = false)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(\n pageTitle = messages(\"businessdetails.lettersaddress.title\") + \" - \" + messages(\"summary.businessdetails\"),\n) {\n\n @errorSummary(form)\n\n @subtitle(\"summary.businessdetails\")\n\n @heading(\"businessdetails.lettersaddress.title\")\n\n @officeHelper(model)\n\n @formHelper(action = controllers.businessdetails.routes.LettersAddressController.post(edit)) {\n\n @inputYesNo(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessdetails.lettersaddress.title\")),\n classes = \"govuk-visually-hidden\",\n isPageHeading = false\n ))\n )),\n name = \"lettersAddress\",\n items = HmrcYesNoRadioItems(),\n classes = \"govuk-radios govuk-radios--inline\"\n ).withFormField(form(\"lettersAddress\"))\n )\n\n @button()\n\n @returnLink(true)\n\n }\n}\n","usages":["@formHelper(action = controllers.businessdetails.routes.LettersAddressController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessdetails/PreviouslyRegisteredView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import components.forms.{ErrorSummary, InputYesNo}\n@import components.{Button, ReturnLink, SectionSubtitle}\n@import config.ApplicationConfig\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import uk.gov.hmrc.hmrcfrontend.views.config.HmrcYesNoRadioItems\n\n@this(\n layout: Layout,\n formHelper: FormWithCSRF,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n inputYesNo: InputYesNo,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(\n pageTitle = s\"${messages(\"businessdetails.registeredformlr.title\")} - ${messages(\"summary.businessdetails\")}\",\n) {\n\n @errorSummary(form)\n\n @subtitle(\"summary.businessdetails\")\n\n @formHelper(action = controllers.businessdetails.routes.PreviouslyRegisteredController.post(edit)) {\n\n @inputYesNo(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessdetails.registeredformlr.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n name = \"value\",\n items = HmrcYesNoRadioItems(),\n classes = \"govuk-radios govuk-radios--inline\"\n )\n .withFormField(form(\"value\"))\n )\n\n @button()\n }\n\n @returnLink(returnLink = true)\n}\n","usages":["@formHelper(action = controllers.businessdetails.routes.PreviouslyRegisteredController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessdetails/RegisteredOfficeIsUKView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import uk.gov.hmrc.hmrcfrontend.views.config.HmrcYesNoRadioItems\n@import views.html.components.{SectionSubtitle, Button, Heading, ReturnLink}\n@import views.html.components.forms.{InputYesNo, ErrorSummary}\n\n@this(\n layout: Layout,\n formHelper: FormWithCSRF,\n errorSummary: ErrorSummary,\n heading: Heading,\n subtitle: SectionSubtitle,\n inputYesNo: InputYesNo,\n button: Button,\n returnLink: ReturnLink\n)\n\n\n@(form: Form[_], edit: Boolean)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(\n pageTitle = messages(\"businessdetails.registeredoffice.title\") + \" - \" + messages(\"summary.businessdetails\"),\n) {\n\n @errorSummary(form)\n\n @subtitle(\"summary.businessdetails\")\n\n @formHelper(action = controllers.businessdetails.routes.RegisteredOfficeIsUKController.post(edit)) {\n\n @inputYesNo(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessdetails.registeredoffice.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n items = HmrcYesNoRadioItems(),\n classes = \"govuk-radios govuk-radios--inline\"\n ).withFormField(form(\"isUK\"))\n )\n\n @button()\n\n @returnLink(true)\n }\n}","usages":["@formHelper(action = controllers.businessdetails.routes.RegisteredOfficeIsUKController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessdetails/RegisteredOfficeNonUKView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import components.forms.{ErrorSummary, InputAddressLines, InputCountry}\n@import components.{Button, Heading, ReturnLink, SectionSubtitle}\n@import config.ApplicationConfig\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n inputAddressLines: InputAddressLines,\n inputCountry: InputCountry,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean, countryData: Seq[SelectItem])(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@preparedErrorSummaryMapping = @{\n\n if(form.error(\"country\").isDefined) {\n Some(Map(\"country\" -> \"location-autocomplete\"))\n } else None\n}\n\n@layout(\n pageTitle = messages(\"businessdetails.registeredoffice.where.title\") + \" - \" + messages(\"summary.businessdetails\")\n) {\n\n @errorSummary(form, preparedErrorSummaryMapping)\n\n @subtitle(\"summary.businessdetails\")\n\n @heading(\"businessdetails.registeredoffice.where.title\")\n\n @formHelper(action = controllers.businessdetails.routes.RegisteredOfficeNonUKController.post(edit)) {\n\n <input type=\"hidden\" name=\"isUK\" value=false />\n\n @inputAddressLines(form)\n\n @inputCountry(form, countryData)\n\n @button()\n\n @returnLink(true)\n }\n}\n","usages":["@formHelper(action = controllers.businessdetails.routes.RegisteredOfficeNonUKController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessdetails/RegisteredOfficeUKView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import components.forms.{ErrorSummary, InputAddressLines, InputPostcode}\n@import components.{Button, Heading, ReturnLink, SectionSubtitle}\n@import config.ApplicationConfig\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n inputAddressLines: InputAddressLines,\n inputPostcode: InputPostcode,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(\n pageTitle = messages(\"businessdetails.registeredoffice.where.title\") + \" - \" + messages(\"summary.businessdetails\")\n) {\n\n @errorSummary(form)\n\n @subtitle(\"summary.businessdetails\")\n\n @heading(\"businessdetails.registeredoffice.where.title\")\n\n @formHelper(action = controllers.businessdetails.routes.RegisteredOfficeUKController.post(edit)) {\n\n <input type=\"hidden\" name=\"isUK\" value=true />\n\n @inputAddressLines(form)\n\n @inputPostcode(form)\n\n @button()\n\n @returnLink(true)\n }\n}\n\n","usages":["@formHelper(action = controllers.businessdetails.routes.RegisteredOfficeUKController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessdetails/VATRegisteredView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.implicits._\n@import config.ApplicationConfig\n@import models.businessdetails.VATRegistered\n@import components.{Button, ReturnLink, SectionSubtitle}\n@import components.forms.{InputText, InputYesNo, ErrorSummary}\n\n@this(\n layout: Layout,\n formHelper: FormWithCSRF,\n subtitle: SectionSubtitle,\n inputText: InputText,\n inputYesNo: InputYesNo,\n errorSummary: ErrorSummary,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@hasVATNumberError = @{\n form.errors match {\n case Nil => false\n case x if x.head.key == \"vrnNumber\" => true\n case _ => false\n }\n}\n\n@preparedErrorSummary = @{\n if(hasVATNumberError) {\n errorSummary(form, Some(Map(\"vrnNumber\" -> \"vrnNumber\")))\n } else {\n errorSummary(form, Some(Map(\"registeredForVAT\" -> \"registeredForVAT-true\")))\n }\n}\n\n@conditionalInput = @{\n inputText(\n input = Input(\n label = Label(\n isPageHeading = false,\n content = Text(messages(\"businessdetails.registeredforvat.lbl.vatNumber\")),\n classes = \"govuk-label\"\n ),\n hint = Some(Hint(\n id = Some(\"vrnNumber-hint\"),\n content = Text(messages(\"businessdetails.registeredforvat.lbl.vatNumber.hint\"))\n )),\n name = \"vrnNumber\",\n id = \"vrnNumber\",\n inputmode = Some(\"numeric\"),\n classes = \"govuk-!-width-one-quarter\"\n ),\n field = form(\"vrnNumber\")\n )\n}\n\n@layout(\n pageTitle = messages(\"businessdetails.registeredforvat.title\") + \" - \" + messages(\"summary.businessdetails\")\n) {\n\n @formHelper(action = controllers.businessdetails.routes.VATRegisteredController.post(edit)) {\n\n @preparedErrorSummary\n\n @subtitle(\"summary.businessdetails\")\n\n @inputYesNo(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessdetails.registeredforvat.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n name = \"registeredForVAT\",\n items = VATRegistered.formValues(conditionalInput)\n ).withFormField(form(\"registeredForVAT\"))\n\n )\n\n @button()\n\n @returnLink(true)\n }\n}\n","usages":["@formHelper(action = controllers.businessdetails.routes.VATRegisteredController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/BusinessTypeView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukRadios#","variableName":"govukRadios","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import models.businessmatching.BusinessType\n@import config.ApplicationConfig\n@import views.html.components.forms.ErrorSummary\n@import views.html.components.{SectionSubtitle, Button, ReturnLink}\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n formHelper: FormWithCSRF,\n govukRadios: GovukRadios,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_])(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(messages(\"businessmatching.businessType.title\") + \" - \" + messages(\"summary.businessmatching\")) {\n\n @errorSummary(form, Some(Map(\"businessType\" -> s\"businessType-${BusinessType.all.head.value}\")))\n\n @subtitle(\"summary.businessmatching\")\n\n @formHelper(controllers.businessmatching.routes.BusinessTypeController.post()) {\n\n @govukRadios(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessmatching.businessType.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n name = \"businessType\",\n items = BusinessType.radioItems,\n classes = \"govuk-radios\"\n ).withFormField(form(\"businessType\"))\n )\n\n @button()\n\n @returnLink(true)\n }\n}","usages":["@govukRadios(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessmatching.businessType.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n name = \"businessType\",\n items = BusinessType.radioItems,\n classes = \"govuk-radios\"\n ).withFormField(form(\"businessType\"))\n )"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/BusinessTypeView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import models.businessmatching.BusinessType\n@import config.ApplicationConfig\n@import views.html.components.forms.ErrorSummary\n@import views.html.components.{SectionSubtitle, Button, ReturnLink}\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n formHelper: FormWithCSRF,\n govukRadios: GovukRadios,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_])(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(messages(\"businessmatching.businessType.title\") + \" - \" + messages(\"summary.businessmatching\")) {\n\n @errorSummary(form, Some(Map(\"businessType\" -> s\"businessType-${BusinessType.all.head.value}\")))\n\n @subtitle(\"summary.businessmatching\")\n\n @formHelper(controllers.businessmatching.routes.BusinessTypeController.post()) {\n\n @govukRadios(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessmatching.businessType.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n name = \"businessType\",\n items = BusinessType.radioItems,\n classes = \"govuk-radios\"\n ).withFormField(form(\"businessType\"))\n )\n\n @button()\n\n @returnLink(true)\n }\n}","usages":["@formHelper(controllers.businessmatching.routes.BusinessTypeController.post())"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/CheckCompanyIsNotRegisteredView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"form","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import views.html.components.{SectionSubtitle, Heading, Button}\n\n@this(\n layout: Layout,\n subtitle: SectionSubtitle,\n heading: Heading,\n warningText: GovukWarningText,\n form: FormWithCSRF,\n button: Button\n)\n\n@()(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(\n messages(\"businessmatching.checkbusiness.title\") + \" - \" + messages(\"summary.businessmatching\"),\n showBackLink = false\n){\n\n @subtitle(\"summary.businessmatching\")\n\n @heading(\"businessmatching.checkbusiness.title\")\n\n <p class=\"govuk-hint\">@messages(\"businessmatching.checkbusiness.body\")</p>\n\n @warningText(\n WarningText(\n content = Text(messages(\"businessmatching.checkbusiness.warning\"))\n )\n )\n\n @form(controllers.businessmatching.routes.SummaryController.get) {\n @button(\"businessmatching.checkbusiness.button\", \"submit-button\")\n }\n}\n","usages":["@form(controllers.businessmatching.routes.SummaryController.get)"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/CheckCompanyIsNotRegisteredView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukWarningText#","variableName":"warningText","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import views.html.components.{SectionSubtitle, Heading, Button}\n\n@this(\n layout: Layout,\n subtitle: SectionSubtitle,\n heading: Heading,\n warningText: GovukWarningText,\n form: FormWithCSRF,\n button: Button\n)\n\n@()(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(\n messages(\"businessmatching.checkbusiness.title\") + \" - \" + messages(\"summary.businessmatching\"),\n showBackLink = false\n){\n\n @subtitle(\"summary.businessmatching\")\n\n @heading(\"businessmatching.checkbusiness.title\")\n\n <p class=\"govuk-hint\">@messages(\"businessmatching.checkbusiness.body\")</p>\n\n @warningText(\n WarningText(\n content = Text(messages(\"businessmatching.checkbusiness.warning\"))\n )\n )\n\n @form(controllers.businessmatching.routes.SummaryController.get) {\n @button(\"businessmatching.checkbusiness.button\", \"submit-button\")\n }\n}\n","usages":["@warningText(\n WarningText(\n content = Text(messages(\"businessmatching.checkbusiness.warning\"))\n )\n )"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/CheckYourAnswersView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.{ApplicationConfig}\n@import components.{Button, Heading, SectionSubtitle}\n\n@this(\n layout: Layout,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n govukSummaryList: GovukSummaryList,\n button: Button\n)\n\n@(summaryList: SummaryList, submitButton: Option[Html], isPreSubmission: Boolean = true)(implicit request: Request[_], messages: Messages, lang: Lang, appConfig: ApplicationConfig)\n\n@header = {\n @if(isPreSubmission) {\n @subtitle(\"summary.businessmatching\")\n @heading(\"title.cya.pre.application\", \"summary.businessmatching\")\n } else {\n @subtitle(\"summary.updateservice\")\n @heading(\"title.cya\", \"summary.updateservice\")\n }\n}\n\n@layout(\n pageTitle = if(isPreSubmission) {\n messages(\"title.cya.pre.application\") + \" - \" + messages(\"summary.businessmatching\")\n } else {\n messages(\"title.cya\") + \" - \" + messages(\"summary.updateservice\")\n },\n showBackLink = false\n) {\n\n @header\n\n @if(isPreSubmission) {\n <p class=\"govuk-body\">@messages(\"businessmatching.summary.icon.title\")</p>\n }\n\n @govukSummaryList(summaryList)\n\n @formHelper(action = controllers.businessmatching.routes.SummaryController.post()) {\n @submitButton.getOrElse(button(\"businessmatching.summary.noedit.anchortext\"))\n }\n\n}\n","usages":["@formHelper(action = controllers.businessmatching.routes.SummaryController.post())"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/CheckYourAnswersView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukSummaryList#","variableName":"govukSummaryList","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.{ApplicationConfig}\n@import components.{Button, Heading, SectionSubtitle}\n\n@this(\n layout: Layout,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n govukSummaryList: GovukSummaryList,\n button: Button\n)\n\n@(summaryList: SummaryList, submitButton: Option[Html], isPreSubmission: Boolean = true)(implicit request: Request[_], messages: Messages, lang: Lang, appConfig: ApplicationConfig)\n\n@header = {\n @if(isPreSubmission) {\n @subtitle(\"summary.businessmatching\")\n @heading(\"title.cya.pre.application\", \"summary.businessmatching\")\n } else {\n @subtitle(\"summary.updateservice\")\n @heading(\"title.cya\", \"summary.updateservice\")\n }\n}\n\n@layout(\n pageTitle = if(isPreSubmission) {\n messages(\"title.cya.pre.application\") + \" - \" + messages(\"summary.businessmatching\")\n } else {\n messages(\"title.cya\") + \" - \" + messages(\"summary.updateservice\")\n },\n showBackLink = false\n) {\n\n @header\n\n @if(isPreSubmission) {\n <p class=\"govuk-body\">@messages(\"businessmatching.summary.icon.title\")</p>\n }\n\n @govukSummaryList(summaryList)\n\n @formHelper(action = controllers.businessmatching.routes.SummaryController.post()) {\n @submitButton.getOrElse(button(\"businessmatching.summary.noedit.anchortext\"))\n }\n\n}\n","usages":["@govukSummaryList(summaryList)"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/CompanyRegistrationNumberView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import components.forms.{ErrorSummary, InputText}\n@import components.{Button, ReturnLink, Heading}\n@import config.ApplicationConfig\n@import views.ViewUtils._\n\n@this(\n formHelper: FormWithCSRF,\n layout: Layout,\n heading: Heading,\n input: InputText,\n errorSummary: ErrorSummary,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean, showReturnLink: Boolean = true, isPreSubmission: Boolean = true)(implicit request: Request[_], messages:Messages, lang: Lang, appConfig: ApplicationConfig)\n\n@section = @{\n if(isPreSubmission) \"summary.businessmatching\" else \"summary.updateinformation\"\n}\n\n@optionalReturnLink = @{\n if(showReturnLink) returnLink(true)\n}\n\n@layout(\n pageTitle = s\"\"\"${messages(\"businessmatching.registrationnumber.title\")} - ${messages(section)}\"\"\"\n){\n\n @errorSummary(form)\n\n <span id=\"stage-caption\" class=\"govuk-caption-xl\">@messages(section)</span>\n\n @heading(\"businessmatching.registrationnumber.title\")\n\n <p class=\"govuk-body\">\n @messages(\"businessmatching.registrationnumber.line_1\")\n <a href=\"@appConfig.companiesHouseUrl\" target=\"_blank\" class=\"govuk-link\"> @messages(\"businessmatching.registrationnumber.line_2\")</a>.\n </p>\n\n @formHelper(action = controllers.businessmatching.routes.CompanyRegistrationNumberController.post(edit), 'autoComplete -> \"off\") {\n\n @input(\n input = Input(\n label = Label(\n content = Text(messages(\"businessmatching.registrationnumber.title\")),\n classes = \"govuk-visually-hidden\",\n isPageHeading = false,\n ),\n hint = Some(\n Hint(\n content = Text(messages(\"lbl.hint.crn\"))\n )\n ),\n name = \"value\",\n id = \"value\",\n inputmode = Some(\"numeric\"),\n classes = \"govuk-!-width-one-quarter\"\n ),\n field = form(\"value\")\n )\n\n @button()\n\n @optionalReturnLink\n }\n}\n","usages":["@formHelper(action = controllers.businessmatching.routes.CompanyRegistrationNumberController.post(edit), 'autoComplete -> \"off\")"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/ConfirmPostcodeView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import views.html.components.forms.{ErrorSummary, InputText}\n@import views.html.components.{SectionSubtitle, Heading, Button}\n\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n inputText: InputText,\n button: Button\n)\n\n@(form: Form[_])(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(\n messages(\"businessmatching.confirm.postcode.title\") + \" - \" + messages(\"summary.businessmatching\"),\n showBackLink = false\n) {\n\n @errorSummary(form)\n\n @subtitle(\"summary.businessmatching\")\n\n @formHelper(controllers.businessmatching.routes.ConfirmPostCodeController.post()) {\n\n @inputText(\n Input(\n id = \"postCode\",\n name = \"postCode\",\n classes = \"govuk-!-width-one-quarter\",\n label = Label(\n isPageHeading = true,\n content = Text(messages(\"businessmatching.confirm.postcode.title\")),\n classes = \"govuk-label--xl\"\n )\n ),\n form(\"postCode\")\n )\n\n @button()\n }\n}\n","usages":["@formHelper(controllers.businessmatching.routes.ConfirmPostCodeController.post())"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/MsbServicesView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.implicits._\n@import components.{Button, ReturnLink, SectionSubtitle}\n@import components.forms.{InputCheckbox, ErrorSummary}\n@import config.ApplicationConfig\n@import models.businessmatching.BusinessMatchingMsbServices\n\n@this(\n formHelper: FormWithCSRF,\n layout: Layout,\n subtitle: SectionSubtitle,\n inputCheckbox: InputCheckbox,\n errorSummary: ErrorSummary,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean, showReturnLink: Boolean = true, isPreSubmission: Boolean = true, fxEnabledToggle: Boolean = false)(implicit request: Request[_], messages: Messages, lang: Lang, appConfig: ApplicationConfig)\n\n\n@section = @{\n if(isPreSubmission) \"summary.businessmatching\" else \"summary.updateinformation\"\n}\n\n@maybeReturnLink = {\n @if(showReturnLink) {\n @returnLink(true)\n }\n}\n\n@checkboxItems = @{\n BusinessMatchingMsbServices.formValues(fxEnabledToggle)\n}\n\n@layout(pageTitle = messages(\"msb.services.title\") + \" - \" + messages(section)) {\n\n @formHelper(action = controllers.businessmatching.routes.MsbSubSectorsController.post(edit)) {\n\n @errorSummary(form, Some(Map(\"value\" -> checkboxItems.map(_.id.getOrElse(\"value_2\")).head)))\n\n @subtitle(section)\n\n @inputCheckbox(\n Checkboxes(\n fieldset = Some(Fieldset(\n legend = Some(\n Legend(\n content = Text(messages(\"msb.services.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n )\n )\n )),\n hint = Some(\n Hint(\n content = Text(messages(\"lbl.select.all\"))\n )\n ),\n name = \"msbServices\",\n items = checkboxItems\n ).withFormField(form(\"value\"))\n )\n\n @button()\n }\n}\n","usages":["@formHelper(action = controllers.businessmatching.routes.MsbSubSectorsController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/PsrNumberView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.implicits._\n@import config.ApplicationConfig\n@import models.businessmatching.BusinessAppliedForPSRNumber\n@import components.{Button, ReturnLink, SectionSubtitle, Heading}\n@import components.forms.{InputText, InputYesNo, ErrorSummary}\n\n@this(\nformHelper: FormWithCSRF,\nlayout: Layout,\nsubtitle: SectionSubtitle,\ninputText: InputText,\ninputYesNo: InputYesNo,\nerrorSummary: ErrorSummary,\nheading: Heading,\nwarningText: GovukWarningText,\nbutton: Button,\nreturnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean, showReturnLink: Boolean = true, isPreSubmission: Boolean = true, isPsrDefined: Boolean = false)(implicit request: Request[_], messages: Messages, lang: Lang, appConfig: ApplicationConfig)\n\n@section = @{\nif(isPreSubmission) \"summary.businessmatching\" else \"summary.updateinformation\"\n}\n\n@title = @{\nif(isPreSubmission || !isPsrDefined) \"businessmatching.psr.number.title\" else \"businessmatching.psr.number.title.post.submission\"\n}\n\n@hasPsrNumberError = @{\nform.errors match {\ncase Nil => false\ncase x if x.head.key == \"regNumber\" => true\ncase _ => false\n}\n}\n\n@preparedErrorSummary = @{\nif(hasPsrNumberError) {\nerrorSummary(form, Some(Map(\"regNumber\" -> \"regNumber\")))\n} else {\nerrorSummary(form, Some(Map(\"appliedFor\" -> \"appliedFor-true\")))\n}\n}\n\n@maybeReturnLink = {\n@if(showReturnLink) {\n@returnLink(true)\n}\n}\n\n@conditionalInput = @{\ninputText(\ninput = Input(\nlabel = Label(\nisPageHeading = false,\ncontent = Text(messages(\"businessmatching.updateservice.psr.number.lbl\")),\nclasses = \"govuk-label\"\n),\nhint = None,\nname = \"regNumber\",\nid = \"regNumber\",\ninputmode = Some(\"numeric\"),\nclasses = \"govuk-!-width-one-quarter\"\n),\nfield = form(\"regNumber\")\n)\n}\n\n@supportingContent = {\n<div>\n <p class=\"govuk-hint\">@messages(\"businessmatching.psr.number.hint\")</p>\n <p class=\"govuk-hint\">@messages(\"businessmatching.psr.number.hint2\")</p>\n</div>\n}\n\n@layout(pageTitle = messages(title) + \" - \" + messages(section)) {\n\n@formHelper(action = controllers.businessmatching.routes.PSRNumberController.post(edit)) {\n\n@(edit, isPreSubmission, isPsrDefined) match {\ncase (true, false, true) | (false, false, true) => {\n\n@errorSummary(form)\n\n@subtitle(section)\n\n@heading(\"businessmatching.psr.number.title.post.submission\")\n\n@warningText(\nWarningText(\ncontent = Text(messages(\"businessmatching.psr.warning\"))\n)\n)\n\n<input type=\"hidden\" name=\"appliedFor\" value=true />\n\n<p class=\"govuk-body\">@messages(\"businessmatching.psr.number.hint\")</p>\n<p class=\"govuk-body\">@messages(\"businessmatching.psr.number.hint2\")</p>\n\n@inputText(\ninput = Input(\nlabel = Label(\nisPageHeading = false,\ncontent = Text(messages(\"businessmatching.updateservice.psr.number.lbl2\")),\nclasses = \"govuk-label govuk-label--m\"\n),\nname = \"regNumber\",\nid = \"regNumber\",\ninputmode = Some(\"numeric\"),\nclasses = \"govuk-!-width-one-quarter\"\n),\nfield = form(\"regNumber\")\n)\n}\ncase (false, true, true) | (true, true, true) | (_, _, false) => {\n\n\n@preparedErrorSummary\n\n@subtitle(section)\n\n@heading(\"businessmatching.psr.number.title\")\n\n@warningText(\nWarningText(\ncontent = Text(messages(\"businessmatching.psr.warning\"))\n)\n)\n\n@inputYesNo(\nRadios(\nhint = Some(\nHint(\ncontent = HtmlContent(supportingContent))\n),\nname = \"appliedFor\",\nitems = BusinessAppliedForPSRNumber.formValues(conditionalInput)\n)\n.withFormField(form(\"appliedFor\"))\n\n)\n}\n}\n\n@button()\n\n@maybeReturnLink\n}\n}\n","usages":["@formHelper(action = controllers.businessmatching.routes.PSRNumberController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/PsrNumberView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukWarningText#","variableName":"warningText","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.implicits._\n@import config.ApplicationConfig\n@import models.businessmatching.BusinessAppliedForPSRNumber\n@import components.{Button, ReturnLink, SectionSubtitle, Heading}\n@import components.forms.{InputText, InputYesNo, ErrorSummary}\n\n@this(\nformHelper: FormWithCSRF,\nlayout: Layout,\nsubtitle: SectionSubtitle,\ninputText: InputText,\ninputYesNo: InputYesNo,\nerrorSummary: ErrorSummary,\nheading: Heading,\nwarningText: GovukWarningText,\nbutton: Button,\nreturnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean, showReturnLink: Boolean = true, isPreSubmission: Boolean = true, isPsrDefined: Boolean = false)(implicit request: Request[_], messages: Messages, lang: Lang, appConfig: ApplicationConfig)\n\n@section = @{\nif(isPreSubmission) \"summary.businessmatching\" else \"summary.updateinformation\"\n}\n\n@title = @{\nif(isPreSubmission || !isPsrDefined) \"businessmatching.psr.number.title\" else \"businessmatching.psr.number.title.post.submission\"\n}\n\n@hasPsrNumberError = @{\nform.errors match {\ncase Nil => false\ncase x if x.head.key == \"regNumber\" => true\ncase _ => false\n}\n}\n\n@preparedErrorSummary = @{\nif(hasPsrNumberError) {\nerrorSummary(form, Some(Map(\"regNumber\" -> \"regNumber\")))\n} else {\nerrorSummary(form, Some(Map(\"appliedFor\" -> \"appliedFor-true\")))\n}\n}\n\n@maybeReturnLink = {\n@if(showReturnLink) {\n@returnLink(true)\n}\n}\n\n@conditionalInput = @{\ninputText(\ninput = Input(\nlabel = Label(\nisPageHeading = false,\ncontent = Text(messages(\"businessmatching.updateservice.psr.number.lbl\")),\nclasses = \"govuk-label\"\n),\nhint = None,\nname = \"regNumber\",\nid = \"regNumber\",\ninputmode = Some(\"numeric\"),\nclasses = \"govuk-!-width-one-quarter\"\n),\nfield = form(\"regNumber\")\n)\n}\n\n@supportingContent = {\n<div>\n <p class=\"govuk-hint\">@messages(\"businessmatching.psr.number.hint\")</p>\n <p class=\"govuk-hint\">@messages(\"businessmatching.psr.number.hint2\")</p>\n</div>\n}\n\n@layout(pageTitle = messages(title) + \" - \" + messages(section)) {\n\n@formHelper(action = controllers.businessmatching.routes.PSRNumberController.post(edit)) {\n\n@(edit, isPreSubmission, isPsrDefined) match {\ncase (true, false, true) | (false, false, true) => {\n\n@errorSummary(form)\n\n@subtitle(section)\n\n@heading(\"businessmatching.psr.number.title.post.submission\")\n\n@warningText(\nWarningText(\ncontent = Text(messages(\"businessmatching.psr.warning\"))\n)\n)\n\n<input type=\"hidden\" name=\"appliedFor\" value=true />\n\n<p class=\"govuk-body\">@messages(\"businessmatching.psr.number.hint\")</p>\n<p class=\"govuk-body\">@messages(\"businessmatching.psr.number.hint2\")</p>\n\n@inputText(\ninput = Input(\nlabel = Label(\nisPageHeading = false,\ncontent = Text(messages(\"businessmatching.updateservice.psr.number.lbl2\")),\nclasses = \"govuk-label govuk-label--m\"\n),\nname = \"regNumber\",\nid = \"regNumber\",\ninputmode = Some(\"numeric\"),\nclasses = \"govuk-!-width-one-quarter\"\n),\nfield = form(\"regNumber\")\n)\n}\ncase (false, true, true) | (true, true, true) | (_, _, false) => {\n\n\n@preparedErrorSummary\n\n@subtitle(section)\n\n@heading(\"businessmatching.psr.number.title\")\n\n@warningText(\nWarningText(\ncontent = Text(messages(\"businessmatching.psr.warning\"))\n)\n)\n\n@inputYesNo(\nRadios(\nhint = Some(\nHint(\ncontent = HtmlContent(supportingContent))\n),\nname = \"appliedFor\",\nitems = BusinessAppliedForPSRNumber.formValues(conditionalInput)\n)\n.withFormField(form(\"appliedFor\"))\n\n)\n}\n}\n\n@button()\n\n@maybeReturnLink\n}\n}\n","usages":["@warningText(\nWarningText(\ncontent = Text(messages(\"businessmatching.psr.warning\"))\n)\n)","@warningText(\nWarningText(\ncontent = Text(messages(\"businessmatching.psr.warning\"))\n)\n)"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/RegisterServicesView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.implicits._\n@import components.{Button, ReturnLink, SectionSubtitle, Heading}\n@import components.forms.{InputCheckbox, ErrorSummary}\n@import config.ApplicationConfig\n@import models.businessmatching.{BusinessActivities, BusinessActivity}\n\n@this(\n formHelper: FormWithCSRF,\n heading: Heading,\n layout: Layout,\n subtitle: SectionSubtitle,\n inputCheckbox: InputCheckbox,\n errorSummary: ErrorSummary,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean, existing: Seq[BusinessActivity], isPreSubmission: Boolean, showReturnLink: Boolean = true)(implicit request: Request[_], messages: Messages, lang: Lang, appConfig: ApplicationConfig)\n\n@title = @{\n if(isPreSubmission) \"businessmatching.registerservices.title\" else \"businessmatching.registerservices.other.title\"\n}\n\n@supportingContent = {\n <div class=\"govuk-inset-text govuk-!-margin-top-0\">\n <p>@messages(\"businessmatching.registerservices.existing\")</p>\n @{existing map { activity =>\n messages(s\"businessmatching.registerservices.servicename.lbl.${activity.value}\")\n } mkString(\", \")}\n </div>\n}\n\n@optionalLegend = @{\n if(isPreSubmission) {\n None\n } else {\n Some(\n Legend(\n content = HtmlContent(supportingContent),\n classes = if(!isPreSubmission) \"govuk-body\" else \"\"\n )\n )\n }\n}\n\n@maybeReturnLink = {\n @if(showReturnLink) {\n @returnLink(true)\n }\n}\n\n@layout(pageTitle = s\"\"\"${messages(title)} - ${messages(\"summary.businessmatching\")}\"\"\") {\n\n @formHelper(action = controllers.businessmatching.routes.RegisterServicesController.post(edit)) {\n\n @errorSummary(form, Some(Map(\"value\" -> \"value_1\")))\n\n @subtitle(\"summary.businessmatching\")\n\n @heading(title)\n\n @inputCheckbox(\n Checkboxes(\n fieldset = Some(Fieldset(legend = optionalLegend)),\n hint = Some(\n Hint(\n content = Text(messages(\"lbl.select.all\"))\n )\n ),\n name = \"businessActivities\",\n items = BusinessActivities.formValues(Some(existing), true)\n ).withFormField(form(\"value\"))\n )\n\n @button()\n\n @maybeReturnLink\n\n }\n\n}","usages":["@formHelper(action = controllers.businessmatching.routes.RegisterServicesController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/TypeOfBusinessView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.implicits._\n@import components.forms.{InputText, ErrorSummary}\n@import components.{Button, SectionSubtitle, ReturnLink}\n@import config.ApplicationConfig\n\n@this(\n formHelper: FormWithCSRF,\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n inputText: InputText,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(\n pageTitle = messages(\"businessmatching.typeofbusiness.title\") + \" - \" + messages(\"summary.businessmatching\")\n) {\n\n @errorSummary(form)\n\n @subtitle(\"summary.businessmatching\")\n\n @formHelper(action = controllers.businessmatching.routes.TypeOfBusinessController.post(edit)) {\n\n @inputText(\n input = Input(\n label = Label(\n isPageHeading = true,\n content = Text(messages(\"businessmatching.typeofbusiness.title\")),\n classes = \"govuk-label--xl\"\n ),\n hint = Some(\n Hint(\n content = Text(messages(\"businessmatching.typeofbusiness.lbl.hint\"))\n )\n ),\n name = \"typeOfBusiness\",\n id = \"typeOfBusiness\"\n ),\n field = form(\"typeOfBusiness\")\n )\n\n @button()\n\n @returnLink(true)\n }\n}\n","usages":["@formHelper(action = controllers.businessmatching.routes.TypeOfBusinessController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/updateservice/add/AddMoreActivitiesView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import uk.gov.hmrc.hmrcfrontend.views.config.HmrcYesNoRadioItems\n@import views.html.components.forms.{ErrorSummary, InputYesNo}\n@import views.html.components.{SectionSubtitle, Button}\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n formHelper: FormWithCSRF,\n inputYesNo: InputYesNo,\n button: Button\n)\n\n@(form: Form[_])(implicit request: Request[_], messages: Messages)\n\n@layout(messages(\"businessmatching.updateservice.addmoreactivities.title\") + \" - \" + messages(\"summary.updateservice\")) {\n\n @errorSummary(form)\n\n @subtitle(\"summary.updateservice\")\n\n @formHelper(controllers.businessmatching.updateservice.add.routes.AddMoreBusinessTypesController.post()) {\n\n @inputYesNo(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessmatching.updateservice.addmoreactivities.heading\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n name = \"addmoreactivities\",\n items = HmrcYesNoRadioItems(),\n classes = \"govuk-radios govuk-radios--inline\"\n ).withFormField(form(\"addmoreactivities\"))\n )\n\n @button(\"button.continue\", \"addmoreactivities-submit\")\n }\n}\n","usages":["@formHelper(controllers.businessmatching.updateservice.add.routes.AddMoreBusinessTypesController.post())"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/updateservice/add/BusinessAppliedForPSRNumberView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.implicits._\n@import uk.gov.hmrc.hmrcfrontend.views.html.components.implicits._\n@import config.ApplicationConfig\n@import models.businessmatching.BusinessAppliedForPSRNumber\n@import components.{SectionSubtitle, Button, Heading}\n@import components.forms.{InputText, InputYesNo, ErrorSummary}\n@import views.ViewUtils._\n@import utils.HtmlElementHelpers._\n\n@this(\n formHelper: FormWithCSRF,\n subtitle: SectionSubtitle,\n heading: Heading,\n layout: Layout,\n inputText: InputText,\n inputYesNo: InputYesNo,\n warningText: GovukWarningText,\n errorSummary: ErrorSummary,\n button: Button\n)\n\n@(form: Form[_], edit: Boolean)(implicit request: Request[_], messages: Messages, lang: Lang, appConfig: ApplicationConfig)\n\n@conditionalInput = @{\n inputText(\n input = Input(\n label = Label(\n isPageHeading = false,\n content = Text(messages(\"businessmatching.updateservice.psr.number.lbl\")),\n classes = \"govuk-label\"\n ),\n hint = None,\n name = \"regNumber\",\n id = \"regNumber\",\n inputmode = Some(\"numeric\"),\n classes = \"govuk-!-width-one-quarter\"\n ),\n field = form(\"regNumber\")\n )\n}\n\n@supportingContent = {\n<div>\n <p class=\"govuk-hint\">@messages(\"businessmatching.psr.number.hint\")</p>\n <p class=\"govuk-hint\">@messages(\"businessmatching.psr.number.hint2\")</p>\n</div>\n}\n\n@layout(\n pageTitle = messages(\"businessmatching.psr.number.title\") + \" - \" + messages(\"summary.updateservice\")\n) {\n\n @formHelper(action = controllers.businessmatching.updateservice.add.routes.BusinessAppliedForPSRNumberController.post(edit)) {\n\n @errorSummary(form)\n\n @subtitle(\"summary.updateservice\")\n\n @heading(\"businessmatching.psr.number.title\")\n\n @warningText(\n WarningText(\n content = Text(messages(\"businessmatching.psr.warning\"))\n )\n )\n\n @inputYesNo(\n Radios(\n hint = Some(\n Hint(\n content = HtmlContent(supportingContent))\n ),\n name = \"appliedFor\",\n items = BusinessAppliedForPSRNumber.formValues(conditionalInput)\n )\n .withFormField(form(\"appliedFor\"))\n )\n\n @button(\"button.continue\", \"appliedspsr-submit\")\n }\n\n}\n\n","usages":["@formHelper(action = controllers.businessmatching.updateservice.add.routes.BusinessAppliedForPSRNumberController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/updateservice/add/BusinessAppliedForPSRNumberView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukWarningText#","variableName":"warningText","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.implicits._\n@import uk.gov.hmrc.hmrcfrontend.views.html.components.implicits._\n@import config.ApplicationConfig\n@import models.businessmatching.BusinessAppliedForPSRNumber\n@import components.{SectionSubtitle, Button, Heading}\n@import components.forms.{InputText, InputYesNo, ErrorSummary}\n@import views.ViewUtils._\n@import utils.HtmlElementHelpers._\n\n@this(\n formHelper: FormWithCSRF,\n subtitle: SectionSubtitle,\n heading: Heading,\n layout: Layout,\n inputText: InputText,\n inputYesNo: InputYesNo,\n warningText: GovukWarningText,\n errorSummary: ErrorSummary,\n button: Button\n)\n\n@(form: Form[_], edit: Boolean)(implicit request: Request[_], messages: Messages, lang: Lang, appConfig: ApplicationConfig)\n\n@conditionalInput = @{\n inputText(\n input = Input(\n label = Label(\n isPageHeading = false,\n content = Text(messages(\"businessmatching.updateservice.psr.number.lbl\")),\n classes = \"govuk-label\"\n ),\n hint = None,\n name = \"regNumber\",\n id = \"regNumber\",\n inputmode = Some(\"numeric\"),\n classes = \"govuk-!-width-one-quarter\"\n ),\n field = form(\"regNumber\")\n )\n}\n\n@supportingContent = {\n<div>\n <p class=\"govuk-hint\">@messages(\"businessmatching.psr.number.hint\")</p>\n <p class=\"govuk-hint\">@messages(\"businessmatching.psr.number.hint2\")</p>\n</div>\n}\n\n@layout(\n pageTitle = messages(\"businessmatching.psr.number.title\") + \" - \" + messages(\"summary.updateservice\")\n) {\n\n @formHelper(action = controllers.businessmatching.updateservice.add.routes.BusinessAppliedForPSRNumberController.post(edit)) {\n\n @errorSummary(form)\n\n @subtitle(\"summary.updateservice\")\n\n @heading(\"businessmatching.psr.number.title\")\n\n @warningText(\n WarningText(\n content = Text(messages(\"businessmatching.psr.warning\"))\n )\n )\n\n @inputYesNo(\n Radios(\n hint = Some(\n Hint(\n content = HtmlContent(supportingContent))\n ),\n name = \"appliedFor\",\n items = BusinessAppliedForPSRNumber.formValues(conditionalInput)\n )\n .withFormField(form(\"appliedFor\"))\n )\n\n @button(\"button.continue\", \"appliedspsr-submit\")\n }\n\n}\n\n","usages":["@warningText(\n WarningText(\n content = Text(messages(\"businessmatching.psr.warning\"))\n )\n )"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/updateservice/add/CannotAddServicesView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import views.html.components.{SectionSubtitle, Heading, Button}\n\n@this(\n layout: Layout,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n button: Button\n)\n\n@()(implicit request: Request[_], messages: Messages)\n\n@layout(messages(\"businessmatching.updateservice.nopsr.cannotcontinuewiththeapplication.title\") + \" - \" + messages(\"summary.updateservice\")) {\n\n @subtitle(\"summary.updateservice\")\n\n @heading(\"businessmatching.updateservice.nopsr.cannotcontinuewiththeapplication.heading\")\n\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.nopsr.cannotcontinuewiththeapplication.requiredinfo.2\")</p>\n\n @formHelper(controllers.businessmatching.updateservice.add.routes.NoPsrController.post()) {\n @button(\n \"businessmatching.updateservice.nopsr.cannotcontinuewiththeapplication.button.text\",\n \"cannot-continue-with-application\"\n )\n }\n}\n","usages":["@formHelper(controllers.businessmatching.updateservice.add.routes.NoPsrController.post())"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/updateservice/add/MsbSubSectorsView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.implicits._\n@import components.{Button, ReturnLink, SectionSubtitle}\n@import components.forms.{InputCheckbox, ErrorSummary}\n@import config.ApplicationConfig\n@import models.businessmatching.BusinessMatchingMsbServices\n\n@this(\n formHelper: FormWithCSRF,\n layout: Layout,\n subtitle: SectionSubtitle,\n inputCheckbox: InputCheckbox,\n errorSummary: ErrorSummary,\n button: Button\n)\n\n@(form: Form[_], edit: Boolean, isFxEnabled: Boolean = false)(implicit request: Request[_], messages: Messages, lang: Lang, appConfig: ApplicationConfig)\n\n@layout(\n pageTitle = messages(\"businessmatching.updateservice.msb.services.title\") + \" - \" + messages(\"summary.updateservice\")\n) {\n\n @formHelper(action = controllers.businessmatching.updateservice.add.routes.SubSectorsController.post(edit)) {\n\n @errorSummary(form, Some(Map(\"value\" -> \"value_3\")))\n\n @subtitle(\"summary.updateservice\")\n\n @inputCheckbox(\n Checkboxes(\n fieldset = Some(Fieldset(\n legend = Some(\n Legend(\n content = Text(messages(\"businessmatching.updateservice.msb.services.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n )\n )\n )),\n hint = Some(\n Hint(\n content = Text(messages(\"businessmatching.updateservice.msb.services.list.heading\"))\n )\n ),\n name = \"msbServices\",\n items = BusinessMatchingMsbServices.formValues(isFxEnabled)\n ).withFormField(form(\"value\"))\n )\n\n @button(\"button.continue\", \"msbsubservice-submit\")\n }\n}\n","usages":["@formHelper(action = controllers.businessmatching.updateservice.add.routes.SubSectorsController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/updateservice/add/NewServiceInformationView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import models.businessmatching.BusinessMatchingMsbService\n@import models.businessmatching.BusinessActivity\n@import models.businessmatching.BusinessActivity._\n@import views.html.components.{SectionSubtitle, Heading, Button}\n\n@this(\n layout: Layout,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n button: Button\n)\n\n@(activities: Set[BusinessActivity], hideSupervisionDetails: Boolean, subsectors: Set[BusinessMatchingMsbService], isTdiOrBpspPresent: Boolean = false, isAspOrTcspPresent: Boolean = false)(implicit request: Request[_], messages: Messages)\n\n@layout(messages(\"businessmatching.updateservice.newserviceinformation.title\") + \" - \" + messages(\"summary.updateservice\")){\n\n @subtitle(\"summary.updateservice\")\n\n @heading(\"businessmatching.updateservice.newserviceinformation.heading\")\n\n @if(activities.size == 1) {\n @activities match {\n case list if list.contains(AccountancyServices) => {\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.newserviceinformation.info.2\")</p>\n <ul class=\"govuk-list govuk-list--bullet\">\n @activities.toList.map { ba =>\n <li>@ba.getMessage(true)</li>\n }\n <li>@messages(\"businessmatching.updateservice.newserviceinformation.info.supervision\")</li>\n </ul>\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.newserviceinformation.info.6\", activities.head.getMessage(true))</p>\n }\n case list if list.contains(TrustAndCompanyServices) => {\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.newserviceinformation.info.2\")</p>\n <ul class=\"govuk-list govuk-list--bullet\">\n @activities.toList.map { ba =>\n <li>@ba.getMessage(true)</li>\n }\n <li>@messages(\"businessmatching.updateservice.newserviceinformation.info.supervision\")</li>\n </ul>\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.newserviceinformation.info.6\", activities.head.getMessage(true))</p>\n }\n case list if list.contains(MoneyServiceBusiness) && subsectors.size == 1 => {\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.newserviceinformation.info.1\", activities.head.getMessage(true))</p>\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.newserviceinformation.info.6.msb.single\")</p>\n }\n case list if list.contains(MoneyServiceBusiness) && subsectors.size > 1 => {\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.newserviceinformation.info.1\", activities.head.getMessage(true))</p>\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.newserviceinformation.info.6.msb.single\")</p>\n }\n case list if isTdiOrBpspPresent => {\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.newserviceinformation.info.6\", activities.head.getMessage(true))</p>\n }\n case list if isTdiOrBpspPresent => {\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.newserviceinformation.info.6\", activities.head.getMessage(true))</p>\n }\n case _ => {\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.newserviceinformation.info.1\", activities.head.getMessage(true))</p>\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.newserviceinformation.info.6\", activities.head.getMessage(true))</p>\n }\n }\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.newserviceinformation.info.7\")</p>\n }\n\n @if(activities.size > 1) {\n @activities match {\n case list if isTdiOrBpspPresent && isAspOrTcspPresent && list.diff(Set(BillPaymentServices, TelephonePaymentService)).nonEmpty => {\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.newserviceinformation.info.2\")</p>\n <ul class=\"govuk-list govuk-list--bullet\">\n @activities.diff(Set(BillPaymentServices, TelephonePaymentService)).toList.map { ba =>\n <li>@ba.getMessage(true)</li>\n }\n @if(isAspOrTcspPresent && !hideSupervisionDetails) {\n <li>@messages(\"businessmatching.updateservice.newserviceinformation.info.supervision\")</li>\n }\n </ul>\n }\n case list if isTdiOrBpspPresent && list.diff(Set(BillPaymentServices, TelephonePaymentService)).size == 1 => {\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.newserviceinformation.info.1\",\n list.diff(Set(BillPaymentServices, TelephonePaymentService)).map(_.getMessage(true)).mkString(\" \"))</p>\n }\n case list if isTdiOrBpspPresent => {\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.newserviceinformation.info.2\")</p>\n <ul class=\"govuk-list govuk-list--bullet\">\n @activities.diff(Set(BillPaymentServices, TelephonePaymentService)).toList.map { ba =>\n <li>@ba.getMessage(true)</li>\n }\n @if(isAspOrTcspPresent && !hideSupervisionDetails) {\n <li>@messages(\"businessmatching.updateservice.newserviceinformation.info.supervision\")</li>\n }\n </ul>\n }\n case _ => {\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.newserviceinformation.info.2\")</p>\n <ul class=\"govuk-list govuk-list--bullet\">\n @activities.toList.map { ba =>\n <li>@ba.getMessage(true)</li>\n }\n @if(isAspOrTcspPresent && !hideSupervisionDetails) {\n <li>@messages(\"businessmatching.updateservice.newserviceinformation.info.supervision\")</li>\n }\n </ul>\n }\n }\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.newserviceinformation.info.3\")</p>\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.newserviceinformation.info.4\")</p>\n }\n\n @formHelper(controllers.businessmatching.updateservice.add.routes.NeedMoreInformationController.post()) {\n @button(\"Continue\", \"newserviceinfo-submit\")\n }\n}","usages":["@formHelper(controllers.businessmatching.updateservice.add.routes.NeedMoreInformationController.post())"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/updateservice/add/SelectActivitiesView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import models.businessmatching.BusinessActivity\n@import views.html.components.forms.ErrorSummary\n@import views.html.components.{SectionSubtitle, Button}\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n formHelper: FormWithCSRF,\n inputRadios: GovukRadios,\n button: Button\n)\n\n@(form: Form[_], edit: Boolean, activityValues: Seq[BusinessActivity])(implicit request: Request[_], messages: Messages)\n\n@radioItems = @{\n activityValues.map { activity =>\n RadioItem(\n Text(messages(s\"businessmatching.registerservices.servicename.lbl.${activity.value}\")),\n id = Some(activity.toString),\n value = Some(activity.toString),\n hint = Some(Hint(content = Text(messages(s\"businessmatching.registerservices.servicename.details.${activity.value}\"))))\n )\n }\n}\n\n@layout(messages(\"businessmatching.updateservice.selectactivities.title\") + \" - \" + messages(\"summary.updateservice\")) {\n\n @errorSummary(form, Some(Map(\"businessActivities\" -> activityValues.minBy(_.getMessage()).toString)))\n\n @subtitle(\"summary.updateservice\")\n\n @formHelper(controllers.businessmatching.updateservice.add.routes.SelectBusinessTypeController.post(edit)) {\n\n @inputRadios(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessmatching.updateservice.selectactivities.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n hint = Some(Hint(content = Text(messages(\"businessmatching.updateservice.selectactivities.hint\")))),\n name = \"businessActivities\",\n items = radioItems,\n classes = \"govuk-radios\"\n ).withFormField(form(\"businessActivities\"))\n )\n\n @button(\"button.continue\", \"selectactivities-submit\")\n }\n}","usages":["@formHelper(controllers.businessmatching.updateservice.add.routes.SelectBusinessTypeController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/updateservice/add/SelectActivitiesView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukRadios#","variableName":"inputRadios","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import models.businessmatching.BusinessActivity\n@import views.html.components.forms.ErrorSummary\n@import views.html.components.{SectionSubtitle, Button}\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n formHelper: FormWithCSRF,\n inputRadios: GovukRadios,\n button: Button\n)\n\n@(form: Form[_], edit: Boolean, activityValues: Seq[BusinessActivity])(implicit request: Request[_], messages: Messages)\n\n@radioItems = @{\n activityValues.map { activity =>\n RadioItem(\n Text(messages(s\"businessmatching.registerservices.servicename.lbl.${activity.value}\")),\n id = Some(activity.toString),\n value = Some(activity.toString),\n hint = Some(Hint(content = Text(messages(s\"businessmatching.registerservices.servicename.details.${activity.value}\"))))\n )\n }\n}\n\n@layout(messages(\"businessmatching.updateservice.selectactivities.title\") + \" - \" + messages(\"summary.updateservice\")) {\n\n @errorSummary(form, Some(Map(\"businessActivities\" -> activityValues.minBy(_.getMessage()).toString)))\n\n @subtitle(\"summary.updateservice\")\n\n @formHelper(controllers.businessmatching.updateservice.add.routes.SelectBusinessTypeController.post(edit)) {\n\n @inputRadios(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessmatching.updateservice.selectactivities.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n hint = Some(Hint(content = Text(messages(\"businessmatching.updateservice.selectactivities.hint\")))),\n name = \"businessActivities\",\n items = radioItems,\n classes = \"govuk-radios\"\n ).withFormField(form(\"businessActivities\"))\n )\n\n @button(\"button.continue\", \"selectactivities-submit\")\n }\n}","usages":["@inputRadios(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessmatching.updateservice.selectactivities.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n hint = Some(Hint(content = Text(messages(\"businessmatching.updateservice.selectactivities.hint\")))),\n name = \"businessActivities\",\n items = radioItems,\n classes = \"govuk-radios\"\n ).withFormField(form(\"businessActivities\"))\n )"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/updateservice/add/UpdateServicesSummaryView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import controllers.businessmatching.updateservice.add.routes\n@import models.flowmanagement.AddBusinessTypeFlowModel\n@import models.businessmatching.BusinessActivity\n@import models.businessmatching.BusinessActivity.MoneyServiceBusiness\n@import models.businessmatching.BusinessMatchingMsbService.TransmittingMoney\n@import models.businessmatching.{BusinessAppliedForPSRNumberNo, BusinessAppliedForPSRNumberYes}\n@import views.html.components.{SectionSubtitle, Heading, Button}\n\n@this(\n layout: Layout,\n subtitle: SectionSubtitle,\n heading: Heading,\n govukSummaryList: GovukSummaryList,\n formHelper: FormWithCSRF,\n button: Button\n)\n\n@(model: AddBusinessTypeFlowModel)(implicit messages: Messages, request: Request[_])\n\n@activityRow(activity: BusinessActivity) = @{\n SummaryListRow(\n Key(Text(messages(\"businessmatching.updateservice.selectactivities.title\"))),\n Value(Text(activity.getMessage())),\n actions = Some(Actions(\n items = Seq(ActionItem(\n routes.SelectBusinessTypeController.get(edit = true).url,\n Text(messages(\"button.edit\")),\n attributes = Map(\"id\" -> \"selectactivities-edit\")\n ))\n ))\n )\n}\n\n@psrRow(bool: Boolean) = @{\n SummaryListRow(\n Key(Text(messages(\"businessmatching.psr.number.title\"))),\n Value(Text(\n if(bool) {\n messages(\"lbl.yes\")\n } else {\n messages(\"lbl.no\")\n }\n )),\n actions = Some(Actions(\n items = Seq(ActionItem(\n routes.BusinessAppliedForPSRNumberController.get(true).url,\n Text(messages(\"button.edit\")),\n attributes = Map(\"id\" -> \"psr-edit\")\n ))\n ))\n )\n}\n\n@layout(s\"${messages(\"title.cya\")} - ${messages(\"summary.updateservice\")}\", showBackLink = false) {\n\n @subtitle(\"summary.updateservice\")\n\n @heading(\"title.cya\")\n\n @govukSummaryList(\n SummaryList(\n model.activity match {\n case Some(activity) if activity == MoneyServiceBusiness =>\n model.subSectors.map { services =>\n val msb = Seq(\n activityRow(activity),\n SummaryListRow(\n Key(Text(messages(\"businessmatching.updateservice.msb.services.title\"))),\n if(services.msbServices.size == 1) {\n Value(Text(services.msbServices.head.getMessage))\n } else {\n Value(\n HtmlContent(\n Html(\n \"<ul id=\\\"msb-service\\\" class=\\\"govuk-list govuk-list--bullet\\\">\" +\n services.msbServices.toList.sortBy(_.getMessage).map { x =>\n s\"<li>${messages(s\"businessmatching.services.list.lbl.${x.value}\")}</li>\"\n }.sorted.mkString +\n \"</ul>\"\n )\n )\n )\n },\n actions = Some(Actions(\n items = Seq(ActionItem(\n routes.SubSectorsController.get(true).url,\n Text(messages(\"button.edit\")),\n attributes = Map(\"id\" -> \"msbservices-edit\")\n ))\n ))\n )\n )\n\n val psr = if(services.msbServices.contains(TransmittingMoney)) {\n model.businessAppliedForPSRNumber match {\n case Some(BusinessAppliedForPSRNumberYes(psr)) => Seq(\n psrRow(true),\n SummaryListRow(\n Key(Text(messages(\"businessmatching.psr.number.lbl\"))),\n Value(Text(psr)),\n actions = Some(Actions(\n items = Seq(ActionItem(\n routes.BusinessAppliedForPSRNumberController.get(true).url,\n Text(messages(\"button.edit\")),\n attributes = Map(\"id\" -> \"psr-answer-edit\")\n ))\n ))\n )\n )\n case Some(BusinessAppliedForPSRNumberNo) => Seq(psrRow(false))\n case _ => Seq.empty\n }\n } else Seq.empty\n\n msb ++ psr\n } getOrElse Seq.empty\n case Some(activity) => Seq(activityRow(activity))\n case _ => Seq.empty\n }\n )\n )\n\n @formHelper(controllers.businessmatching.updateservice.add.routes.AddBusinessTypeSummaryController.post()) {\n @button(\"button.checkyouranswers.acceptandcomplete\", \"updatesummary-submit\")\n }\n}\n","usages":["@formHelper(controllers.businessmatching.updateservice.add.routes.AddBusinessTypeSummaryController.post())"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/updateservice/add/UpdateServicesSummaryView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukSummaryList#","variableName":"govukSummaryList","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import controllers.businessmatching.updateservice.add.routes\n@import models.flowmanagement.AddBusinessTypeFlowModel\n@import models.businessmatching.BusinessActivity\n@import models.businessmatching.BusinessActivity.MoneyServiceBusiness\n@import models.businessmatching.BusinessMatchingMsbService.TransmittingMoney\n@import models.businessmatching.{BusinessAppliedForPSRNumberNo, BusinessAppliedForPSRNumberYes}\n@import views.html.components.{SectionSubtitle, Heading, Button}\n\n@this(\n layout: Layout,\n subtitle: SectionSubtitle,\n heading: Heading,\n govukSummaryList: GovukSummaryList,\n formHelper: FormWithCSRF,\n button: Button\n)\n\n@(model: AddBusinessTypeFlowModel)(implicit messages: Messages, request: Request[_])\n\n@activityRow(activity: BusinessActivity) = @{\n SummaryListRow(\n Key(Text(messages(\"businessmatching.updateservice.selectactivities.title\"))),\n Value(Text(activity.getMessage())),\n actions = Some(Actions(\n items = Seq(ActionItem(\n routes.SelectBusinessTypeController.get(edit = true).url,\n Text(messages(\"button.edit\")),\n attributes = Map(\"id\" -> \"selectactivities-edit\")\n ))\n ))\n )\n}\n\n@psrRow(bool: Boolean) = @{\n SummaryListRow(\n Key(Text(messages(\"businessmatching.psr.number.title\"))),\n Value(Text(\n if(bool) {\n messages(\"lbl.yes\")\n } else {\n messages(\"lbl.no\")\n }\n )),\n actions = Some(Actions(\n items = Seq(ActionItem(\n routes.BusinessAppliedForPSRNumberController.get(true).url,\n Text(messages(\"button.edit\")),\n attributes = Map(\"id\" -> \"psr-edit\")\n ))\n ))\n )\n}\n\n@layout(s\"${messages(\"title.cya\")} - ${messages(\"summary.updateservice\")}\", showBackLink = false) {\n\n @subtitle(\"summary.updateservice\")\n\n @heading(\"title.cya\")\n\n @govukSummaryList(\n SummaryList(\n model.activity match {\n case Some(activity) if activity == MoneyServiceBusiness =>\n model.subSectors.map { services =>\n val msb = Seq(\n activityRow(activity),\n SummaryListRow(\n Key(Text(messages(\"businessmatching.updateservice.msb.services.title\"))),\n if(services.msbServices.size == 1) {\n Value(Text(services.msbServices.head.getMessage))\n } else {\n Value(\n HtmlContent(\n Html(\n \"<ul id=\\\"msb-service\\\" class=\\\"govuk-list govuk-list--bullet\\\">\" +\n services.msbServices.toList.sortBy(_.getMessage).map { x =>\n s\"<li>${messages(s\"businessmatching.services.list.lbl.${x.value}\")}</li>\"\n }.sorted.mkString +\n \"</ul>\"\n )\n )\n )\n },\n actions = Some(Actions(\n items = Seq(ActionItem(\n routes.SubSectorsController.get(true).url,\n Text(messages(\"button.edit\")),\n attributes = Map(\"id\" -> \"msbservices-edit\")\n ))\n ))\n )\n )\n\n val psr = if(services.msbServices.contains(TransmittingMoney)) {\n model.businessAppliedForPSRNumber match {\n case Some(BusinessAppliedForPSRNumberYes(psr)) => Seq(\n psrRow(true),\n SummaryListRow(\n Key(Text(messages(\"businessmatching.psr.number.lbl\"))),\n Value(Text(psr)),\n actions = Some(Actions(\n items = Seq(ActionItem(\n routes.BusinessAppliedForPSRNumberController.get(true).url,\n Text(messages(\"button.edit\")),\n attributes = Map(\"id\" -> \"psr-answer-edit\")\n ))\n ))\n )\n )\n case Some(BusinessAppliedForPSRNumberNo) => Seq(psrRow(false))\n case _ => Seq.empty\n }\n } else Seq.empty\n\n msb ++ psr\n } getOrElse Seq.empty\n case Some(activity) => Seq(activityRow(activity))\n case _ => Seq.empty\n }\n )\n )\n\n @formHelper(controllers.businessmatching.updateservice.add.routes.AddBusinessTypeSummaryController.post()) {\n @button(\"button.checkyouranswers.acceptandcomplete\", \"updatesummary-submit\")\n }\n}\n","usages":["@govukSummaryList(\n SummaryList(\n model.activity match {\n case Some(activity) if activity == MoneyServiceBusiness =>\n model.subSectors.map { services =>\n val msb = Seq(\n activityRow(activity),\n SummaryListRow(\n Key(Text(messages(\"businessmatching.updateservice.msb.services.title\"))),\n if(services.msbServices.size == 1) {\n Value(Text(services.msbServices.head.getMessage))\n } else {\n Value(\n HtmlContent(\n Html(\n \"<ul id=\\\"msb-service\\\" class=\\\"govuk-list govuk-list--bullet\\\">\" +\n services.msbServices.toList.sortBy(_.getMessage).map { x =>\n s\"<li>${messages(s\"businessmatching.services.list.lbl.${x.value}\")}</li>\"\n }.sorted.mkString +\n \"</ul>\"\n )\n )\n )\n },\n actions = Some(Actions(\n items = Seq(ActionItem(\n routes.SubSectorsController.get(true).url,\n Text(messages(\"button.edit\")),\n attributes = Map(\"id\" -> \"msbservices-edit\")\n ))\n ))\n )\n )\n\n val psr = if(services.msbServices.contains(TransmittingMoney)) {\n model.businessAppliedForPSRNumber match {\n case Some(BusinessAppliedForPSRNumberYes(psr)) => Seq(\n psrRow(true),\n SummaryListRow(\n Key(Text(messages(\"businessmatching.psr.number.lbl\"))),\n Value(Text(psr)),\n actions = Some(Actions(\n items = Seq(ActionItem(\n routes.BusinessAppliedForPSRNumberController.get(true).url,\n Text(messages(\"button.edit\")),\n attributes = Map(\"id\" -> \"psr-answer-edit\")\n ))\n ))\n )\n )\n case Some(BusinessAppliedForPSRNumberNo) => Seq(psrRow(false))\n case _ => Seq.empty\n }\n } else Seq.empty\n\n msb ++ psr\n } getOrElse Seq.empty\n case Some(activity) => Seq(activityRow(activity))\n case _ => Seq.empty\n }\n )\n )"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/updateservice/ChangeServicesView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukRadios#","variableName":"radios","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import views.html.components.{SectionSubtitle, Button, ReturnLink}\n@import views.html.components.forms.ErrorSummary\n\n@this(\n layout: Layout,\n subtitle: SectionSubtitle,\n errorSummary: ErrorSummary,\n formHelper: FormWithCSRF,\n radios: GovukRadios,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], allowAdd: Boolean)(implicit request: Request[_], messages: Messages)\n\n@radioItems = @{\n\n val remove = RadioItem(\n content = Text(messages(\"businessmatching.updateservice.changeservices.choice.remove\")),\n value = Some(\"remove\"),\n id = Some(s\"remove\")\n )\n\n if(allowAdd) {\n Seq(\n RadioItem(\n content = Text(messages(\"businessmatching.updateservice.changeservices.choice.add\")),\n value = Some(\"add\"),\n id = Some(s\"add\")\n ),\n remove\n )\n } else Seq(remove)\n\n}\n\n@errorId = @{\n if(allowAdd) \"add\" else \"remove\"\n}\n\n@layout(messages(\"businessmatching.updateservice.changeservices.title\") + \" - \" + messages(\"summary.updateservice\")) {\n\n @errorSummary(form, Some(Map(\"changeServices\" -> errorId)))\n\n @subtitle(\"summary.updateservice\")\n\n @formHelper(controllers.businessmatching.updateservice.routes.ChangeBusinessTypesController.post()) {\n\n @radios(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessmatching.updateservice.changeservices.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n name = \"changeServices\",\n items = radioItems,\n classes = \"govuk-radios\"\n ).withFormField(form(\"changeServices\"))\n )\n\n @button(\"button.continue\", \"button-continue\")\n\n @returnLink(allowAdd)\n }\n}","usages":["@radios(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessmatching.updateservice.changeservices.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n name = \"changeServices\",\n items = radioItems,\n classes = \"govuk-radios\"\n ).withFormField(form(\"changeServices\"))\n )"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/updateservice/ChangeServicesView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import views.html.components.{SectionSubtitle, Button, ReturnLink}\n@import views.html.components.forms.ErrorSummary\n\n@this(\n layout: Layout,\n subtitle: SectionSubtitle,\n errorSummary: ErrorSummary,\n formHelper: FormWithCSRF,\n radios: GovukRadios,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], allowAdd: Boolean)(implicit request: Request[_], messages: Messages)\n\n@radioItems = @{\n\n val remove = RadioItem(\n content = Text(messages(\"businessmatching.updateservice.changeservices.choice.remove\")),\n value = Some(\"remove\"),\n id = Some(s\"remove\")\n )\n\n if(allowAdd) {\n Seq(\n RadioItem(\n content = Text(messages(\"businessmatching.updateservice.changeservices.choice.add\")),\n value = Some(\"add\"),\n id = Some(s\"add\")\n ),\n remove\n )\n } else Seq(remove)\n\n}\n\n@errorId = @{\n if(allowAdd) \"add\" else \"remove\"\n}\n\n@layout(messages(\"businessmatching.updateservice.changeservices.title\") + \" - \" + messages(\"summary.updateservice\")) {\n\n @errorSummary(form, Some(Map(\"changeServices\" -> errorId)))\n\n @subtitle(\"summary.updateservice\")\n\n @formHelper(controllers.businessmatching.updateservice.routes.ChangeBusinessTypesController.post()) {\n\n @radios(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"businessmatching.updateservice.changeservices.title\")),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n name = \"changeServices\",\n items = radioItems,\n classes = \"govuk-radios\"\n ).withFormField(form(\"changeServices\"))\n )\n\n @button(\"button.continue\", \"button-continue\")\n\n @returnLink(allowAdd)\n }\n}","usages":["@formHelper(controllers.businessmatching.updateservice.routes.ChangeBusinessTypesController.post())"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/updateservice/remove/NeedMoreInformationView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import models.businessmatching.BusinessActivity\n@import models.businessmatching.BusinessActivity._\n@import views.html.components.{SectionSubtitle, Heading, Button}\n\n@this(\n layout: Layout,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n button: Button\n)\n\n@(activities: Set[BusinessActivity])(implicit request: Request[_], messages: Messages)\n\n@layout(messages(\"businessmatching.updateservice.updateotherinformation.title\") + \" - \" + messages(\"summary.updateservice\")) {\n\n @subtitle(\"summary.updateservice\")\n\n @heading(\"businessmatching.updateservice.updateotherinformation.heading\")\n\n @activities match {\n case list if list.contains(AccountancyServices) && (list.size == 1) => {\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.updateotherinformation.information.1\", list.head.getMessage(true))</p>\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.updateotherinformation.information.2\")</p>\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.updateotherinformation.information.3\")</p>\n }\n\n case list if list.contains(AccountancyServices) && (list.size > 1) => {\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.updateotherinformation.information.0\")</p>\n <ul class=\"govuk-list govuk-list--bullet\">\n @list.map { ba =>\n <li>@ba.getMessage(true)</li>\n }\n </ul>\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.updateotherinformation.information.2\")</p>\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.updateotherinformation.information.3.multiple.services\")</p>\n }\n\n case list if !list.contains(AccountancyServices) && (list.size == 1) => {\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.updateotherinformation.information.1\", list.head.getMessage(true))</p>\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.updateotherinformation.information.3\")</p>\n }\n\n case list if !list.contains(AccountancyServices) && (list.size > 1) => {\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.updateotherinformation.information.0\")</p>\n <ul class=\"govuk-list govuk-list--bullet\">\n @list.map { ba =>\n <li>@ba.getMessage(true)</li>\n }\n </ul>\n <p class=\"govuk-body\">@messages(\"businessmatching.updateservice.updateotherinformation.information.3.multiple.services\")</p>\n }\n }\n\n @formHelper(controllers.businessmatching.updateservice.add.routes.NeedMoreInformationController.post()) {\n @button(\"button.continue\", \"removeserviceinfo-submit\")\n }\n}","usages":["@formHelper(controllers.businessmatching.updateservice.add.routes.NeedMoreInformationController.post())"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/updateservice/remove/RemoveActivitiesSummaryView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import models.flowmanagement.RemoveBusinessTypeFlowModel\n@import controllers.businessmatching.updateservice.remove.routes\n@import utils.DateHelper\n@import views.html.components.{SectionSubtitle, Heading, Button}\n\n@this(\n layout: Layout,\n subtitle: SectionSubtitle,\n heading: Heading,\n govukSummaryList: GovukSummaryList,\n formHelper: FormWithCSRF,\n button: Button\n)\n\n@(model: RemoveBusinessTypeFlowModel)(implicit messages: Messages, request: Request[_])\n\n@layout(s\"${messages(\"title.cya\")} - ${messages(\"summary.updateinformation\")}\", showBackLink = false) {\n\n @subtitle(\"summary.updateinformation\")\n\n @heading(\"title.cya\")\n\n @govukSummaryList(\n SummaryList(\n Seq(\n model.activitiesToRemove.map { activities =>\n SummaryListRow(\n Key(Text(messages(\"businessmatching.updateservice.removeactivities.heading\"))),\n if(activities.size == 1) {\n Value(Text(activities.head.getMessage()))\n } else {\n Value(\n HtmlContent(\n Html(\n \"<ul class=\\\"govuk-list govuk-list--bullet\\\">\" +\n activities.toList.map { x =>\n s\"<li>${x.getMessage()}</li>\"\n }.sorted.mkString +\n \"</ul>\"\n )\n )\n )\n },\n actions = Some(Actions(\n items = Seq(ActionItem(\n routes.RemoveBusinessTypesController.get(edit = true).url,\n Text(messages(\"button.edit\")),\n attributes = Map(\"id\" -> \"removeactivities-edit\")\n ))\n ))\n )\n },\n model.dateOfChange.map { doc =>\n SummaryListRow(\n Key(Text(messages(\"dateofchange.title\"))),\n Value(Text(DateHelper.formatDate(doc.dateOfChange))),\n actions = Some(Actions(\n items = Seq(ActionItem(\n routes.WhatDateRemovedController.get(edit = true).url,\n Text(messages(\"button.edit\")),\n attributes = Map(\"id\" -> \"dateofchange-edit\")\n ))\n ))\n )\n }\n ).flatten\n )\n )\n\n @formHelper(controllers.businessmatching.updateservice.remove.routes.RemoveBusinessTypesSummaryController.post()) {\n @button(\"button.checkyouranswers.acceptandcomplete\", \"updatesummary-submit\")\n }\n\n}\n","usages":["@formHelper(controllers.businessmatching.updateservice.remove.routes.RemoveBusinessTypesSummaryController.post())"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/updateservice/remove/RemoveActivitiesSummaryView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukSummaryList#","variableName":"govukSummaryList","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import models.flowmanagement.RemoveBusinessTypeFlowModel\n@import controllers.businessmatching.updateservice.remove.routes\n@import utils.DateHelper\n@import views.html.components.{SectionSubtitle, Heading, Button}\n\n@this(\n layout: Layout,\n subtitle: SectionSubtitle,\n heading: Heading,\n govukSummaryList: GovukSummaryList,\n formHelper: FormWithCSRF,\n button: Button\n)\n\n@(model: RemoveBusinessTypeFlowModel)(implicit messages: Messages, request: Request[_])\n\n@layout(s\"${messages(\"title.cya\")} - ${messages(\"summary.updateinformation\")}\", showBackLink = false) {\n\n @subtitle(\"summary.updateinformation\")\n\n @heading(\"title.cya\")\n\n @govukSummaryList(\n SummaryList(\n Seq(\n model.activitiesToRemove.map { activities =>\n SummaryListRow(\n Key(Text(messages(\"businessmatching.updateservice.removeactivities.heading\"))),\n if(activities.size == 1) {\n Value(Text(activities.head.getMessage()))\n } else {\n Value(\n HtmlContent(\n Html(\n \"<ul class=\\\"govuk-list govuk-list--bullet\\\">\" +\n activities.toList.map { x =>\n s\"<li>${x.getMessage()}</li>\"\n }.sorted.mkString +\n \"</ul>\"\n )\n )\n )\n },\n actions = Some(Actions(\n items = Seq(ActionItem(\n routes.RemoveBusinessTypesController.get(edit = true).url,\n Text(messages(\"button.edit\")),\n attributes = Map(\"id\" -> \"removeactivities-edit\")\n ))\n ))\n )\n },\n model.dateOfChange.map { doc =>\n SummaryListRow(\n Key(Text(messages(\"dateofchange.title\"))),\n Value(Text(DateHelper.formatDate(doc.dateOfChange))),\n actions = Some(Actions(\n items = Seq(ActionItem(\n routes.WhatDateRemovedController.get(edit = true).url,\n Text(messages(\"button.edit\")),\n attributes = Map(\"id\" -> \"dateofchange-edit\")\n ))\n ))\n )\n }\n ).flatten\n )\n )\n\n @formHelper(controllers.businessmatching.updateservice.remove.routes.RemoveBusinessTypesSummaryController.post()) {\n @button(\"button.checkyouranswers.acceptandcomplete\", \"updatesummary-submit\")\n }\n\n}\n","usages":["@govukSummaryList(\n SummaryList(\n Seq(\n model.activitiesToRemove.map { activities =>\n SummaryListRow(\n Key(Text(messages(\"businessmatching.updateservice.removeactivities.heading\"))),\n if(activities.size == 1) {\n Value(Text(activities.head.getMessage()))\n } else {\n Value(\n HtmlContent(\n Html(\n \"<ul class=\\\"govuk-list govuk-list--bullet\\\">\" +\n activities.toList.map { x =>\n s\"<li>${x.getMessage()}</li>\"\n }.sorted.mkString +\n \"</ul>\"\n )\n )\n )\n },\n actions = Some(Actions(\n items = Seq(ActionItem(\n routes.RemoveBusinessTypesController.get(edit = true).url,\n Text(messages(\"button.edit\")),\n attributes = Map(\"id\" -> \"removeactivities-edit\")\n ))\n ))\n )\n },\n model.dateOfChange.map { doc =>\n SummaryListRow(\n Key(Text(messages(\"dateofchange.title\"))),\n Value(Text(DateHelper.formatDate(doc.dateOfChange))),\n actions = Some(Actions(\n items = Seq(ActionItem(\n routes.WhatDateRemovedController.get(edit = true).url,\n Text(messages(\"button.edit\")),\n attributes = Map(\"id\" -> \"dateofchange-edit\")\n ))\n ))\n )\n }\n ).flatten\n )\n )"]}
{"repoName":"amls-frontend","templatePath":"app/views/businessmatching/updateservice/remove/RemoveActivitiesView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.implicits._\n@import components.{Button, ReturnLink, SectionSubtitle}\n@import components.forms.{InputCheckbox, ErrorSummary}\n@import models.businessmatching.BusinessActivity\n@import models.businessmatching.BusinessActivities\n\n@this(\n formHelper: FormWithCSRF,\n layout: Layout,\n subtitle: SectionSubtitle,\n inputCheckbox: InputCheckbox,\n errorSummary: ErrorSummary,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], edit: Boolean, activityValues: Seq[BusinessActivity])(implicit request: Request[_], messages: Messages)\n\n@messageSuffix = @{\nval activities = BusinessActivities.all.toSeq diff activityValues\n if(activities.size == 2) {\n \"twobusinesses\"\n } else {\n \"multibusinesses\"\n }\n}\n\n@hintContent = @{\n \"<p>\" + messages(\"businessmatching.updateservice.removeactivities.summary.\" + messageSuffix) + \"</p><p>\" +\n messages(\"businessmatching.updateservice.removeactivities.list.heading.\" + messageSuffix) + \"</p>\"\n}\n\n\n@layout(pageTitle = messages(\"businessmatching.updateservice.removeactivities.title.\" + messageSuffix)) {\n\n @formHelper(action = controllers.businessmatching.updateservice.remove.routes.RemoveBusinessTypesController.post(edit)) {\n\n @errorSummary(form, Some(Map(\"value\" -> s\"value_${activityValues.map(activity =>\n activity.value.substring(1)).head}\")))\n\n @subtitle(\"summary.updateservice\")\n\n @inputCheckbox(\n Checkboxes(\n fieldset = Some(Fieldset(\n legend = Some(\n Legend(\n content = Text(messages(\"businessmatching.updateservice.removeactivities.title.\" + messageSuffix)),\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n )\n )\n )),\n hint = Some(\n Hint(\n content = HtmlContent(hintContent)\n )\n ),\n name = \"value\",\n items = BusinessActivities.formValues(Some((BusinessActivities.all.toSeq diff activityValues)), false)\n ).withFormField(form(\"value\"))\n )\n\n @button(\"businessmatching.updateservice.removeactivities.button\")\n }\n}","usages":["@formHelper(action = controllers.businessmatching.updateservice.remove.routes.RemoveBusinessTypesController.post(edit))"]}
{"repoName":"amls-frontend","templatePath":"app/views/components/Button.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukButton#","variableName":"govukButton","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@this(govukButton: GovukButton)\n\n@(\n msg: String = \"button.saveandcontinue\",\n id: String = \"button\",\n hrefOpt: Option[String] = None,\n startButton: Boolean = false,\n attributes: Map[String, String] = Map.empty,\n classes: String = \"\"\n)(implicit messages: Messages)\n\n@govukButton(Button(\n href = hrefOpt,\n content = Text(messages(msg)),\n isStartButton = startButton,\n attributes = attributes + (\"id\" -> id),\n classes = classes\n))\n","usages":["@govukButton(Button(\n href = hrefOpt,\n content = Text(messages(msg)),\n isStartButton = startButton,\n attributes = attributes + (\"id\" -> id),\n classes = classes\n))"]}
{"repoName":"amls-frontend","templatePath":"app/views/components/forms/DateErrorSummary.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukErrorSummary#","variableName":"errorSummary","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@this(errorSummary: GovukErrorSummary)\n\n@(form: Form[_], formId: String)(implicit messages: Messages)\n\[email protected] { error =>\n @errorSummary(ErrorSummary(\n title = Text(messages(\"err.summary\")),\n errorList = Seq(ErrorLink(\n href = if(error.key == formId) Some(s\"#${formId}.day\") else Some(s\"#${error.key}\"),\n content = Text(messages(error.message, error.args:_*))\n ))\n ))\n}","usages":["@errorSummary(ErrorSummary(\n title = Text(messages(\"err.summary\")),\n errorList = Seq(ErrorLink(\n href = if(error.key == formId) Some(s\"#${formId}.day\") else Some(s\"#${error.key}\"),\n content = Text(messages(error.message, error.args:_*))\n ))\n ))"]}
{"repoName":"amls-frontend","templatePath":"app/views/components/forms/ErrorSummary.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukErrorSummary#","variableName":"errorSummary","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.hmrcfrontend.views.html.components.implicits._\n\n@this(errorSummary: GovukErrorSummary)\n\n@(form: Form[_], mapping: Option[Map[String, String]] = None)(implicit messages: Messages)\n\n@if(form.errors.nonEmpty) {\n @errorSummary(\n mapping.fold(ErrorSummary().withFormErrorsAsText(form)){ value =>\n ErrorSummary().withFormErrorsAsText(form, mapping = value)\n }\n )\n}","usages":["@errorSummary(\n mapping.fold(ErrorSummary().withFormErrorsAsText(form)){ value =>\n ErrorSummary().withFormErrorsAsText(form, mapping = value)\n }\n )"]}
{"repoName":"amls-frontend","templatePath":"app/views/components/forms/InputCheckbox.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukCheckboxes#","variableName":"govukCheckboxes","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.implicits._\n@import uk.gov.hmrc.hmrcfrontend.views.html.components.implicits._\n\n@this(govukCheckboxes : GovukCheckboxes)\n\n@(checkboxes: Checkboxes)\n\n@govukCheckboxes(checkboxes)\n\n","usages":["@govukCheckboxes(checkboxes)"]}
{"repoName":"amls-frontend","templatePath":"app/views/components/forms/InputCountry.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukSelect#","variableName":"govukSelect","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichSelect\n\n@this(govukSelect: GovukSelect)\n\n@(\n form: Form[_],\n countries: Seq[SelectItem],\n id: String = \"location-autocomplete\",\n name: String = \"country\",\n labelMsg: String = \"businessdetails.registeredoffice.country.lbl\",\n labelMsgArgs: String = \"\"\n)(implicit messages: Messages)\n\n@govukSelect(\n Select(\n id = id,\n name = name,\n label = Label(\n content = Text(messages(labelMsg, labelMsgArgs))\n ),\n classes = \"govuk-!-width-two-thirds\",\n items = countries,\n attributes = Map(\"data-gov-autocomplete\" -> \"true\")\n )\n .asAccessibleAutocomplete()\n .withFormField(form(name))\n)","usages":["@govukSelect(\n Select(\n id = id,\n name = name,\n label = Label(\n content = Text(messages(labelMsg, labelMsgArgs))\n ),\n classes = \"govuk-!-width-two-thirds\",\n items = countries,\n attributes = Map(\"data-gov-autocomplete\" -> \"true\")\n )\n .asAccessibleAutocomplete()\n .withFormField(form(name))\n)"]}
{"repoName":"amls-frontend","templatePath":"app/views/components/forms/InputText.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukInput#","variableName":"govukInput","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components.implicits._\n@import uk.gov.hmrc.hmrcfrontend.views.html.components.implicits._\n\n@this(govukInput: GovukInput)\n\n@(input: Input, field: Field)(implicit messages: Messages)\n\n@govukInput(\n input.withFormField(field)\n)\n","usages":["@govukInput(\n input.withFormField(field)\n)"]}
{"repoName":"amls-frontend","templatePath":"app/views/components/forms/InputTextArea.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukTextarea#","variableName":"govukTextarea","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.viewmodels.textarea.Textarea\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichTextarea\n\n\n@this(govukTextarea: GovukTextarea)\n\n@(textarea: Textarea)\n\n@govukTextarea(\n textarea\n)","usages":["@govukTextarea(\n textarea\n)"]}
{"repoName":"amls-frontend","templatePath":"app/views/components/forms/InputYesNo.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukRadios#","variableName":"govukRadios","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.html.components._\n\n@this(govukRadios : GovukRadios)\n\n@(radios: Radios)(implicit messages: Messages)\n\n@govukRadios(radios)","usages":["@govukRadios(radios)"]}
{"repoName":"amls-frontend","templatePath":"app/views/components/NotificationBanner.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukNotificationBanner#","variableName":"govukNotificationBanner","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@this(govukNotificationBanner: GovukNotificationBanner)\n\n@(titleKey: String, content: String)(implicit messages: Messages)\n\n@govukNotificationBanner(\n NotificationBanner(\n title = Text(messages(titleKey)),\n content = Text(messages(content))\n )\n)","usages":["@govukNotificationBanner(\n NotificationBanner(\n title = Text(messages(titleKey)),\n content = Text(messages(content))\n )\n)"]}
{"repoName":"amls-frontend","templatePath":"app/views/components/ServicesSidebar.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukSummaryList#","variableName":"govukSummaryList","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n\n@this(\ngovukSummaryList: GovukSummaryList,\n)\n\n@(canEditPreApplication: Boolean,\n displayLink: Boolean,\n businessName: String,\n serviceNames: List[String],\n hasCompleteNominatedOfficer: Boolean,\n nominatedOfficerName: Option[String])(implicit requestHeader: RequestHeader, messages: Messages, appConfig: ApplicationConfig)\n\n@gridClass = @{\n if(hasCompleteNominatedOfficer) {\n \"govuk-grid-column-one-third\"\n } else {\n \"govuk-grid-column-one-half\"\n }\n}\n\n@businessNameRow = @{\n SummaryListRow(\n Key(Text(messages(\"status.business\"))),\n Value(Text(businessName))\n )\n}\n\n@servicesRowValue = {\n @if(serviceNames.length == 1) {\n <p class=\"govuk-body\">@serviceNames.head</p>\n } else {\n <ul class=\"govuk-list govuk-list--bullet\">\n @serviceNames.map { name =>\n <li>@name</li>\n }\n </ul>\n }\n @if(displayLink) {\n <p class=\"govuk-body govuk-!-margin-top-4\">\n <a id=\"view-details\" href=\"@controllers.businessmatching.routes.SummaryController.get.url\" class=\"edit-preapp govuk-link\">\n @(if(canEditPreApplication) messages(\"progress.preapplication.canedit\") else messages(\"progress.preapplication.readonly\"))\n </a>\n </p>\n }\n}\n\n@servicesRow = @{\n SummaryListRow(\n Key(Text(messages(\"status.deregister.services\"))),\n Value(\n HtmlContent(servicesRowValue)))\n}\n\n@nominatedOfficerRow = @{\n (hasCompleteNominatedOfficer, nominatedOfficerName) match {\n case (true, Some(name)) =>\n Some(SummaryListRow(\n Key(Text(messages(\"changeofficer.changelink.heading\"))),\n Value(\n HtmlContent(\n Html(\n s\"\"\"<p class=\"govuk-body\">$name</p>\"\"\"\n )\n )\n )\n ))\n case _ => None\n }\n}\n\n@govukSummaryList(SummaryList(\n rows = Seq(Some(businessNameRow), nominatedOfficerRow, Some(servicesRow)).flatten,\n classes = \"govuk-summary-list govuk-summary-list--no-border\"\n ))\n\n\n","usages":["@govukSummaryList(SummaryList(\n rows = Seq(Some(businessNameRow), nominatedOfficerRow, Some(servicesRow)).flatten,\n classes = \"govuk-summary-list govuk-summary-list--no-border\"\n ))"]}
{"repoName":"amls-frontend","templatePath":"app/views/components/Stylesheets.scala.html","component":"uk/gov/hmrc/hmrcfrontend/views/html/helpers/HmrcAccessibleAutocompleteCss#","variableName":"autocompleteCss","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcAccessibleAutocompleteCss\n\n@this(autocompleteCss: HmrcAccessibleAutocompleteCss)\n\n@()(implicit requestHeader: RequestHeader)\n\n@autocompleteCss()\n<link href='@controllers.routes.Assets.versioned(\"stylesheets/application.css\")' media=\"all\" rel=\"stylesheet\" type=\"text/css\" />\n","usages":["@autocompleteCss()"]}
{"repoName":"amls-frontend","templatePath":"app/views/confirmation/ConfirmationBacsView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukPanel#","variableName":"govukPanel","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import views.html.confirmation.components.InformationNoticeView\n@import views.html.components.FeedbackSurveyLink\n\n@this(\n layout: Layout,\n govukPanel: GovukPanel,\n informationNotice: InformationNoticeView,\n feedbackSurveyLink: FeedbackSurveyLink\n)\n\n@(businessName: String, refNo: String, isRenewal : Boolean = false)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@panelContent = {\n <p>@businessName</p>\n @messages(\"fee.reference.number.lbl\")\n <strong>@refNo</strong>\n }\n\n@layout(\n pageTitle = messages(\"confirmation.payment.bacs.title\") + \" - \" + messages(\"submit.registration\"),\n showBackLink = false\n) {\n\n @govukPanel(\n Panel(\n title = Text(messages(if(isRenewal) \"confirmation.payment.bacs.header.renewal\" else \"confirmation.payment.bacs.header\")),\n content = HtmlContent(panelContent)\n )\n )\n\n <p class=\"govuk-body\">@messages(\"confirmation.payment.renewal.info.hmrc_review\")</p>\n <p class=\"govuk-body\">@messages(\"confirmation.payment.renewal.info.hmrc_review3\")</p>\n <p class=\"govuk-body\">@messages(\"confirmation.payment.renewal.info.hmrc_review4\")</p>\n\n @informationNotice()\n\n <p class=\"govuk-body\">\n <a href=\"@controllers.routes.LandingController.get.url\" id=\"goto-reg-link\" class=\"govuk-link\">@messages(if(isRenewal) \"link.navigate.registration.Returnto\" else \"link.navigate.registration.Goto\")</a>\n </p>\n\n @feedbackSurveyLink()\n\n}\n","usages":["@govukPanel(\n Panel(\n title = Text(messages(if(isRenewal) \"confirmation.payment.bacs.header.renewal\" else \"confirmation.payment.bacs.header\")),\n content = HtmlContent(panelContent)\n )\n )"]}
{"repoName":"amls-frontend","templatePath":"app/views/confirmation/ConfirmationNoFeeView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukPanel#","variableName":"govukPanel","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import views.html.confirmation.components.InformationNoticeView\n@import views.html.components.FeedbackSurveyLink\n\n@this(\n layout: Layout,\n govukPanel: GovukPanel,\n informationNotice: InformationNoticeView,\n feedbackSurveyLink: FeedbackSurveyLink\n)\n\n@(companyName: Option[String])(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@panel = @{\n companyName match {\n case Some(name) =>\n govukPanel(\n Panel(\n title = Text(messages(\"confirmation.variation.lede\")),\n content = Text(name)\n )\n )\n case None =>\n govukPanel(\n Panel(\n title = Text(messages(\"confirmation.variation.lede\")),\n )\n )\n }\n}\n\n@layout(pageTitle = messages(\"confirmation.variation.title\"), showBackLink = false) {\n\n @panel\n\n <p class=\"govuk-body\">@messages(\"confirmation.no.fee\")</p>\n\n @informationNotice()\n\n <p class=\"govuk-body\">\n <a href=\"@controllers.routes.LandingController.get.url\" id=\"return-your-registration\" class=\"govuk-link\">@messages(\"link.navigate.registration.Returnto\")</a>\n </p>\n\n @feedbackSurveyLink()\n\n}","usages":["govukPanel(\n Panel(\n title = Text(messages(\"confirmation.variation.lede\")),\n content = Text(name)\n )\n )","govukPanel(\n Panel(\n title = Text(messages(\"confirmation.variation.lede\")),\n )\n )"]}
{"repoName":"amls-frontend","templatePath":"app/views/confirmation/PaymentConfirmationAmendVariationView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukPanel#","variableName":"govukPanel","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import views.html.components.Button\n@import views.html.confirmation.components.InformationNoticeView\n\n@this(\n layout: Layout,\n govukPanel: GovukPanel,\n informationNotice: InformationNoticeView,\n button: Button\n)\n\n@(companyName: String, paymentReference: String)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@panelContent = @{\n HtmlFormat.fill(\n scala.collection.immutable.Seq(\n HtmlFormat.escape(companyName),\n HtmlFormat.raw(\"<br>\"),\n HtmlFormat.escape(messages(\"confirmation.payment.reference_header\", paymentReference)),\n )\n )\n}\n\n@layout(\n pageTitle = messages(\"confirmation.payment.amendvariation.title\"),\n showBackLink = false\n) {\n\n @govukPanel(\n Panel(\n title = Text(messages(\"confirmation.payment.amendvariation.lede\")),\n content = HtmlContent(panelContent)\n )\n )\n\n <p class=\"govuk-body\">@messages(\"confirmation.payment.info.hmrc.review.1\")</p>\n <p class=\"govuk-body\">@messages(\"confirmation.payment.info.hmrc.review.2\")</p>\n <p class=\"govuk-body\">@messages(\"confirmation.payment.info.hmrc.review.3\")</p>\n\n @informationNotice(\"confirmation.payment.amendvariation.info.keep_up_to_date\")\n\n @button(\n \"confirmation.payment.continue_button.text\", \"payment-continue\", Some(controllers.routes.LandingController.get.url)\n )\n}","usages":["@govukPanel(\n Panel(\n title = Text(messages(\"confirmation.payment.amendvariation.lede\")),\n content = HtmlContent(panelContent)\n )\n )"]}
{"repoName":"amls-frontend","templatePath":"app/views/confirmation/PaymentConfirmationRenewalView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukPanel#","variableName":"govukPanel","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import views.html.components.Button\n@import views.html.confirmation.components.InformationNoticeView\n\n@this(\n layout: Layout,\n govukPanel: GovukPanel,\n informationNotice: InformationNoticeView,\n button: Button\n)\n\n@(companyName: String, paymentReference: String)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@panelContent = @{\n HtmlFormat.fill(\n scala.collection.immutable.Seq(\n HtmlFormat.escape(companyName),\n HtmlFormat.raw(\"<br>\"),\n HtmlFormat.escape(messages(\"confirmation.payment.reference_header\", paymentReference)),\n )\n )\n}\n\n@layout(\n pageTitle = messages(\"confirmation.payment.renewal.title\"),\n showBackLink = false\n) {\n\n @govukPanel(\n Panel(\n title = Text(messages(\"confirmation.payment.renewal.lede\")),\n content = HtmlContent(panelContent)\n )\n )\n\n <p class=\"govuk-body\">@messages(\"confirmation.payment.info.hmrc.review.1\")</p>\n <p class=\"govuk-body\">@messages(\"confirmation.payment.info.hmrc.review.2\")</p>\n <p class=\"govuk-body\">@messages(\"confirmation.payment.info.hmrc.review.3\")</p>\n\n @informationNotice(\"confirmation.payment.amendvariation.info.keep_up_to_date\")\n\n @button(\n \"confirmation.payment.continue_button.text\", \"payment-continue\", Some(controllers.routes.LandingController.get.url)\n )\n}","usages":["@govukPanel(\n Panel(\n title = Text(messages(\"confirmation.payment.renewal.lede\")),\n content = HtmlContent(panelContent)\n )\n )"]}
{"repoName":"amls-frontend","templatePath":"app/views/confirmation/PaymentConfirmationTransitionalRenewalView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukPanel#","variableName":"govukPanel","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import views.html.components.Button\n@import views.html.confirmation.components.InformationNoticeView\n\n@this(\n layout: Layout,\n govukPanel: GovukPanel,\n informationNotice: InformationNoticeView,\n button: Button\n)\n\n@(companyName: String, paymentReference: String)(implicit request: Request[_], messages: Messages, lang: Lang, appConfig: ApplicationConfig)\n\n\n@panelContent = @{\n HtmlFormat.fill(\n scala.collection.immutable.Seq(\n HtmlFormat.escape(companyName),\n HtmlFormat.raw(\"<br>\"),\n HtmlFormat.escape(messages(\"confirmation.payment.reference_header\", paymentReference)),\n )\n )\n}\n\n@layout(\n pageTitle = messages(\"confirmation.payment.title\"),\n showBackLink = false\n) {\n\n @govukPanel(\n Panel(\n title = Text(messages(\"confirmation.payment.lede\")),\n content = HtmlContent(panelContent)\n )\n )\n\n <p class=\"govuk-body\">@messages(\"confirmation.payment.info.hmrc.review.1\")</p>\n <p class=\"govuk-body\">@messages(\"confirmation.payment.info.hmrc.review.2\")</p>\n <p class=\"govuk-body\">@messages(\"confirmation.payment.info.hmrc.review.3\")</p>\n\n @informationNotice()\n\n @button(\n \"confirmation.payment.continue_button.text\", \"payment-continue\", Some(controllers.routes.LandingController.get.url)\n )\n}\n","usages":["@govukPanel(\n Panel(\n title = Text(messages(\"confirmation.payment.lede\")),\n content = HtmlContent(panelContent)\n )\n )"]}
{"repoName":"amls-frontend","templatePath":"app/views/confirmation/PaymentConfirmationView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukPanel#","variableName":"govukPanel","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import views.html.components.Button\n@import views.html.confirmation.components.InformationNoticeView\n\n@this(\n layout: Layout,\n govukPanel: GovukPanel,\n informationNotice: InformationNoticeView,\n button: Button\n)\n\n@(companyName: String, paymentReference: String)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@panelContent = @{\n HtmlFormat.fill(\n scala.collection.immutable.Seq(\n HtmlFormat.escape(companyName),\n HtmlFormat.raw(\"<br>\"),\n HtmlFormat.escape(messages(\"confirmation.payment.reference_header\", paymentReference)),\n )\n )\n}\n\n@layout(\n pageTitle = messages(\"confirmation.payment.title\"),\n showBackLink = false\n) {\n\n @govukPanel(\n Panel(\n title = Text(messages(\"confirmation.payment.lede\")),\n content = HtmlContent(panelContent)\n )\n )\n\n <p class=\"govuk-body\">@messages(\"confirmation.payment.info.hmrc.review.1\")</p>\n <p class=\"govuk-body\">@messages(\"confirmation.payment.info.hmrc.review.2\")</p>\n <p class=\"govuk-body\">@messages(\"confirmation.payment.info.hmrc.review.3\")</p>\n\n @informationNotice()\n\n @button(\n \"confirmation.payment.continue_button.text\", \"payment-continue\", Some(controllers.routes.LandingController.get.url)\n )\n}","usages":["@govukPanel(\n Panel(\n title = Text(messages(\"confirmation.payment.lede\")),\n content = HtmlContent(panelContent)\n )\n )"]}
{"repoName":"amls-frontend","templatePath":"app/views/confirmation/PaymentFailureView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import utils.Strings.TextHelpers\n@import models.confirmation._\n@import views.html.components.{Button, Heading}\n@import config.ApplicationConfig\n\n@this(\n layout: Layout,\n formHelper: FormWithCSRF,\n heading: Heading,\n button: Button\n)\n@(reasonMsg: String, amount: Currency, reference: String)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(\n pageTitle = messages(\"confirmation.payment.failed.title\"),\n showBackLink = false\n) {\n\n @heading(\"confirmation.payment.failed.header\")\n\n <div id=\"failure-reason\" class=\"govuk-inset-text\">\n <p class=\"govuk-body\">@messages(reasonMsg)</p>\n </div>\n\n <p class=\"govuk-body\">@messages(\"confirmation.payment.failed.info\")</p>\n\n <div class=\"reg-online--pay-fee\">\n <p class=\"govuk-body\">@messages(\"confirmation.fee\") <span hidden>is</span>\n <span class=\"govuk-heading-l payment-amount\">@amount</span>\n </p>\n <p class=\"govuk-body\">@messages(\"confirmation.sidebar.code\") <span hidden>is</span>\n <span class=\"govuk-heading-l payment-ref\">@reference</span>\n </p>\n </div>\n\n @formHelper(action = controllers.routes.RetryPaymentController.retryPayment()) {\n <input type=\"hidden\" name=\"paymentRef\" value=\"@reference\">\n @button(\"confirmation.payment.button.retry\")\n }\n}\n\n","usages":["@formHelper(action = controllers.routes.RetryPaymentController.retryPayment())"]}
{"repoName":"amls-frontend","templatePath":"app/views/DateOfChangeView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.hmrcfrontend.views.Implicits.RichDateInput\n@import components.forms.DateErrorSummary\n@import components.{Button, ReturnLink, SectionSubtitle, Heading}\n\n@this(\n layout: Layout,\n formHelper: FormWithCSRF,\n errorSummary: DateErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n govukDateInput: GovukDateInput,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], subheadingMessage: String, controllerAction: Call, hasReturnLink: Boolean = true, buttonMsgKey: String = \"button.saveandcontinue\")(implicit requestHeader: RequestHeader, messages: Messages)\n\n@layout(\n pageTitle = s\"${messages(\"dateofchange.title\")} - ${messages(subheadingMessage)}\",\n) {\n\n @errorSummary(form, \"dateOfChange\")\n\n @subtitle(subheadingMessage)\n\n @formHelper(action = controllerAction) {\n\n @govukDateInput(\n DateInput(\n id = \"dateOfChange\",\n hint = Some(Hint(content = Text(messages(\"lbl.date.example\")))),\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"dateofchange.title\")),\n isPageHeading = true,\n classes = \"govuk-fieldset__legend--xl\"\n ))\n ))\n ).withFormField(form(\"dateOfChange\"))\n )\n\n @button(buttonMsgKey)\n }\n\n @if(hasReturnLink) {\n @returnLink(true)\n }\n}","usages":["@formHelper(action = controllerAction)"]}
{"repoName":"amls-frontend","templatePath":"app/views/DateOfChangeView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukDateInput#","variableName":"govukDateInput","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.hmrcfrontend.views.Implicits.RichDateInput\n@import components.forms.DateErrorSummary\n@import components.{Button, ReturnLink, SectionSubtitle, Heading}\n\n@this(\n layout: Layout,\n formHelper: FormWithCSRF,\n errorSummary: DateErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n govukDateInput: GovukDateInput,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], subheadingMessage: String, controllerAction: Call, hasReturnLink: Boolean = true, buttonMsgKey: String = \"button.saveandcontinue\")(implicit requestHeader: RequestHeader, messages: Messages)\n\n@layout(\n pageTitle = s\"${messages(\"dateofchange.title\")} - ${messages(subheadingMessage)}\",\n) {\n\n @errorSummary(form, \"dateOfChange\")\n\n @subtitle(subheadingMessage)\n\n @formHelper(action = controllerAction) {\n\n @govukDateInput(\n DateInput(\n id = \"dateOfChange\",\n hint = Some(Hint(content = Text(messages(\"lbl.date.example\")))),\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"dateofchange.title\")),\n isPageHeading = true,\n classes = \"govuk-fieldset__legend--xl\"\n ))\n ))\n ).withFormField(form(\"dateOfChange\"))\n )\n\n @button(buttonMsgKey)\n }\n\n @if(hasReturnLink) {\n @returnLink(true)\n }\n}","usages":["@govukDateInput(\n DateInput(\n id = \"dateOfChange\",\n hint = Some(Hint(content = Text(messages(\"lbl.date.example\")))),\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"dateofchange.title\")),\n isPageHeading = true,\n classes = \"govuk-fieldset__legend--xl\"\n ))\n ))\n ).withFormField(form(\"dateOfChange\"))\n )"]}
{"repoName":"amls-frontend","templatePath":"app/views/declaration/AddPersonView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichCheckboxes\n@import config.ApplicationConfig\n@import models.businessmatching.BusinessType\n@import models.declaration.release7.RoleWithinBusinessRelease7\n@import views.html.components.forms.{InputCheckbox, InputText, ErrorSummary}\n@import views.html.components.{Button, Heading, ReturnLink, SectionSubtitle}\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n inputCheckbox: InputCheckbox,\n inputText: InputText,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(title: String, pageSubtitle: String, businessType: Option[BusinessType], form: Form[_])(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@hasSoftwareNameError = @{\n form.errors match {\n case Nil => false\n case x if x.head.key == \"otherPosition\" => true\n case _ => false\n }\n}\n\n@preparedErrorSummary = @{\n if(hasSoftwareNameError) {\n errorSummary(form, Some(Map(\"otherPosition\" -> \"otherPosition\")))\n } else {\n errorSummary(form, Some(Map(\"positions\" -> \"positions_1\")))\n }\n}\n\n@conditionalHtml = @{\n inputText(\n Input(\n label = Label(\n isPageHeading = false,\n content = Text(messages(\"responsiblepeople.position_within_business.other_position.lbl\")),\n classes = \"govuk-label\"\n ),\n id = \"otherPosition\",\n name = \"otherPosition\"\n ),\n form(\"otherPosition\")\n )\n}\n\n@layout(pageTitle = messages(title)) {\n\n @preparedErrorSummary\n\n @subtitle(pageSubtitle)\n\n @heading(\"declaration.addperson.title\")\n\n @formHelper(action = controllers.declaration.routes.AddPersonController.post()) {\n\n <h2 class=\"govuk-heading-m\">@messages(\"declaration.addperson.h2\")</h2>\n\n @inputText(\n Input(\n label = Label(\n isPageHeading = false,\n content = Text(messages(\"declaration.addperson.firstname\")),\n classes = \"govuk-label\"\n ),\n id = \"firstName\",\n name = \"firstName\"\n ),\n form(\"firstName\")\n )\n\n @inputText(\n Input(\n label = Label(\n isPageHeading = false,\n content = Text(messages(\"declaration.addperson.middlename\")),\n classes = \"govuk-label\"\n ),\n id = \"middleName\",\n name = \"middleName\"\n ),\n form(\"middleName\")\n )\n\n @inputText(\n Input(\n label = Label(\n isPageHeading = false,\n content = Text(messages(\"declaration.addperson.lastname\")),\n classes = \"govuk-label\"\n ),\n id = \"lastName\",\n name = \"lastName\"\n ),\n form(\"lastName\")\n )\n\n @inputCheckbox(\n Checkboxes(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = Text(messages(\"responsiblepeople.position_within_business.h2\")),\n classes = \"govuk-fieldset__legend--m\",\n isPageHeading = false\n ))\n )),\n hint = Some(Hint(content = Text(messages(\"lbl.select.all\")))),\n name = \"positions\",\n items = RoleWithinBusinessRelease7.formValues(businessType, conditionalHtml)\n ).withFormField(form(\"positions\"))\n )\n\n @button()\n\n @returnLink(true)\n }\n}\n","usages":["@formHelper(action = controllers.declaration.routes.AddPersonController.post())"]}
{"repoName":"amls-frontend","templatePath":"app/views/declaration/DeclareView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukWarningText#","variableName":"warningText","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import views.html.components.{Heading, Button, SectionSubtitle}\n\n@this(\n layout: Layout,\n pageSubtitle: SectionSubtitle,\n heading: Heading,\n warningText: GovukWarningText,\n formHelper: FormWithCSRF,\n button: Button\n)\n\n@(title: String, subtitle: String, name: String, isAmendment: Boolean)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(pageTitle = messages(title)) {\n\n @pageSubtitle(subtitle)\n\n @heading(\"declaration.declaration.title\", subtitle)\n\n @warningText(\n WarningText(\n content = Text(messages(\"declaration.declaration.fullname\", name))\n )\n )\n\n <p class=\"govuk-body\">@messages(\"declaration.declaration.declare\")</p>\n\n <ul class=\"govuk-list govuk-list--bullet\">\n @if(isAmendment) {\n <li>@messages(\"declaration.declaration.amendment.correctinformation\")</li>\n } else {\n <li>@messages(\"declaration.declaration.correctinformation\")</li>\n }\n <li>@messages(\"declaration.declaration.tellhmrc\")</li>\n <li>@messages(\"declaration.declaration.noncompliance\")</li>\n <li>@messages(\"declaration.declaration.confirm\") <a class=\"govuk-link\" href=\"https://www.gov.uk/government/collections/anti-money-laundering-businesses-supervised-by-hm-revenue-and-customs\">@messages(\"declaration.declaration.guidance\")</a></li>\n </ul>\n\n @formHelper(action = controllers.routes.SubmissionController.post(), Symbol(\"disable-on-submit\") -> \"true\") {\n @button(messages(\"button.acceptandsubmit\"), \"confirm-continue\")\n }\n\n}\n","usages":["@warningText(\n WarningText(\n content = Text(messages(\"declaration.declaration.fullname\", name))\n )\n )"]}
{"repoName":"amls-frontend","templatePath":"app/views/declaration/DeclareView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import views.html.components.{Heading, Button, SectionSubtitle}\n\n@this(\n layout: Layout,\n pageSubtitle: SectionSubtitle,\n heading: Heading,\n warningText: GovukWarningText,\n formHelper: FormWithCSRF,\n button: Button\n)\n\n@(title: String, subtitle: String, name: String, isAmendment: Boolean)(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@layout(pageTitle = messages(title)) {\n\n @pageSubtitle(subtitle)\n\n @heading(\"declaration.declaration.title\", subtitle)\n\n @warningText(\n WarningText(\n content = Text(messages(\"declaration.declaration.fullname\", name))\n )\n )\n\n <p class=\"govuk-body\">@messages(\"declaration.declaration.declare\")</p>\n\n <ul class=\"govuk-list govuk-list--bullet\">\n @if(isAmendment) {\n <li>@messages(\"declaration.declaration.amendment.correctinformation\")</li>\n } else {\n <li>@messages(\"declaration.declaration.correctinformation\")</li>\n }\n <li>@messages(\"declaration.declaration.tellhmrc\")</li>\n <li>@messages(\"declaration.declaration.noncompliance\")</li>\n <li>@messages(\"declaration.declaration.confirm\") <a class=\"govuk-link\" href=\"https://www.gov.uk/government/collections/anti-money-laundering-businesses-supervised-by-hm-revenue-and-customs\">@messages(\"declaration.declaration.guidance\")</a></li>\n </ul>\n\n @formHelper(action = controllers.routes.SubmissionController.post(), Symbol(\"disable-on-submit\") -> \"true\") {\n @button(messages(\"button.acceptandsubmit\"), \"confirm-continue\")\n }\n\n}\n","usages":["@formHelper(action = controllers.routes.SubmissionController.post(), Symbol(\"disable-on-submit\") -> \"true\")"]}
{"repoName":"amls-frontend","templatePath":"app/views/declaration/RegisterPartnersView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import models.responsiblepeople._\n@import config.ApplicationConfig\n@import views.html.components.{Heading, SectionSubtitle, Button, ReturnLink}\n@import views.html.components.forms.ErrorSummary\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n inputRadios: GovukRadios,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(pageSubtitle: String, form: Form[_], model: Seq[ResponsiblePerson], currentPartners: Seq[String])(implicit messages: Messages, request: Request[_], appConfig: ApplicationConfig)\n\n@supportingContent = {\n <div class=\"govuk-inset-text\">\n <p class=\"govuk-body\">@if(currentPartners.isEmpty) {\n @messages(\"declaration.register.partners.none.text\")\n } else {\n @messages(\"declaration.register.partners.one.text\", currentPartners.head)\n }</p>\n </div>\n\n <p class=\"govuk-body\">@messages(\"declaration.register.partners.desc\")</p>\n}\n\n@formValues = @{\n model.flatMap { item =>\n item.personName map { name =>\n RadioItem(\n Text(name.titleName),\n Some(s\"value-${name.fullNameWithoutSpace}\"),\n Some(name.fullNameWithoutSpace)\n )\n }\n } :+ RadioItem(\n Text(messages(\"lbl.register.some.one.else\")),\n Some(\"other\"),\n Some(\"-1\")\n )\n}\n\n@layout(pageTitle = messages(\"declaration.register.partners.title\")) {\n\n @errorSummary(form)\n\n @subtitle(pageSubtitle)\n\n @heading(\"declaration.register.partners.title\")\n\n @supportingContent\n\n @formHelper(action = controllers.declaration.routes.RegisterPartnersController.post()) {\n\n @inputRadios(\n Radios(\n name = \"value\",\n items = formValues\n ).withFormField(form(\"value\"))\n )\n\n @button(id = \"confirm-continue\")\n }\n\n @returnLink(true)\n}\n","usages":["@formHelper(action = controllers.declaration.routes.RegisterPartnersController.post())"]}
{"repoName":"amls-frontend","templatePath":"app/views/declaration/RegisterPartnersView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukRadios#","variableName":"inputRadios","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import models.responsiblepeople._\n@import config.ApplicationConfig\n@import views.html.components.{Heading, SectionSubtitle, Button, ReturnLink}\n@import views.html.components.forms.ErrorSummary\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n inputRadios: GovukRadios,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(pageSubtitle: String, form: Form[_], model: Seq[ResponsiblePerson], currentPartners: Seq[String])(implicit messages: Messages, request: Request[_], appConfig: ApplicationConfig)\n\n@supportingContent = {\n <div class=\"govuk-inset-text\">\n <p class=\"govuk-body\">@if(currentPartners.isEmpty) {\n @messages(\"declaration.register.partners.none.text\")\n } else {\n @messages(\"declaration.register.partners.one.text\", currentPartners.head)\n }</p>\n </div>\n\n <p class=\"govuk-body\">@messages(\"declaration.register.partners.desc\")</p>\n}\n\n@formValues = @{\n model.flatMap { item =>\n item.personName map { name =>\n RadioItem(\n Text(name.titleName),\n Some(s\"value-${name.fullNameWithoutSpace}\"),\n Some(name.fullNameWithoutSpace)\n )\n }\n } :+ RadioItem(\n Text(messages(\"lbl.register.some.one.else\")),\n Some(\"other\"),\n Some(\"-1\")\n )\n}\n\n@layout(pageTitle = messages(\"declaration.register.partners.title\")) {\n\n @errorSummary(form)\n\n @subtitle(pageSubtitle)\n\n @heading(\"declaration.register.partners.title\")\n\n @supportingContent\n\n @formHelper(action = controllers.declaration.routes.RegisterPartnersController.post()) {\n\n @inputRadios(\n Radios(\n name = \"value\",\n items = formValues\n ).withFormField(form(\"value\"))\n )\n\n @button(id = \"confirm-continue\")\n }\n\n @returnLink(true)\n}\n","usages":["@inputRadios(\n Radios(\n name = \"value\",\n items = formValues\n ).withFormField(form(\"value\"))\n )"]}
{"repoName":"amls-frontend","templatePath":"app/views/declaration/RenewRegistrationView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import config.ApplicationConfig\n@import java.time.LocalDate\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n@import uk.gov.hmrc.hmrcfrontend.views.config.HmrcYesNoRadioItems\n@import views.html.components.forms.{ErrorSummary, InputYesNo}\n@import views.html.components.{Button, Heading, ReturnLink, SectionSubtitle}\n@import utils.DateHelper\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n inputYesNo: InputYesNo,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(form: Form[_], endDate: Option[LocalDate])(implicit request: Request[_], messages: Messages, appConfig: ApplicationConfig)\n\n@formValues = @{\n HmrcYesNoRadioItems().map { item =>\n if(item.value.contains(\"true\")) {\n item.copy(content = Text(messages(\"declaration.renew.now\")))\n } else {\n item.copy(content = Text(messages(\"declaration.continue.update\")))\n }\n }\n}\n\n@layout(s\"${messages(\"declaration.renew.registration.title\")} - ${messages(\"summary.declaration\")}\") {\n\n @errorSummary(form)\n\n @subtitle(\"summary.declaration\")\n\n @heading(\"declaration.renew.registration.title\")\n\n <p class=\"govuk-body\">@messages(\"declaration.renew.registration.section1\")</p>\n\n @endDate.map { date =>\n <p class=\"govuk-body\">@messages(\"declaration.renew.registration.section2\", DateHelper.formatDate(date))</p>\n }\n\n @formHelper(action = controllers.declaration.routes.RenewRegistrationController.post()) {\n\n @inputYesNo(\n Radios(\n name = \"renewRegistration\",\n items = formValues,\n classes = \"govuk-radios govuk-radios--inline\"\n ).withFormField(form(\"renewRegistration\"))\n )\n\n @button(\"progress.link.continue\")\n\n @returnLink(true)\n }\n}","usages":["@formHelper(action = controllers.declaration.routes.RenewRegistrationController.post())"]}
{"repoName":"amls-frontend","templatePath":"app/views/declaration/SelectBusinessNominatedOfficerView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import models.responsiblepeople._\n@import config.ApplicationConfig\n@import views.html.components.{Heading, SectionSubtitle, Button, ReturnLink}\n@import views.html.components.forms.ErrorSummary\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n inputRadios: GovukRadios,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(pageSubtitle: String, form: Form[_], model: Seq[ResponsiblePerson])(implicit messages: Messages, request: Request[_], appConfig: ApplicationConfig)\n\n@supportingContent = {\n <p class=\"govuk-body\">@messages(\"declaration.who.is.business.nominated.officer.text\")</p>\n}\n\n@formValues = @{\n model.zipWithIndex.flatMap { case (item, index) =>\n item.personName map { name =>\n RadioItem(\n Text(name.titleName),\n Some(s\"value-$index\"),\n Some(name.fullNameWithoutSpace)\n )\n }\n } :+ RadioItem(\n Text(messages(\"lbl.register.some.one.else\")),\n Some(\"other\"),\n Some(\"-1\")\n )\n}\n\n@layout(pageTitle = messages(\"declaration.who.is.business.nominated.officer\")) {\n\n @errorSummary(form)\n\n @subtitle(pageSubtitle)\n\n @heading(\"declaration.who.is.business.nominated.officer\")\n\n @supportingContent\n\n @formHelper(action = controllers.declaration.routes.WhoIsTheBusinessNominatedOfficerController.post()) {\n\n @inputRadios(\n Radios(\n name = \"value\",\n items = formValues\n ).withFormField(form(\"value\"))\n )\n\n @button(id = \"confirm-continue\")\n }\n\n @returnLink(true)\n}\n","usages":["@formHelper(action = controllers.declaration.routes.WhoIsTheBusinessNominatedOfficerController.post())"]}
{"repoName":"amls-frontend","templatePath":"app/views/declaration/SelectBusinessNominatedOfficerView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukRadios#","variableName":"inputRadios","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import models.responsiblepeople._\n@import config.ApplicationConfig\n@import views.html.components.{Heading, SectionSubtitle, Button, ReturnLink}\n@import views.html.components.forms.ErrorSummary\n@import uk.gov.hmrc.govukfrontend.views.Implicits.RichRadios\n\n@this(\n layout: Layout,\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n inputRadios: GovukRadios,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(pageSubtitle: String, form: Form[_], model: Seq[ResponsiblePerson])(implicit messages: Messages, request: Request[_], appConfig: ApplicationConfig)\n\n@supportingContent = {\n <p class=\"govuk-body\">@messages(\"declaration.who.is.business.nominated.officer.text\")</p>\n}\n\n@formValues = @{\n model.zipWithIndex.flatMap { case (item, index) =>\n item.personName map { name =>\n RadioItem(\n Text(name.titleName),\n Some(s\"value-$index\"),\n Some(name.fullNameWithoutSpace)\n )\n }\n } :+ RadioItem(\n Text(messages(\"lbl.register.some.one.else\")),\n Some(\"other\"),\n Some(\"-1\")\n )\n}\n\n@layout(pageTitle = messages(\"declaration.who.is.business.nominated.officer\")) {\n\n @errorSummary(form)\n\n @subtitle(pageSubtitle)\n\n @heading(\"declaration.who.is.business.nominated.officer\")\n\n @supportingContent\n\n @formHelper(action = controllers.declaration.routes.WhoIsTheBusinessNominatedOfficerController.post()) {\n\n @inputRadios(\n Radios(\n name = \"value\",\n items = formValues\n ).withFormField(form(\"value\"))\n )\n\n @button(id = \"confirm-continue\")\n }\n\n @returnLink(true)\n}\n","usages":["@inputRadios(\n Radios(\n name = \"value\",\n items = formValues\n ).withFormField(form(\"value\"))\n )"]}
{"repoName":"amls-frontend","templatePath":"app/views/declaration/WhoIsRegisteringCommonView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/GovukRadios#","variableName":"inputRadios","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import models.responsiblepeople._\n@import config.ApplicationConfig\n@import views.html.components.{Heading, SectionSubtitle, Button, ReturnLink}\n@import views.html.components.forms.ErrorSummary\n@import uk.gov.hmrc.govukfrontend.views.html.components.implicits._\n\n@this(\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n inputRadios: GovukRadios,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(headingStr: String,\n form: Form[_],\n model : Seq[ResponsiblePerson],\n section: String,\n hintText: String)(implicit messages: Messages, request: Request[_], appConfig: ApplicationConfig)\n\n@formValues = @{\n model.zipWithIndex.flatMap { case (item, index) =>\n item.personName map { name =>\n RadioItem(\n Text(name.titleName),\n Some(s\"person-$index\"),\n Some(index.toString)\n )\n }\n } :+ RadioItem(\n Text(messages(\"lbl.some.one.else\")),\n Some(\"other\"),\n Some(\"-1\")\n )\n}\n\n@errorSummary(form, Some(Map(\"person\" -> \"person-0\")))\n\n@subtitle(section)\n\n@inputRadios(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = messages(headingStr).toText,\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n hint = Some(messages(hintText).toHint),\n name = \"person\",\n items = formValues\n ).withFormField(form(\"person\"))\n)\n\n@button(id = \"confirm-continue\")\n\n@returnLink(true)\n","usages":["@inputRadios(\n Radios(\n fieldset = Some(Fieldset(\n legend = Some(Legend(\n content = messages(headingStr).toText,\n classes = \"govuk-fieldset__legend--xl\",\n isPageHeading = true\n ))\n )),\n hint = Some(messages(hintText).toHint),\n name = \"person\",\n items = formValues\n ).withFormField(form(\"person\"))\n)"]}
{"repoName":"amls-frontend","templatePath":"app/views/declaration/WhoIsRegisteringCommonView.scala.html","component":"uk/gov/hmrc/govukfrontend/views/html/components/FormWithCSRF#","variableName":"formHelper","templateText":"@*\n * Copyright 2024 HM Revenue & Customs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *@\n\n@import models.responsiblepeople._\n@import config.ApplicationConfig\n@import views.html.components.{Heading, SectionSubtitle, Button, ReturnLink}\n@import views.html.components.forms.ErrorSummary\n@import uk.gov.hmrc.govukfrontend.views.html.components.implicits._\n\n@this(\n errorSummary: ErrorSummary,\n subtitle: SectionSubtitle,\n heading: Heading,\n formHelper: FormWithCSRF,\n inputRadios: GovukRadios,\n button: Button,\n returnLink: ReturnLink\n)\n\n@(headingStr: String,\n form: Form[_],\n model : Seq[ResponsiblePerson],\n section: String,\n hintText: String)(implicit messages: Messages, request: Request[_], appConfig: ApplicationConfig)\n\n@formValues = @{\n model.zipWithIndex.flatMap { case (item, index) =>\n item.personName map { name =>\n RadioItem(\n Text(name.titleName),\n Some(s\"person-$index\"),\n Some(index.toString)\n )\n
@oscarduignan
Copy link
Author

oscarduignan commented Oct 26, 2024

Some notes

  • would blow up if it found usages in non twirl template scala file because it assumes every use it finds of our twirl components will be in scala file
  • the way it finds usages in a template will not find stuff if it has unmatched parens - but then if they had that I think the twirl wouldn't compile anyway
  • seems like semanticdb libraries don't have a scala3 version? Not sure if I didn't look closely enough, but can still compile scala 3 repos using built-in semanticdb support it now has and parse it with scala2 libs
  • would also be good to get the play-frontend-hmrc library version and probably other info from the repo
  • the comment with how to compile project with semanticdb enabled will only work for scala 3 - different incantation would be needed for scala 2 seems I was mistaken, sbt has had a setting for semanticdb since 1.3.0 so this bit is easy
  • interested in using this in combination with some of the stuff I had to clone all repos in org and group them into symlinked folders / in future checkout all repos at a point in time, so that we could look at how usages changed over time
  • interested in labelling the usages as well like "uses our withFormField helpers" and things like that
  • would also be interested in searching across templates separately for people building govuk and hmrc component markup themselves, maybe for that we could naively grep for something like (?s)<[^<]+class="[^"]*(?:govuk|hmrc)-[^"]*" but probably not do more than that to start with (this could also be a label for the matches above "also creating component markup themselves")
  • also need to capture the date file was last updated maybe & date repo was last updated & date of search / using latest changes?
  • idea with json lines is that this can feed into a tool like https://datasette.io/ for exploring it - ala prior go at this using ripgrep regex https://github.com/hmrc/play-frontend-find-usages/tree/645780a8ef63c1bedfd89002ad4ddc317d87638c
  • looking at play-frontend-find-usages (which had some mods to datasette to display the code samples) I notice that I need to capture commit hash and url for the file so you can jump out of the analysis to dig around
  • it's not fast but it's also not too slow and it's comprehensive
  • discovered by checking a 2.13 service that injected stuff is represented in semanticdb slightly differently so have accounted for that
  • I should refactor so I'm not shoving everything into a mutable array and then processing it after, and maybe parallelise stuff a bit

@oscarduignan
Copy link
Author

cat usages.jsonl | sqlite-utils insert usages.db usages - --nl
datasette serve usages.db

And without plugins to render stuff nicely or extra info for faceting, you get quite a useful output already, this might be quite a nice thing to provide to teams I think, as a way of looking up examples of how other people are using out components, where maybe then there's a case to be made for labelling stuff manually as well (maybe by file and component) "my be some patterns to avoid here or things you can do differently, or highlight good examples"

CleanShot 2024-10-27 at 00 44 28@2x

@oscarduignan
Copy link
Author

oscarduignan commented Oct 26, 2024

I guess as well, this is something we could provide teams that they could run locally, could maybe just run periodically on jenkins and offer the latest jsonlines there for people to download and run with a custom datasette locally that has some plugins for rendering stuff - save having to host it anywhere

@oscarduignan
Copy link
Author

current version that I've been hacking on in my own time https://gist.github.com/oscarduignan/9b7b86971ff87ac3829377267bbde2b2 still bit rough

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment