From 7c8f0ecb1694713f39a4ff66ba8d7914a14f82e4 Mon Sep 17 00:00:00 2001 From: vktrrdk Date: Tue, 29 Oct 2024 15:16:33 +0000 Subject: [PATCH 1/5] wip: project types, publication consents for images and contact mail --- src/app/api-connector/news.service.ts | 16 ++-- .../testimonial-form.component.html | 75 +++++++++++++++++-- .../testimonial-form.component.ts | 68 ++++++++++------- 3 files changed, 121 insertions(+), 38 deletions(-) diff --git a/src/app/api-connector/news.service.ts b/src/app/api-connector/news.service.ts index 00ca52782a..f3dce8b673 100644 --- a/src/app/api-connector/news.service.ts +++ b/src/app/api-connector/news.service.ts @@ -119,11 +119,14 @@ export class NewsService { image_url: string, project_application_id: string, soc_consents: SocialConsent[], - file: File + soc_photo_consents: SocialConsent[], + file: File, + contact_mail: string ): 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) @@ -135,7 +138,8 @@ export class NewsService { 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) + formData.append('contact_mail', contact_mail) return this.http.post(`${ApiSettings.getApiBaseURL()}wagtail-management/testimonial/`, formData, { withCredentials: true @@ -151,7 +155,8 @@ export class NewsService { workgroup: string, simple_vm: boolean, project_application_id: string, - soc_consents: SocialConsent[] + soc_consents: SocialConsent[], + photo_consents: SocialConsent[] ): Observable { const consents_list = soc_consents.map(soc => soc.id) const consents = JSON.stringify(consents_list) @@ -165,7 +170,8 @@ export class NewsService { 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 f6764f6c01..3d1d3311cd 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
From 7ec3437b7bf11d657b93f443faee1e460a89f4ac Mon Sep 17 00:00:00 2001 From: dweinholz Date: Mon, 11 Nov 2024 09:20:38 +0100 Subject: [PATCH 5/5] feat(SimpleVM):removed beta label --- .../application-formular.component.html | 55 +++++++++---------- 1 file changed, 26 insertions(+), 29 deletions(-) diff --git a/src/app/applications/application-formular/application-formular.component.html b/src/app/applications/application-formular/application-formular.component.html index 6ca41054ab..730de38ea0 100644 --- a/src/app/applications/application-formular/application-formular.component.html +++ b/src/app/applications/application-formular/application-formular.component.html @@ -19,9 +19,6 @@ Click Here!
-
- This project mode is a beta version. Virtual machines might get lost or can not be started temporarily. -
If you would like to learn more about Simple VM, Click Here! @@ -121,7 +118,8 @@
General Information
form.controls.project_application_name?.touched), 'is-valid': form.controls.project_application_name?.valid && - (form.controls.project_application_name?.dirty || form.controls.project_application_name?.touched) + (form.controls.project_application_name?.dirty || + form.controls.project_application_name?.touched), }" /> Name your project. @@ -168,7 +166,7 @@
General Information
'is-valid': form.controls.project_application_shortname?.valid && (form.controls.project_application_shortname?.dirty || - form.controls.project_application_shortname?.touched) + form.controls.project_application_shortname?.touched), }" /> @@ -212,7 +210,7 @@
General Information
'is-valid': form.controls.project_application_description?.valid && (form.controls.project_application_description?.dirty || - form.controls.project_application_description?.touched) + form.controls.project_application_description?.touched), }" > Describe what would you want to do in your project. @@ -256,7 +254,7 @@
General Information
'is-valid': form.controls.project_application_lifetime?.valid && (form.controls.project_application_lifetime?.dirty || - form.controls.project_application_lifetime?.touched) + form.controls.project_application_lifetime?.touched), }" />
months
@@ -357,7 +355,7 @@
Resources
style="font-size: 25px" [ngClass]="{ 'icon-arrow-up': groupval.isOpen, - 'icon-arrow-down': !groupval.isOpen + 'icon-arrow-down': !groupval.isOpen, }" >
@@ -394,7 +392,7 @@
Resources
appInteger [ngClass]="{ 'is-invalid': name?.invalid, - 'is-valid': name?.valid + 'is-valid': name?.valid, }" />
@@ -437,7 +435,7 @@
Resources
class="form-control" id="id_project_application_volume_counter" name="project_application_volume_counter" - data-test-id="project_application_volume_counter" + data-test-id="project_application_volume_counter" placeholder="e.g. 20" type="number" min="0" @@ -447,7 +445,7 @@
Resources
[(ngModel)]="application.project_application_volume_counter" [ngClass]="{ 'is-invalid': form.controls.project_application_volume_counter?.invalid, - 'is-valid': form.controls.project_application_volume_counter?.valid + 'is-valid': form.controls.project_application_volume_counter?.valid, }" />
@@ -462,7 +460,6 @@
Resources
data-balloon="Storage limit is the sum of extra storage provided by volumes." data-balloon-pos="right" data-balloon-length="large" - >
@@ -482,7 +479,7 @@
Resources
appMinAmount="1" [ngClass]="{ 'is-invalid': form.controls.project_application_volume_limit?.invalid, - 'is-valid': form.controls.project_application_volume_limit?.valid + 'is-valid': form.controls.project_application_volume_limit?.valid, }" [disabled]="form.controls.project_application_volume_counter?.value === 0" /> @@ -515,7 +512,7 @@
Resources
appMinAmount="0" [ngClass]="{ 'is-invalid': form.controls.project_application_object_storage?.invalid, - 'is-valid': form.controls.project_application_object_storage?.valid + 'is-valid': form.controls.project_application_object_storage?.valid, }" />
GB
@@ -570,7 +567,7 @@
Resources
[(ngModel)]="application.project_application_comment" [ngClass]="{ 'is-invalid': form.controls.project_application_comment?.invalid || !checkValidityComment(), - 'is-valid': form.controls.project_application_comment?.valid && checkValidityComment() + 'is-valid': form.controls.project_application_comment?.valid && checkValidityComment(), }" >
@@ -621,7 +618,7 @@
Institutional Information
'is-valid': form.controls.project_application_institute?.valid && (form.controls.project_application_institute?.dirty || - form.controls.project_application_institute?.touched) + form.controls.project_application_institute?.touched), }" /> To which institute do you belong? (Up to 256 characters allowed) @@ -654,7 +651,7 @@
Institutional Information
'is-valid': form.controls.project_application_workgroup?.valid && (form.controls.project_application_workgroup?.dirty || - form.controls.project_application_workgroup?.touched) + form.controls.project_application_workgroup?.touched), }" /> To which workgroup do you belong? (Up to 256 characters allowed) @@ -676,7 +673,7 @@
Additional Information
application?.project_application_edam_terms?.length > 10, 'success-border': application?.project_application_edam_terms?.length > 0 && - application?.project_application_edam_terms?.length <= 10 + application?.project_application_edam_terms?.length <= 10, }" > Additional Information [(ngModel)]="application.project_application_cloud_service_user_number" [ngClass]="{ 'is-invalid': form.controls.project_application_cloud_service_user_number?.invalid, - 'is-valid': form.controls.project_application_cloud_service_user_number?.valid + 'is-valid': form.controls.project_application_cloud_service_user_number?.valid, }" />
@@ -957,7 +954,7 @@
Additional Information
minlength="2" [ngClass]="{ 'is-invalid': form.controls.project_application_horizon2020?.invalid, - 'is-valid': form.controls.project_application_horizon2020?.valid + 'is-valid': form.controls.project_application_horizon2020?.valid, }" [(ngModel)]="application.project_application_horizon2020" placeholder="Name of the project" @@ -994,7 +991,7 @@
Additional Information
minlength="2" [ngClass]="{ 'is-invalid': form.controls.project_application_elixir_project?.invalid, - 'is-valid': form.controls.project_application_elixir_project?.valid + 'is-valid': form.controls.project_application_elixir_project?.valid, }" [(ngModel)]="application.project_application_elixir_project" placeholder="Name of the project" @@ -1031,7 +1028,7 @@
Additional Information
minlength="2" [ngClass]="{ 'is-invalid': form.controls.project_application_dfg?.invalid, - 'is-valid': form.controls.project_application_dfg?.valid + 'is-valid': form.controls.project_application_dfg?.valid, }" [(ngModel)]="application.project_application_dfg" placeholder="Name of the project" @@ -1070,7 +1067,7 @@
Additional Information
minlength="2" [ngClass]="{ 'is-invalid': form.controls.project_application_bmbf_project?.invalid, - 'is-valid': form.controls.project_application_bmbf_project?.valid + 'is-valid': form.controls.project_application_bmbf_project?.valid, }" [(ngModel)]="application.project_application_bmbf_project" placeholder="Name of the project" @@ -1106,7 +1103,7 @@
Additional Information
minlength="2" [ngClass]="{ 'is-invalid': form.controls.project_application_nfdi?.invalid, - 'is-valid': form.controls.project_application_nfdi?.valid + 'is-valid': form.controls.project_application_nfdi?.valid, }" [(ngModel)]="application.project_application_nfdi" placeholder="Name of the project" @@ -1173,7 +1170,7 @@
Additional Information
style="font-size: 25px" [ngClass]="{ 'icon-arrow-up': dissemination_information_accordion.isOpen, - 'icon-arrow-down': !dissemination_information_accordion.isOpen + 'icon-arrow-down': !dissemination_information_accordion.isOpen, }" >
@@ -1497,7 +1494,7 @@
Platforms
(form.controls.project_application_pi_link_input?.valid || application.project_application_pi_link === '') && (form.controls.project_application_pi_link_input?.dirty || - form.controls.project_application_pi_link_input?.touched) + form.controls.project_application_pi_link_input?.touched), }" /> Provide a link to the institute or workgroup website of the PI
@@ -1546,7 +1543,7 @@
Platforms
class="alert" [ngClass]="{ 'alert-warning': !unknownPiAffiliationsConfirmation, - 'alert-success': unknownPiAffiliationsConfirmation + 'alert-success': unknownPiAffiliationsConfirmation, }" >

@@ -1639,7 +1636,7 @@

Platforms
'is-valid': form.controls.project_application_pi_email?.valid && (form.controls.project_application_pi_email?.dirty || - form.controls.project_application_pi_email?.touched) + form.controls.project_application_pi_email?.touched), }" />

@@ -1711,7 +1708,7 @@

Platforms
class="col-md-8 alert" [ngClass]="{ 'alert-warning': !unknownPiAffiliationsConfirmation, - 'alert-success': unknownPiAffiliationsConfirmation + 'alert-success': unknownPiAffiliationsConfirmation, }" >