Feature/consent banner (#21)

* feat: add consent banner requirement for signers (B6)

- Add REQUIRE_CONSENT_KEY to AccountConfig for per-account toggle
- Add consent_given event type to SubmissionEvent for audit trail
- Add consent checkbox UI on last step of signing form (form.vue)
- Add isLastStep computed property and onConsentChange method
- Create API endpoint (submitter_consents#create) to record consent
- Add requireConsent prop passing from server via data attribute
- Add settings toggle in Account preferences page
- Add i18n translations for all 14 languages (JS + Rails)
- Submit button disabled until consent checkbox is checked

* fix: add REQUIRE_CONSENT_KEY to AccountConfigsController ALLOWED_KEYS

* fix: keep consent checkbox visible after checking (don't remove from DOM)

* fix: bind checkbox checked state to consentAccepted for step navigation sync

* fix: guard submitStep() against consent bypass via child component @submit events
pull/639/head
developbob 1 week ago committed by GitHub
parent 4f21ce22d2
commit 467b190c1a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -27,6 +27,7 @@ class AccountConfigsController < ApplicationController
AccountConfig::DOCUMENT_FILENAME_FORMAT_KEY,
AccountConfig::ENABLE_MCP_KEY,
AccountConfig::IP_ALLOWLIST_KEY,
AccountConfig::REQUIRE_CONSENT_KEY
AccountConfig::AUTO_ARCHIVE_DAYS_KEY,
AccountConfig::REQUIRE_CONSENT_KEY,
AccountConfig::REQUIRE_ID_VERIFICATION_KEY

@ -1685,6 +1685,12 @@ export default {
return this.$refs.areas.scrollIntoArea(area)
},
async submitStep (e) {
if (this.requireConsent && this.isLastStep && !this.consentAccepted) {
return
}
this.isSubmitting = true
const forceComplete = e?.submitter?.getAttribute('name') === 'completed'
if (this.requireConsent && !this.consentAccepted && (this.isLastStep || forceComplete)) {

Loading…
Cancel
Save