Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Captcha support for content rating form #1331

Draft
wants to merge 1 commit into
base: feature/SD-172-captcha-support
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/nuxt-ripple/components/TideContentRating.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script setup lang="ts">
import { onMounted, ref } from 'vue'
import type { IRplFeatureFlags } from '@dpc-sdp/ripple-tide-api/types'

interface Props {
siteSectionName: string
Expand All @@ -21,6 +22,10 @@ onMounted(() => {
isMounted.value = true
pageUrl.value = window.location.href
})

const featureFlags: IRplFeatureFlags = inject('featureFlags', {})

const captchaConfig = featureFlags.contentRatingCaptchaConfig
</script>

<template>
Expand All @@ -35,6 +40,7 @@ onMounted(() => {
title="Was this page helpful?"
successMessageHTML="Thank you! Your response has been submitted."
errorMessageHTML="We are experiencing a server error. Please try again, otherwise contact us."
:captcha-config="captchaConfig"
>
<template #default="{ value }">
<div class="tide-content-rating__rating">
Expand Down