Skip to content

Commit 4e0321e

Browse files
authored
Merge pull request #225 from hmrc/DL-17676-utr-input-mode
DL-17676: adds numeric inputmode and pattern to utr
2 parents 07496cf + aeaa0c7 commit 4e0321e

9 files changed

+47
-20
lines changed

app/views/business_lookup_LLP.scala.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ <h2 class="govuk-heading-s">@Messages("bc.business-verification.coUTRFieldpsaUTR
103103
label = Label(
104104
content = Text(Messages("bc.business-verification.coUTRFieldpsaUTR")),
105105
classes = "govuk-visually-hidden"
106+
),
107+
attributes = Map(
108+
"inputmode" -> "numeric",
109+
"pattern" -> "[0-9]*"
106110
)
107111
).withFormField(limitedLiabilityPartnershipForm("psaUTR"))
108112
)

app/views/business_lookup_LP.scala.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ <h2 class="govuk-heading-s">@Messages("bc.business-verification.coUTRFieldpsaUTR
102102
label = Label(
103103
content = Text(Messages("bc.business-verification.coUTRFieldpsaUTR")),
104104
classes = "govuk-visually-hidden"
105+
),
106+
attributes = Map(
107+
"inputmode" -> "numeric",
108+
"pattern" -> "[0-9]*"
105109
)
106110
).withFormField(limitedPartnershipForm("psaUTR"))
107111
)

app/views/business_lookup_LTD.scala.html

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -102,18 +102,22 @@ <h2 class="govuk-heading-s">@Messages("bc.business-verification.coUTRField")</h2
102102
content = Text(Messages("bc.business-verification.coUTRField")),
103103
classes = "govuk-visually-hidden"
104104
),
105-
hint = Some(Hint(
106-
content = HtmlContent(
107-
s"""
108-
<p class="govuk-body govuk-hint">${Messages("bc.business-verification.utr.corporationUTR")}</p>
109-
<p class="govuk-body govuk-hint">
110-
<a class="govuk-link" rel="noreferrer noopener" target="_blank" href="https://www.gov.uk/find-utr-number">
111-
${Messages("bc.business-verification.utr.corporationUTRLink")}
112-
</a>
113-
</p>
114-
"""
115-
)
116-
)),
105+
hint = Some(Hint(
106+
content = HtmlContent(
107+
s"""
108+
<p class="govuk-body govuk-hint">${Messages("bc.business-verification.utr.corporationUTR")}</p>
109+
<p class="govuk-body govuk-hint">
110+
<a class="govuk-link" rel="noreferrer noopener" target="_blank" href="https://www.gov.uk/find-utr-number">
111+
${Messages("bc.business-verification.utr.corporationUTRLink")}
112+
</a>
113+
</p>
114+
"""
115+
)
116+
)),
117+
attributes = Map(
118+
"inputmode" -> "numeric",
119+
"pattern" -> "[0-9]*"
120+
)
117121
).withFormField(limitedCompanyForm("cotaxUTR"))
118122
)
119123

app/views/business_lookup_NRL.scala.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ <h2 class="govuk-heading-s">@Messages("bc.business-verification.coUTRFieldsaUTR"
107107
label = Label(
108108
content = Text(Messages("bc.business-verification.coUTRFieldsaUTR")),
109109
classes = "govuk-visually-hidden"
110+
),
111+
attributes = Map(
112+
"inputmode" -> "numeric",
113+
"pattern" -> "[0-9]*"
110114
)
111115
).withFormField(nrlForm("saUTR"))
112116
)

app/views/business_lookup_OBP.scala.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ <h2 class="govuk-heading-s">@Messages("bc.business-verification.coUTRFieldpsaUTR
102102
label = Label(
103103
content = Text(Messages("bc.business-verification.coUTRFieldpsaUTR")),
104104
classes = "govuk-visually-hidden"
105+
),
106+
attributes = Map(
107+
"inputmode" -> "numeric",
108+
"pattern" -> "[0-9]*"
105109
)
106110
).withFormField(ordinaryBusinessPartnershipForm("psaUTR"))
107111
)

app/views/business_lookup_SOP.scala.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ <h2 class="govuk-heading-s">@Messages("bc.business-verification.coUTRFieldsaUTR"
111111
label = Label(
112112
content = Text(Messages("bc.business-verification.coUTRFieldsaUTR")),
113113
classes = "govuk-visually-hidden"
114+
),
115+
attributes = Map(
116+
"inputmode" -> "numeric",
117+
"pattern" -> "[0-9]*"
114118
)
115119
).withFormField(soleTraderForm("saUTR"))
116120
)

app/views/business_lookup_UIB.scala.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,12 @@ <h2 class="govuk-heading-s">@Messages("bc.business-verification.coUTRField")</h2
108108
</a>
109109
</p>
110110
"""
111-
)
112-
))
113-
111+
)
112+
)),
113+
attributes = Map(
114+
"inputmode" -> "numeric",
115+
"pattern" -> "[0-9]*"
116+
)
114117
).withFormField(unincorporatedBodyForm("cotaxUTR"))
115118
)
116119

project/AppDependencies.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ object AppDependencies {
2121

2222
val compile: Seq[ModuleID] = Seq(
2323
ws,
24-
"uk.gov.hmrc" %% "bootstrap-frontend-play-30" % "10.1.0",
24+
"uk.gov.hmrc" %% "bootstrap-frontend-play-30" % "10.3.0",
2525
"uk.gov.hmrc" %% "domain-play-30" % "11.0.0",
26-
"uk.gov.hmrc" %% "play-partials-play-30" % "10.1.0",
27-
"uk.gov.hmrc" %% "play-frontend-hmrc-play-30" % "12.8.0",
26+
"uk.gov.hmrc" %% "play-partials-play-30" % "10.2.0",
27+
"uk.gov.hmrc" %% "play-frontend-hmrc-play-30" % "12.18.0",
2828
"uk.gov.hmrc" %% "http-caching-client-play-30" % "12.2.0",
2929
)
3030

3131
val test: Seq[ModuleID] = Seq(
32-
"uk.gov.hmrc" %% "bootstrap-test-play-30" % "10.1.0" % Test
32+
"uk.gov.hmrc" %% "bootstrap-test-play-30" % "10.3.0" % Test
3333
)
3434
val itDependencies: Seq[ModuleID] = Seq()
3535
}

project/plugins.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.24.0")
2121

2222
addSbtPlugin("uk.gov.hmrc" % "sbt-distributables" % "2.6.0")
2323

24-
addSbtPlugin("org.playframework" % "sbt-plugin" % "3.0.8")
24+
addSbtPlugin("org.playframework" % "sbt-plugin" % "3.0.9")
2525

2626
addSbtPlugin("org.scoverage" %% "sbt-scoverage" % "2.3.1")
2727

0 commit comments

Comments
 (0)