Skip to content

Commit 4230f4f

Browse files
WEBDEV-7534 Replace reviews recaptcha logo (#34)
* Add recaptcha message to form * Remove duplicated CSS
1 parent ae7041b commit 4230f4f

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

src/review-form.ts

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ export class ReviewForm extends LitElement {
129129
${this.bodyInputTemplate} ${this.hiddenInputsTemplate}
130130
</span>
131131
`}
132-
${this.recoverableErrorTemplate} ${this.actionButtonsTemplate}
132+
${this.recaptchaMessageTemplate} ${this.recoverableErrorTemplate}
133+
${this.actionButtonsTemplate}
133134
</form>`;
134135
}
135136

@@ -205,6 +206,28 @@ export class ReviewForm extends LitElement {
205206
: nothing;
206207
}
207208

209+
private get recaptchaMessageTemplate(): HTMLTemplateResult | typeof nothing {
210+
if (this.bypassRecaptcha) return nothing;
211+
212+
return html`${msg(
213+
html`This site is protected by reCAPTCHA and the Google
214+
<a
215+
target="_blank"
216+
class="inline-link"
217+
href="https://policies.google.com/privacy"
218+
>Privacy Policy</a
219+
>
220+
and
221+
<a
222+
target="_blank"
223+
class="inline-link"
224+
href="https://policies.google.com/terms"
225+
>Terms of Service</a
226+
>
227+
apply.`,
228+
)}`;
229+
}
230+
208231
/** Clickable group of stars */
209232
private get starsInputTemplate(): HTMLTemplateResult {
210233
return html`
@@ -662,6 +685,15 @@ export class ReviewForm extends LitElement {
662685
padding-top: 5px;
663686
}
664687
688+
.inline-link {
689+
color: var(--container-link-color, #4f65f5);
690+
text-decoration: none;
691+
}
692+
693+
.inline-link:hover {
694+
text-decoration: underline;
695+
}
696+
665697
.stars {
666698
display: flex;
667699
flex-direction: row;

0 commit comments

Comments
 (0)