diff --git a/src/app/api-connector/news.service.ts b/src/app/api-connector/news.service.ts index 00ca52782..340bbad80 100644 --- a/src/app/api-connector/news.service.ts +++ b/src/app/api-connector/news.service.ts @@ -115,15 +115,15 @@ export class NewsService { contributor: string, institution: string, workgroup: string, - simple_vm: boolean, - image_url: string, project_application_id: string, soc_consents: SocialConsent[], + soc_photo_consents: SocialConsent[], file: File ): Observable { const consents_list = soc_consents.map(soc => soc.id) + const photo_consents_list = soc_photo_consents.map(soc => soc.id) const consents = JSON.stringify(consents_list) - + const photo_consents = JSON.stringify(photo_consents_list) const formData: FormData = new FormData() formData.append('file', file) formData.append('title', title) @@ -132,10 +132,9 @@ export class NewsService { formData.append('contributor', contributor) formData.append('institution', institution) formData.append('workgroup', workgroup) - formData.append('simple_vm', JSON.stringify(simple_vm)) formData.append('project_application_id', project_application_id) formData.append('consents', consents) - console.log(formData) + formData.append('photo_consents', photo_consents) return this.http.post(`${ApiSettings.getApiBaseURL()}wagtail-management/testimonial/`, formData, { withCredentials: true @@ -149,12 +148,14 @@ export class NewsService { contributor: string, institution: string, workgroup: string, - simple_vm: boolean, project_application_id: string, - soc_consents: SocialConsent[] + soc_consents: SocialConsent[], + pho_consents: SocialConsent[] ): Observable { const consents_list = soc_consents.map(soc => soc.id) const consents = JSON.stringify(consents_list) + const photo_consents_list = pho_consents.map(soc => soc.id) + const photo_consents = JSON.stringify(photo_consents_list) const testimonialData: any = { title, @@ -163,9 +164,9 @@ export class NewsService { contributor, institution, workgroup, - simple_vm, project_application_id, - consents + consents, + photo_consents } return this.http.post( diff --git a/src/app/shared/shared_modules/testimonial-forms/testimonial-form.component.html b/src/app/shared/shared_modules/testimonial-forms/testimonial-form.component.html index f6764f6c0..0c8231b5e 100644 --- a/src/app/shared/shared_modules/testimonial-forms/testimonial-form.component.html +++ b/src/app/shared/shared_modules/testimonial-forms/testimonial-form.component.html @@ -57,7 +57,7 @@
Add testimonial draft
type="text" [ngClass]="{ 'is-invalid': testimonialFormGroup.controls.testimonial_title?.invalid, - 'is-valid': testimonialFormGroup.controls.testimonial_title?.valid + 'is-valid': testimonialFormGroup.controls.testimonial_title?.valid, }" /> @@ -81,7 +81,7 @@
Add testimonial draft
rows="20" [ngClass]="{ 'is-invalid': testimonialFormGroup.controls.testimonial_text?.invalid, - 'is-valid': testimonialFormGroup.controls.testimonial_text?.valid + 'is-valid': testimonialFormGroup.controls.testimonial_text?.valid, }" class="form-control" name="testimonial_text" @@ -119,7 +119,7 @@
Add testimonial draft
rows="4" [ngClass]="{ 'is-invalid': testimonialFormGroup.controls.testimonial_excerpt?.invalid, - 'is-valid': testimonialFormGroup.controls.testimonial_excerpt?.valid + 'is-valid': testimonialFormGroup.controls.testimonial_excerpt?.valid, }" > @@ -157,7 +157,7 @@
Add testimonial draft
required [ngClass]="{ 'is-invalid': testimonialFormGroup.controls.testimonial_contributor?.invalid, - 'is-valid': testimonialFormGroup.controls.testimonial_contributor?.valid + 'is-valid': testimonialFormGroup.controls.testimonial_contributor?.valid, }" /> @@ -195,7 +195,7 @@
Add testimonial draft
required [ngClass]="{ 'is-invalid': testimonialFormGroup.controls.testimonial_instituton?.invalid, - 'is-valid': testimonialFormGroup.controls.testimonial_institution?.valid + 'is-valid': testimonialFormGroup.controls.testimonial_institution?.valid, }" /> @@ -225,7 +225,7 @@
Add testimonial draft
required [ngClass]="{ 'is-invalid': testimonialFormGroup.controls.testimonial_workgroup?.invalid, - 'is-valid': testimonialFormGroup.controls.testimonial_workgroup?.valid + 'is-valid': testimonialFormGroup.controls.testimonial_workgroup?.valid, }" /> @@ -272,7 +272,7 @@
Add testimonial draft
Please indicate here on which channels/platforms we may publish your testimonial or information about your - testimonial. The website channels are selected by default and cannot be deselected as a channel. + testimonial. Please consider allowing the testimonial and testimonial information to be published on channels + where you do not authorize the use of the photo. The websites channel is selected by default and cannot be + deselected as a channel. +
+ + +
+
+ +
+
+
+
+ + +
+
+ + +
+
+
+ Please indicate here on which channels/platforms we may publish the photography uploaded for the testimonial. + The websites channel is selected by default and cannot be deselected as a channel.
@@ -359,6 +406,18 @@
Add testimonial draft