Merge pull request 'fix(web): space between the documents in the consent text' (#150) from fix/consent-spacing into main
This commit is contained in:
commit
75db473266
3 files changed
+6
-3
No files matched your search
@@ -48,6 +48,9 @@ func TestConsent(t *testing.T) {
|
|||||||
if !strings.Contains(versions, "privacy:") || !strings.Contains(versions, "terms:") || !strings.Contains(form, `name="consent" required`) {
|
if !strings.Contains(versions, "privacy:") || !strings.Contains(versions, "terms:") || !strings.Contains(form, `name="consent" required`) {
|
||||||
t.Fatalf("sign-up form lacks the consent box: versions %q", versions)
|
t.Fatalf("sign-up form lacks the consent box: versions %q", versions)
|
||||||
}
|
}
|
||||||
|
if !strings.Contains(form, "</a> and the <a") {
|
||||||
|
t.Error("the consent text runs the documents' names into the words between them")
|
||||||
|
}
|
||||||
signup := func(consent bool, versions string) (int, map[string]any) {
|
signup := func(consent bool, versions string) (int, map[string]any) {
|
||||||
return e.browser(t).do("POST", "/api/v1/auth/signup", map[string]any{
|
return e.browser(t).do("POST", "/api/v1/auth/signup", map[string]any{
|
||||||
"email": uniq("n") + "@example.test", "password": password, "consent": consent, "consent_versions": versions,
|
"email": uniq("n") + "@example.test", "password": password, "consent": consent, "consent_versions": versions,
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ type SignupConsent struct {
|
|||||||
templ consentLinks(docs []LegalLink) {
|
templ consentLinks(docs []LegalLink) {
|
||||||
for i, d := range docs {
|
for i, d := range docs {
|
||||||
if i > 0 {
|
if i > 0 {
|
||||||
{ i18n.T(ctx, "consent.and") }
|
{ " " + i18n.T(ctx, "consent.and") }
|
||||||
}
|
}
|
||||||
<a href={ templ.SafeURL(d.Href) } target="_blank" rel="noopener" class="underline underline-offset-2">{ i18n.T(ctx, "consent.doc."+d.Kind) }</a>
|
<a href={ templ.SafeURL(d.Href) } target="_blank" rel="noopener" class="underline underline-offset-2">{ i18n.T(ctx, "consent.doc."+d.Kind) }</a>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -356,9 +356,9 @@ func consentLinks(docs []LegalLink) templ.Component {
|
|||||||
for i, d := range docs {
|
for i, d := range docs {
|
||||||
if i > 0 {
|
if i > 0 {
|
||||||
var templ_7745c5c3_Var17 string
|
var templ_7745c5c3_Var17 string
|
||||||
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(i18n.T(ctx, "consent.and"))
|
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(" " + i18n.T(ctx, "consent.and"))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/auth.templ`, Line: 81, Col: 31}
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/web/auth.templ`, Line: 81, Col: 37}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
|
|||||||
Reference in new issue
Block a user