Skip to content

Commit

Permalink
merge dev into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
dweinholz committed Nov 13, 2024
2 parents b056e30 + ab3e64e commit 3c23f7c
Show file tree
Hide file tree
Showing 5 changed files with 121 additions and 56 deletions.
19 changes: 10 additions & 9 deletions src/app/api-connector/news.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<any> {
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)
Expand All @@ -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<any>(`${ApiSettings.getApiBaseURL()}wagtail-management/testimonial/`, formData, {
withCredentials: true
Expand All @@ -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<any> {
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,
Expand All @@ -163,9 +164,9 @@ export class NewsService {
contributor,
institution,
workgroup,
simple_vm,
project_application_id,
consents
consents,
photo_consents
}

return this.http.post<any>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
<a href="{{ OPENSTACK_LINK }}" target="_blank" rel="noopener noreferrer">Click Here! </a>
</div>
<div *ngIf="simple_vm_project">
<div class="alert alert-primary">
This project mode is a beta version. Virtual machines might get lost or can not be started temporarily.
</div>
<div class="alert alert-primary">
If you would like to learn more about Simple VM,
<a href="{{ SIMPLE_VM_LINK }}" target="_blank" rel="noopener noreferrer">Click Here!</a>
Expand Down Expand Up @@ -121,7 +118,8 @@ <h5 class="col-md-6 form-control-label">General Information</h5>
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),
}"
/>
<span class="help-block">Name your project.</span>
Expand Down Expand Up @@ -168,7 +166,7 @@ <h5 class="col-md-6 form-control-label">General Information</h5>
'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),
}"
/>

Expand Down Expand Up @@ -212,7 +210,7 @@ <h5 class="col-md-6 form-control-label">General Information</h5>
'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),
}"
></textarea>
<span class="help-block">Describe what would you want to do in your project.</span>
Expand Down Expand Up @@ -256,7 +254,7 @@ <h5 class="col-md-6 form-control-label">General Information</h5>
'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),
}"
/>
<div class="input-group-append"><span class="input-group-text"> months </span></div>
Expand Down Expand Up @@ -357,7 +355,7 @@ <h5 class="col-md-12 form-control-label">Resources</h5>
style="font-size: 25px"
[ngClass]="{
'icon-arrow-up': groupval.isOpen,
'icon-arrow-down': !groupval.isOpen
'icon-arrow-down': !groupval.isOpen,
}"
></i>
</div>
Expand Down Expand Up @@ -394,7 +392,7 @@ <h5 class="col-md-12 form-control-label">Resources</h5>
appInteger
[ngClass]="{
'is-invalid': name?.invalid,
'is-valid': name?.valid
'is-valid': name?.valid,
}"
/>
<div class="input-group-append">
Expand Down Expand Up @@ -437,7 +435,7 @@ <h5 class="col-md-12 form-control-label">Resources</h5>
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"
Expand All @@ -447,7 +445,7 @@ <h5 class="col-md-12 form-control-label">Resources</h5>
[(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,
}"
/>
</div>
Expand All @@ -462,7 +460,6 @@ <h5 class="col-md-12 form-control-label">Resources</h5>
data-balloon="Storage limit is the sum of extra storage provided by volumes."
data-balloon-pos="right"
data-balloon-length="large"

><i class="icon-question" style="cursor: pointer"></i></i></strong
></label>
<div class="col-md-8">
Expand All @@ -482,7 +479,7 @@ <h5 class="col-md-12 form-control-label">Resources</h5>
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"
/>
Expand Down Expand Up @@ -515,7 +512,7 @@ <h5 class="col-md-12 form-control-label">Resources</h5>
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,
}"
/>
<div class="input-group-append"><span class="input-group-text"> GB </span></div>
Expand Down Expand Up @@ -570,7 +567,7 @@ <h5 class="col-md-12 form-control-label">Resources</h5>
[(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(),
}"
></textarea>
<div id="project_application_comment_feedback" class="invalid-feedback" *ngIf="!checkValidityComment()">
Expand Down Expand Up @@ -621,7 +618,7 @@ <h5 class="col-md-6 form-control-label">Institutional Information</h5>
'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),
}"
/>
<span class="help-block">To which institute do you belong? (Up to 256 characters allowed)</span>
Expand Down Expand Up @@ -654,7 +651,7 @@ <h5 class="col-md-6 form-control-label">Institutional Information</h5>
'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),
}"
/>
<span class="help-block">To which workgroup do you belong? (Up to 256 characters allowed)</span>
Expand All @@ -676,7 +673,7 @@ <h5 class="col-md-6 form-control-label">Additional Information</h5>
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,
}"
>
<ng-select
Expand Down Expand Up @@ -915,7 +912,7 @@ <h5 class="col-md-6 form-control-label">Additional Information</h5>
[(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,
}"
/>
</div>
Expand Down Expand Up @@ -957,7 +954,7 @@ <h5 class="col-md-6 form-control-label">Additional Information</h5>
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"
Expand Down Expand Up @@ -994,7 +991,7 @@ <h5 class="col-md-6 form-control-label">Additional Information</h5>
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"
Expand Down Expand Up @@ -1031,7 +1028,7 @@ <h5 class="col-md-6 form-control-label">Additional Information</h5>
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"
Expand Down Expand Up @@ -1070,7 +1067,7 @@ <h5 class="col-md-6 form-control-label">Additional Information</h5>
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"
Expand Down Expand Up @@ -1106,7 +1103,7 @@ <h5 class="col-md-6 form-control-label">Additional Information</h5>
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"
Expand Down Expand Up @@ -1173,7 +1170,7 @@ <h5 class="col-md-6 form-control-label">Additional Information</h5>
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,
}"
></i>
</div>
Expand Down Expand Up @@ -1497,7 +1494,7 @@ <h6><strong>Platforms</strong></h6>
(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),
}"
/>
<span class="help-block"> </span>Provide a link to the institute or workgroup website of the PI<br />
Expand Down Expand Up @@ -1546,7 +1543,7 @@ <h6><strong>Platforms</strong></h6>
class="alert"
[ngClass]="{
'alert-warning': !unknownPiAffiliationsConfirmation,
'alert-success': unknownPiAffiliationsConfirmation
'alert-success': unknownPiAffiliationsConfirmation,
}"
>
<p>
Expand Down Expand Up @@ -1639,7 +1636,7 @@ <h6><strong>Platforms</strong></h6>
'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),
}"
/>
<p *ngIf="!application?.project_application_pi_approved && !is_validation">
Expand Down Expand Up @@ -1711,7 +1708,7 @@ <h6><strong>Platforms</strong></h6>
class="col-md-8 alert"
[ngClass]="{
'alert-warning': !unknownPiAffiliationsConfirmation,
'alert-success': unknownPiAffiliationsConfirmation
'alert-success': unknownPiAffiliationsConfirmation,
}"
>
<p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <h2 class="h3 mb-3">Step 1: Register for de.NBI Cloud Portal</h2>
data-coreui-toggle="tooltip"
title="Copy Cloud Register Link to clipboard"
>
Copy Key
Copy Link
</button>
</div>
</div>
Expand Down Expand Up @@ -59,7 +59,7 @@ <h2 class="h3 mb-3">Step 2: Share Invitation Links</h2>
data-coreui-toggle="tooltip"
title="Copy Invitation Link to clipboard"
>
Copy Key
Copy Link
</button>
</div>
</div>
Expand Down
Loading

0 comments on commit 3c23f7c

Please sign in to comment.