Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix contact roles #1173

Merged
merged 3 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ <h1 class="mb-40 wide-text font-weight-bold" *ngIf="!contactId">New organization
<div *ngIf="invalidForm" class="error-message d-flex p-16 mb-30 line-height-150">
<img src="./../../../../content/images/error-sign.svg" alt="Warning sign" class="p-8" />
<div>
<div class="mb-8 font-size-12 wide-text-25 font-weight-bold">
<div class="mb-8 font-size-14 wide-text-25 font-weight-bold">
Your changes cannot be saved
</div>
<div class="font-size-12 wide-text-25">
<div class="font-size-14 wide-text-25">
Please fix the issues with the form before trying to save again
</div>
</div>
Expand Down Expand Up @@ -80,7 +80,7 @@ <h3 class="mb-20 font-size-16 font-weight-bold">Name & email domain</h3>
/>
<ng-template #validEmailDomain>
<small class="wide-text font-size-12 color-gray"
>The email domain is the remaining address after the @ symbol eg: orcid.org or website.com</small
>The email domain is the remaining address after the &#64; symbol eg: orcid.org or website.com</small
>
</ng-template>
<div *ngIf="editForm.get('emailDomain').invalid && editForm.get('emailDomain').touched; else validEmailDomain">
Expand Down Expand Up @@ -117,7 +117,9 @@ <h3 class="mb-20 font-size-16 font-weight-bold">Billing address</h3>
</div>
</div>
<div class="form-group mb-20">
<label class="wide-text font-size-12 font-weight-bold" [ngClass]="{ 'text-danger': editForm.get('city').invalid && editForm.get('city').touched }"
<label
class="wide-text font-size-12 font-weight-bold"
[ngClass]="{ 'text-danger': editForm.get('city').invalid && editForm.get('city').touched }"
>City</label
>
<input
Expand Down Expand Up @@ -155,9 +157,7 @@ <h3 class="mb-20 font-size-16 font-weight-bold">Billing address</h3>
}"
>
<option selected [ngValue]="null">-- No state or province --</option>
<option *ngFor="let state of states" [ngValue]="state.name" class="form-field-text-color-default">{{
state.name
}}</option>
<option *ngFor="let state of states" [ngValue]="state.name" class="form-field-text-color-default">{{ state.name }}</option>
</select>
</div>
<div class="form-group mb-20">
Expand Down Expand Up @@ -461,7 +461,7 @@ <h2 class="mb-10 wide-text font-size-24 line-height-150">Main contact</h2>
class="wide-text font-size-12 text-danger"
*ngIf="editForm.get('contactEmail').errors.pattern && !editForm.get('contactEmail').errors.maxlength"
>
Please enter a valid email address, for example contactus@website.com
Please enter a valid email address, for example contactus&#64;website.com
</small>
<small class="wide-text font-size-12 text-danger" *ngIf="editForm.get('contactEmail').errors.maxlength">
Email is too long. Please use 80 characters or less.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<div *ngIf="memberData" class="h-100 p-16 line-height-normal">
<div class="font-size-14">
Back to <a routerLink="" class="font-weight-normal text-decoration-underline">{{ memberData.publicDisplayName }}</a>
</div>
<hr class="mb-40" />
<div class="edit-org-label mb-8 font-size-18 color-gray" *ngIf="contactId">Edit contact</div>
<h1 class="mb-40 wide-text font-weight-bold" *ngIf="contactId && contact">{{ contact.name }}</h1>
<div class="edit-org-label mb-8 font-size-18 color-gray" *ngIf="!contactId">Add new contact</div>
<h1 class="mb-40 wide-text font-italic" *ngIf="!contactId">New contact</h1>
<div class="font-size-14">
Back to <a routerLink="" class="font-weight-normal text-decoration-underline">{{ memberData.publicDisplayName }}</a>
</div>
<hr class="mb-40" />
<div class="edit-org-label mb-8 font-size-18 color-gray" *ngIf="contactId">Edit contact</div>
<h1 class="mb-40 wide-text font-weight-bold" *ngIf="contactId && contact">{{ contact.name }}</h1>
<div class="edit-org-label mb-8 font-size-18 color-gray" *ngIf="!contactId">Add new contact</div>
<h1 class="mb-40 wide-text font-italic" *ngIf="!contactId">New contact</h1>
<div class="d-flex">
<form (ngSubmit)="save()" name="editForm" role="form" [formGroup]="editForm" class="w-66">
<div *ngIf="invalidForm" class="error-message d-flex p-16 mb-20 line-height-150">
<img src="./../../../../content/images/error-sign.svg" alt="Warning sign" class="p-8" />
<div>
<div class="mb-8 font-size-12 wide-text font-weight-bold">
<div class="mb-8 font-size-14 wide-text font-weight-bold">
Your changes cannot be saved
</div>
<div class="font-size-12 wide-text">
<div class="font-size-14 wide-text">
Please fix the issues with the contact form before trying to save again
</div>
</div>
Expand Down Expand Up @@ -51,7 +51,9 @@ <h3 class="mb-20 wide-text">Contact details</h3>
</div>
</div>
<div class="form-group mb-20">
<label class="wide-text font-size-12 font-weight-bold mb-1" [ngClass]="{ 'text-danger': editForm.get('title').invalid }">Job title</label>
<label class="wide-text font-size-12 font-weight-bold mb-1" [ngClass]="{ 'text-danger': editForm.get('title').invalid }"
>Job title</label
>
<input
type="text"
class="form-control"
Expand Down Expand Up @@ -90,7 +92,7 @@ <h3 class="mb-20 wide-text">Contact details</h3>
class="wide-text font-size-12 text-danger"
*ngIf="editForm.get('email').errors.pattern && !editForm.get('email').errors.maxlength && editForm.get('email').touched"
>
Please enter a valid email address, for example contactus@website.com
Please enter a valid email address, for example contactus&#64;website.com
</small>
<small class="wide-text font-size-12 text-danger" *ngIf="editForm.get('email').errors.maxlength">
Email is too long. Please use 80 characters or less.
Expand All @@ -101,7 +103,9 @@ <h3 class="mb-20 wide-text">Contact details</h3>
</div>
</div>
<div class="form-group mb-30">
<label class="wide-text font-size-12 font-weight-bold mb-1" [ngClass]="{ 'text-danger': editForm.get('phone').invalid && editForm.get('phone').dirty }"
<label
class="wide-text font-size-12 font-weight-bold mb-1"
[ngClass]="{ 'text-danger': editForm.get('phone').invalid && editForm.get('phone').dirty }"
>Phone</label
>
<input
Expand Down Expand Up @@ -138,10 +142,10 @@ <h3 class="mb-16 mr-8">Roles <span class="font-size-12 font-weight-normal">(Requ
<div class="warning-message d-flex p-16 mb-40">
<img src="./../../../../content/images/warning-sign.svg" alt="Warning sign" class="p-8" />
<div>
<div class="mb-8 font-size-12 wide-text font-weight-bold">
<div class="mb-8 font-size-14 wide-text font-weight-bold">
Please note
</div>
<div class="font-size-12 wide-text line-height-150">
<div class="font-size-14 wide-text line-height-150">
Changes made to organization contacts can take up to 48 hours to be reflected in the organization contact list.
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ <h1 class="font-weight-bold mb-3 wide-text">{{ memberData.publicDisplayName }}</
<div *ngIf="invalidForm" class="warning d-flex w-75 p-3 mb-3">
<img src="./../../../../content/images/error-sign.svg" alt="Warning sign" class="p-2" />
<div>
<div class="mb-2 font-size-12 wide-text font-weight-bold line-height-150">
<div class="mb-2 font-size-14 wide-text font-weight-bold line-height-150">
Your changes cannot be saved
</div>
<div class="font-size-12 wide-text line-height-150">
<div class="font-size-14 wide-text line-height-150">
Please fix the issues with the public details before trying to save again
</div>
</div>
Expand Down Expand Up @@ -68,7 +68,7 @@ <h3 class="mb-20 font-size-16 font-weight-bold">Organization name</h3>
</div>
</div>
</div>

<!-- Billing address -->

<h3 class="mb-20 font-size-16 font-weight-bold">Billing address</h3>
Expand Down Expand Up @@ -96,7 +96,9 @@ <h3 class="mb-20 font-size-16 font-weight-bold">Billing address</h3>
</div>
</div>
<div class="form-group mb-20">
<label class="wide-text font-size-12 font-weight-bold" [ngClass]="{ 'text-danger': editForm.get('city').invalid && editForm.get('city').touched }"
<label
class="wide-text font-size-12 font-weight-bold"
[ngClass]="{ 'text-danger': editForm.get('city').invalid && editForm.get('city').touched }"
>City</label
>
<input
Expand Down Expand Up @@ -134,9 +136,7 @@ <h3 class="mb-20 font-size-16 font-weight-bold">Billing address</h3>
}"
>
<option selected [ngValue]="null">-- No state or province --</option>
<option *ngFor="let state of states" [ngValue]="state.name" class="form-field-text-color-default">{{
state.name
}}</option>
<option *ngFor="let state of states" [ngValue]="state.name" class="form-field-text-color-default">{{ state.name }}</option>
</select>
</div>
<div class="form-group mb-20">
Expand All @@ -145,12 +145,7 @@ <h3 class="mb-20 font-size-16 font-weight-bold">Billing address</h3>
[ngClass]="{ 'text-danger': editForm.get('country').invalid && editForm.get('country').dirty }"
>Country</label
>
<input
readonly
class="form-control font-size-14 wide-text-25 w-75"
name="country"
formControlName="country"
/>
<input readonly class="form-control font-size-14 wide-text-25 w-75" name="country" formControlName="country" />
</div>
<div class="form-group mb-30">
<label
Expand Down Expand Up @@ -223,23 +218,29 @@ <h3 class="font-weight-bold font-size-16 mb-10">
<!-- PUBLIC DETAILS -->

<h2 class="wide-text font-size-24 ">Public details</h2>
<div class=" wide-text-25 mb-20 font-size-14 line-height-150">Organization information to be displayed publicly, such as on the <a href="{{ MEMBER_LIST_URL }} " target="_blank">ORCID member list</a></div>
<div class=" wide-text-25 mb-20 font-size-14 line-height-150">
Organization information to be displayed publicly, such as on the
<a href="{{ MEMBER_LIST_URL }} " target="_blank">ORCID member list</a>
</div>
<div class="mb-5">
<div class="form-group w-75">
<label
class="wide-text font-size-12"
[ngClass]="
{ 'text-danger': editForm.get('publicName').invalid && editForm.get('publicName').touched && editForm.get('publicName').dirty }"
>Public display name</label>
<label
class="wide-text font-size-12"
[ngClass]="{
'text-danger': editForm.get('publicName').invalid && editForm.get('publicName').touched && editForm.get('publicName').dirty
}"
>Public display name</label
>
<input
type="text"
class="form-control"
name="publicName"
(input)="editForm.get('publicName').markAsUntouched()"
formControlName="publicName"
[ngClass]="
{ 'text-danger': editForm.get('publicName').invalid && editForm.get('publicName').touched && editForm.get('publicName').dirty,
'input-field-default-border': !editForm.get('publicName').touched || !editForm.get('publicName').dirty }"
[ngClass]="{
'text-danger': editForm.get('publicName').invalid && editForm.get('publicName').touched && editForm.get('publicName').dirty,
'input-field-default-border': !editForm.get('publicName').touched || !editForm.get('publicName').dirty
}"
/>
<div *ngIf="editForm.get('publicName').invalid">
<small class="wide-text font-size-12 form-text text-danger" *ngIf="editForm.get('publicName').errors.required">
Expand Down Expand Up @@ -320,11 +321,13 @@ <h2 class="wide-text font-size-24 ">Public details</h2>
}"
/>
<ng-template #validEmail>
<small class="wide-text font-size-12 color-gray">Emails should be in the standard format e.g. [email protected]</small>
<small class="wide-text font-size-12 color-gray"
>Emails should be in the standard format e.g. contactus&#64;website.com</small
>
</ng-template>
<div *ngIf="editForm.get('email').invalid && editForm.get('email').touched; else validEmail">
<small class="wide-text font-size-12 text-danger" *ngIf="editForm.get('email').errors.pattern">
Please enter a valid email address, for example contactus@website.com
Please enter a valid email address, for example contactus&#64;website.com
</small>
<div>
<small class="wide-text font-size-12 text-danger" *ngIf="editForm.get('email').errors.maxlength">
Expand Down Expand Up @@ -359,7 +362,10 @@ <h4 class="w-33 font-size-14">Type</h4>
<div class="w-66 line-height-150">{{ orgId }}</div>
<div class="w-33 line-height-150">{{ orgIdType }}</div>
</li>
<hr *ngIf="!(i == objectKeys(memberData.orgIds).length - 1 && ii == memberData.orgIds[orgIdType].length - 1)" class="mb-0 mt-0"/>
<hr
*ngIf="!(i == objectKeys(memberData.orgIds).length - 1 && ii == memberData.orgIds[orgIdType].length - 1)"
class="mb-0 mt-0"
/>
</div>
</ul>
</div>
Expand Down
Loading
Loading