Skip to content

Commit 509b173

Browse files
authored
Feature-8829: Additional consent boxes in attendee form (#8858)
* feature-8829 * feature-8829: Additional consent boxes in attendee form * feature-8829: Additional consent boxes in attendee form format code * feature-8830: Attendee Form: Implement scholarship question with dropdown * feature-8829: Additional consent boxes in attendee form translate for vi * format code * complex field not showing
1 parent a1dcdf7 commit 509b173

File tree

24 files changed

+473
-31
lines changed

24 files changed

+473
-31
lines changed

app/mixins/custom-form.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,28 @@ export default Mixin.create(MutableArray, {
683683
isPublic : false,
684684
event : parent
685685
}),
686+
this.store.createRecord('custom-form', {
687+
name : 'Wikimania photo consent',
688+
fieldIdentifier : 'is_consent_form_field_photo',
689+
formID : _formID,
690+
form : 'attendee',
691+
type : 'checkbox',
692+
isRequired : false,
693+
isIncluded : false,
694+
isPublic : false,
695+
event : parent
696+
}),
697+
this.store.createRecord('custom-form', {
698+
name : 'Wikimania email updates',
699+
fieldIdentifier : 'is_consent_form_field_email',
700+
formID : _formID,
701+
form : 'attendee',
702+
type : 'checkbox',
703+
isRequired : false,
704+
isIncluded : false,
705+
isPublic : false,
706+
event : parent
707+
}),
686708
this.store.createRecord('custom-form', {
687709
name : 'wikiScholarship',
688710
fieldIdentifier : 'wiki_scholarship',

app/models/attendee.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ export default ModelBase.extend({
4646
language_form_2 : attr('string'),
4747
home_wiki : attr('string'),
4848
is_consent_form_field : attr('boolean', { defaultValue: false }),
49+
is_consent_form_field_photo : attr('boolean', { defaultValue: false }),
50+
is_consent_form_field_email : attr('boolean', { defaultValue: false }),
4951
wiki_scholarship : attr('string'),
5052

5153
/**

app/models/custom-form.js

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -83,37 +83,39 @@ export default ModelBase.extend({
8383
speaker: SPEAKER_FORM_FIELDS,
8484

8585
attendee: {
86-
firstname : tn.t('First Name'),
87-
lastname : tn.t('Last Name'),
88-
email : tn.t('Email'),
89-
address : tn.t('Address (Street, Building, Number etc.)'),
90-
city : tn.t('City'),
91-
state : tn.t('State'),
92-
country : tn.t('Country'),
93-
jobTitle : tn.t('Job Title'),
94-
phone : tn.t('Phone'),
95-
taxBusinessInfo : tn.t('Tax Business Info'),
96-
company : tn.t('Organisation'),
97-
workPhone : tn.t('Work Phone'),
98-
website : tn.t('Website'),
99-
blog : tn.t('Blog'),
100-
twitter : tn.t('Twitter'),
101-
facebook : tn.t('Facebook'),
102-
github : tn.t('GitHub'),
103-
instagram : tn.t('Instagram'),
104-
linkedin : tn.t('LinkedIn'),
105-
mastodon : tn.t('Mastodon'),
106-
gender : tn.t('Gender'),
107-
acceptReceiveEmails : tn.t('Email consent'),
108-
acceptVideoRecording : tn.t('Photo & video & text consent'),
109-
acceptShareDetails : tn.t('Partner contact consent'),
110-
ageGroup : tn.t('Age Group'),
111-
isConsentOfRefundPolicy : tn.t('Consent of refund policy'),
112-
homeWiki : tn.t('What is your home wiki'),
113-
languageForm1 : tn.t('What is your native language, or what language are you most fluent in?'),
114-
languageForm2 : tn.t('Are you fluent in any other of the following languages?'),
115-
is_consent_form_field : tn.t('Consent form field'),
116-
wikiScholarship : tn.t('Have you received a Wikimania scholarship?')
86+
firstname : tn.t('First Name'),
87+
lastname : tn.t('Last Name'),
88+
email : tn.t('Email'),
89+
address : tn.t('Address (Street, Building, Number etc.)'),
90+
city : tn.t('City'),
91+
state : tn.t('State'),
92+
country : tn.t('Country'),
93+
jobTitle : tn.t('Job Title'),
94+
phone : tn.t('Phone'),
95+
taxBusinessInfo : tn.t('Tax Business Info'),
96+
company : tn.t('Organisation'),
97+
workPhone : tn.t('Work Phone'),
98+
website : tn.t('Website'),
99+
blog : tn.t('Blog'),
100+
twitter : tn.t('Twitter'),
101+
facebook : tn.t('Facebook'),
102+
github : tn.t('GitHub'),
103+
instagram : tn.t('Instagram'),
104+
linkedin : tn.t('LinkedIn'),
105+
mastodon : tn.t('Mastodon'),
106+
gender : tn.t('Gender'),
107+
acceptReceiveEmails : tn.t('Email consent'),
108+
acceptVideoRecording : tn.t('Photo & video & text consent'),
109+
acceptShareDetails : tn.t('Partner contact consent'),
110+
ageGroup : tn.t('Age Group'),
111+
isConsentOfRefundPolicy : tn.t('Consent of refund policy'),
112+
homeWiki : tn.t('What is your home wiki'),
113+
languageForm1 : tn.t('What is your native language, or what language are you most fluent in?'),
114+
languageForm2 : tn.t('Are you fluent in any other of the following languages?'),
115+
is_consent_form_field : tn.t('Consent form field'),
116+
wikiScholarship : tn.t('Have you received a Wikimania scholarship?'),
117+
is_consent_form_field_photo : tn.t('Wikimania photo consent'),
118+
is_consent_form_field_email : tn.t('Wikimania email updates')
117119
},
118120

119121
ready() {

app/templates/components/forms/orders/attendee-list.hbs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@
6666
{{else}}
6767
{{#if (not field.isComplex)}}
6868
<span class="word-break">{{sanitize (get holder field.identifierPath)}}</span>
69+
{{else}}
70+
<span class="word-break">{{t (get holder field.identifierPath)}}</span>
6971
{{/if}}
7072
{{/if}}
7173
</div>

app/templates/components/forms/orders/order-form.hbs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,20 @@
241241
<span> {{t 'and the'}} </span>
242242
<a href="https://foundation.wikimedia.org/wiki/Policy:Friendly_space_policy">{{t 'Friendly Space Policy'}}</a>
243243
<span> .</span>
244+
{{else if (eq field.fieldIdentifier 'is_consent_form_field_photo')}}
245+
<UiCheckbox
246+
@checked={{get holder field.identifierPath}}
247+
@name={{if field.isRequired (concat field.fieldIdentifier "_required_" index) (concat field.fieldIdentifier "_" index)}}
248+
@onChange={{action (mut (get holder field.identifierPath))}} />
249+
<span>{{t 'I consent to having my photo taken at Wikimania per the'}} </span>
250+
<a href="https://wikimania.wikimedia.org/wiki/2023:Photography_policy">{{t 'photo policy'}}</a>
251+
<span> .</span>
252+
{{else if (eq field.fieldIdentifier 'is_consent_form_field_email')}}
253+
<UiCheckbox
254+
@checked={{get holder field.identifierPath}}
255+
@name={{if field.isRequired (concat field.fieldIdentifier "_required_" index) (concat field.fieldIdentifier "_" index)}}
256+
@onChange={{action (mut (get holder field.identifierPath))}} />
257+
<span>{{t 'I want to receive email updates about future Wikimania editions.'}} </span>
244258
{{else if (eq field.type 'checkbox')}}
245259
{{#if (and (not-eq field.fieldIdentifier "language_form_1") (not-eq field.fieldIdentifier "language_form_2"))}}
246260
<UiCheckbox

translations/bn.po

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11713,3 +11713,23 @@ msgstr "হ্যাঁ, উইকিমিডিয়া অধিভুক্
1171311713
#: app/templates/components/forms/orders/order-form.hbs:209:48
1171411714
msgid "Select your answer"
1171511715
msgstr "আপনার উত্তর নির্বাচন করুন"
11716+
11717+
#: app/models/custom-form.js:116:36
11718+
msgid "Wikimania photo consent"
11719+
msgstr "উইকিমেনিয়া ছবির সম্মতি"
11720+
11721+
#: app/models/custom-form.js:117:36
11722+
msgid "Wikimania email updates"
11723+
msgstr "উইকিমেনিয়া ইমেল আপডেট"
11724+
11725+
#: app/templates/components/forms/orders/order-form.hbs:251:26
11726+
msgid "I consent to having my photo taken at Wikimania per the"
11727+
msgstr "আমি প্রতি উইকিম্যানিয়াতে আমার ছবি তোলার বিষয়ে সম্মতি দিচ্ছি"
11728+
11729+
#: app/templates/components/forms/orders/order-form.hbs:252:91
11730+
msgid "photo policy"
11731+
msgstr "ছবির নীতি"
11732+
11733+
#: app/templates/components/forms/orders/order-form.hbs:259:26
11734+
msgid "I want to receive email updates about future Wikimania editions."
11735+
msgstr "আমি ভবিষ্যতের উইকিম্যানিয়া সংস্করণ সম্পর্কে ইমেল আপডেট পেতে চাই"

translations/de.po

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11728,3 +11728,23 @@ msgstr "Ja, von einem Wikimedia-Partner"
1172811728
#: app/templates/components/forms/orders/order-form.hbs:209:48
1172911729
msgid "Select your answer"
1173011730
msgstr "Wählen Sie Ihre Antwort aus"
11731+
11732+
#: app/models/custom-form.js:116:36
11733+
msgid "Wikimania photo consent"
11734+
msgstr "Einwilligung zum Wikimania-Foto"
11735+
11736+
#: app/models/custom-form.js:117:36
11737+
msgid "Wikimania email updates"
11738+
msgstr "Wikimania-E-Mail-Updates"
11739+
11740+
#: app/templates/components/forms/orders/order-form.hbs:251:26
11741+
msgid "I consent to having my photo taken at Wikimania per the"
11742+
msgstr "Ich bin damit einverstanden, dass mein Foto bei Wikimania gemacht wird"
11743+
11744+
#: app/templates/components/forms/orders/order-form.hbs:252:91
11745+
msgid "photo policy"
11746+
msgstr "Fotorichtlinie"
11747+
11748+
#: app/templates/components/forms/orders/order-form.hbs:259:26
11749+
msgid "I want to receive email updates about future Wikimania editions."
11750+
msgstr "Ich möchte E-Mail-Updates über zukünftige Wikimania-Ausgaben erhalten"

translations/de_DIVEO.po

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11714,3 +11714,23 @@ msgstr ""
1171411714
#: app/templates/components/forms/orders/order-form.hbs:209:48
1171511715
msgid "Select your answer"
1171611716
msgstr ""
11717+
11718+
#: app/models/custom-form.js:116:36
11719+
msgid "Wikimania photo consent"
11720+
msgstr ""
11721+
11722+
#: app/models/custom-form.js:117:36
11723+
msgid "Wikimania email updates"
11724+
msgstr ""
11725+
11726+
#: app/templates/components/forms/orders/order-form.hbs:251:26
11727+
msgid "I consent to having my photo taken at Wikimania per the"
11728+
msgstr ""
11729+
11730+
#: app/templates/components/forms/orders/order-form.hbs:252:91
11731+
msgid "photo policy"
11732+
msgstr ""
11733+
11734+
#: app/templates/components/forms/orders/order-form.hbs:259:26
11735+
msgid "I want to receive email updates about future Wikimania editions."
11736+
msgstr ""

translations/en.po

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11723,3 +11723,23 @@ msgstr "Yes, from a Wikimedia affiliate"
1172311723
#: app/templates/components/forms/orders/order-form.hbs:209:48
1172411724
msgid "Select your answer"
1172511725
msgstr "Select your answer"
11726+
11727+
#: app/models/custom-form.js:116:36
11728+
msgid "Wikimania photo consent"
11729+
msgstr "Wikimania photo consent"
11730+
11731+
#: app/models/custom-form.js:117:36
11732+
msgid "Wikimania email updates"
11733+
msgstr "Wikimania email updates"
11734+
11735+
#: app/templates/components/forms/orders/order-form.hbs:251:26
11736+
msgid "I consent to having my photo taken at Wikimania per the"
11737+
msgstr "I consent to having my photo taken at Wikimania per the"
11738+
11739+
#: app/templates/components/forms/orders/order-form.hbs:252:91
11740+
msgid "photo policy"
11741+
msgstr "photo policy"
11742+
11743+
#: app/templates/components/forms/orders/order-form.hbs:259:26
11744+
msgid "I want to receive email updates about future Wikimania editions."
11745+
msgstr "I want to receive email updates about future Wikimania editions."

translations/es.po

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12070,3 +12070,23 @@ msgstr "Sí, de un afiliado de Wikimedia"
1207012070
#: app/templates/components/forms/orders/order-form.hbs:209:48
1207112071
msgid "Select your answer"
1207212072
msgstr "Seleccione su respuesta"
12073+
12074+
#: app/models/custom-form.js:116:36
12075+
msgid "Wikimania photo consent"
12076+
msgstr "Consentimiento de foto de Wikimania"
12077+
12078+
#: app/models/custom-form.js:117:36
12079+
msgid "Wikimania email updates"
12080+
msgstr "Actualizaciones por correo electrónico de Wikimania"
12081+
12082+
#: app/templates/components/forms/orders/order-form.hbs:251:26
12083+
msgid "I consent to having my photo taken at Wikimania per the"
12084+
msgstr "Doy mi consentimiento para que me tomen una foto en Wikimania según el"
12085+
12086+
#: app/templates/components/forms/orders/order-form.hbs:252:91
12087+
msgid "photo policy"
12088+
msgstr "política de fotos"
12089+
12090+
#: app/templates/components/forms/orders/order-form.hbs:259:26
12091+
msgid "I want to receive email updates about future Wikimania editions."
12092+
msgstr "Quiero recibir actualizaciones por correo electrónico sobre futuras ediciones de Wikimania"

0 commit comments

Comments
 (0)