Project

General

Profile

1
<ng-template #buttons>
2
  <!--<a class="portal-link uk-margin-small-right" (click)="privacy()">Privacy policy statement</a>-->
3
  <button class="uk-button uk-margin-small-right" (click)="resetMessages(); resetForm()">Cancel</button>
4
  <button *ngIf="enabled && (hasChanged || affiliationsChanged)" class="uk-button uk-button-primary" (click)="resetMessages(); updateCurator()">Save</button>
5
  <button *ngIf="!enabled || (!hasChanged && !affiliationsChanged)" class="uk-button uk-button-default" disabled>Save</button>
6
</ng-template>
7
<div class="uk-padding uk-padding-remove-top uk-text-large uk-text-center uk-width">Manage Personal Info</div>
8
<div class="uk-margin-large-bottom uk-flex uk-grid-divider" uk-grid>
9
  <div *ngIf="showLoading" class="uk-animation-fade uk-width-1-1" role="alert">
10
    <span class="loading-gif uk-align-center"></span>
11
  </div>
12
  <div *ngIf="curatorId != null && curator != null && !showLoading" class="uk-width-1-1 uk-margin-left">
13
    <div class="uk-alert uk-alert-primary uk-flex uk-flex-middle">
14
      <span class="uk-icon uk-margin-small-right" uk-icon="info"></span>
15
      <div>
16
        Your personal info will be visible in the Curators' page of your Community Gateway.
17
        Read <a (click)="privacy()">privacy policy statement</a>.<br>
18
        <span *ngIf="!newCurator && !curatorsEnabled">
19
          Curators' page is disabled. Please enable it <a routerLink="/pages" routerLinkActive="router-link-active" [queryParams]="{communityId: communityId, type: 'other'}">here</a>.
20
        </span>
21
      </div>
22
    </div>
23
  </div>
24
  <table *ngIf="curatorId != null && curator != null && !showLoading" class="uk-width-1-2@m uk-width-1-1@s uk-align-center">
25
    <tbody class="uk-table uk-align-center">
26
      <tr *ngIf="curator.name != null">
27
        <td for="name" class="uk-text-bold uk-text-right">
28
          Name
29
          <span class="uk-text-danger uk-text-bold">
30
            *
31
          </span>
32
          :
33
        </td>
34
        <td class="uk-text-left uk-width-1-1">
35
          <div *ngIf="!curator.name || curator.name === ''" class=" uk-text-danger uk-text-small style=display:none"> Please add name. </div>
36
          <input  type="text"
37
                  class="form-control uk-input" id="name"
38
                  [(ngModel)]="curator.name" (input)="resetMessages(); onNameChange()" #name="ngModel" required>
39
        </td>
40
      </tr>
41
      <tr *ngIf="photo != null">
42
        <td for="photo" class="uk-text-bold uk-align-right">Photo:</td>
43
        <td class="uk-text-left">
44
          <div class="uk-flex uk-flex-middle" uk-grid>
45
            <div class="uk-width-auto@l">
46
              <img class="uk-border-circle curator-photo" src="{{photo}}" alt="Curator Photo">
47
            </div>
48
            <div class="uk-width-expand@l uk-grid-margin-small" uk-grid>
49
              <div uk-form-custom class="uk-width-auto">
50
                <input id="photo" type="file"  (change)="fileChangeEvent($event)" (input)="resetMessages(); change()"/>
51
                <button class="uk-button  portal-button" type="button" tabindex="-1">
52
                  Upload a photo
53
                </button>
54
              </div>
55
              <div *ngIf="photo !== 'assets/common-assets/curator-default.png'" class="uk-width-auto">
56
                <button class="uk-button uk-button-danger" type="button" (click)="resetMessages(); removePhotoModal.open()">
57
                  Remove
58
                </button>
59
              </div>
60
            </div>
61
          </div>
62
          <div class="uk-margin-small-top uk-text-warning">
63
            Maximum photo resolution is 256x256 pixels.
64
          </div>
65
        </td>
66
      </tr>
67
      <tr *ngIf="curator.bio != null">
68
        <td for="bio" class="uk-text-bold uk-text-right">Biography:</td>
69
        <td class="uk-text-left">
70
          <textarea placeholder={{curator.bio}} type="text"
71
                    class="form-control uk-textarea" rows="6"
72
                    id="bio"
73
                    [(ngModel)]="curator.bio"
74
                    (input)="resetMessages(); change()">
75
          </textarea>
76
        </td>
77
      </tr>
78
      <tr *ngIf="curator.bio != null">
79
        <td class="uk-text-right"></td>
80
        <td class="uk-text-left">
81
        <div class="uk-text-danger uk-text-bold">
82
          * Required fields
83
        </div>
84
        </td>
85
      </tr>
86
      <tr>
87
        <td class="uk-text-right"></td>
88
        <td>
89
          <div *ngIf="updateErrorMessage" class="uk-alert uk-alert-danger" role="alert">{{updateErrorMessage}}</div>
90
          <div *ngIf="successfulSaveMessage" class="uk-alert uk-alert-success" role="alert">{{successfulSaveMessage}}</div>
91
      </tr>
92
    </tbody>
93
  </table>
94
  <div *ngIf="curatorId != null && curator != null && !showLoading" class="uk-width-1-2@m uk-width-1-1@s">
95
    <affiliations [curatorAffiliations]="true" [affiliations]="curator.affiliations"
96
                  (affiliationsChange)="affiliationsChanged = $event"
97
                  (resetCuratorMessages)="resetMessages();">
98
    </affiliations>
99
  </div>
100
</div>
101
<div class="uk-float-right uk-flex uk-flex-middle uk-visible@m" style="z-index: 100; bottom: 45px; position: fixed; right: 45px;">
102
  <ng-container *ngTemplateOutlet="buttons"></ng-container>
103
</div>
104
<div class="uk-float-right uk-margin-bottom uk-hidden@m">
105
  <ng-container *ngTemplateOutlet="buttons"></ng-container>
106
</div>
107
<modal-alert #removePhotoModal  (alertOutput)="removePhoto()">
108
  Your photo will be removed after you save your data. Are you sure you want to proceed?
109
</modal-alert>
110
<modal-alert #privacyStatement  (alertOutput)="privacyStatement.cancel()">
111
  <div class="">
112
    Your personal data and photo are processed by OpenAIRE in conformity with personal data protection legal framework.
113
    They  will be stored safely in our system for as long as OpenAIRE exists. Since you press the  "save" button,
114
    you give us the consent to make them public in your Community Gateway to let users know who is
115
    configuring the platform. You always have the right to exercise your rights and ask for access,
116
    rectification, erasure and restriction of your data. Please contact <a href="mailto:rcd-helpdesk@openaire.eu">rcd-helpdesk@openaire.eu</a> if
117
    you have any inquiries.
118
  </div>
119
</modal-alert>
(2-2/4)