[plugins-functionality | DONE | ADDED ] add display title and shortitle and use them instead of title/ short title
This commit is contained in:
parent
c7ce678915
commit
488ac615d4
|
@ -20,11 +20,19 @@ import {ClearCacheService} from "../../../../openaireLibrary/services/clear-cach
|
||||||
<div class="uk-grid uk-grid-large" uk-grid>
|
<div class="uk-grid uk-grid-large" uk-grid>
|
||||||
<div class="uk-width-1-2@m">
|
<div class="uk-width-1-2@m">
|
||||||
<div input id="name" [formInput]="communityFb.get('name')"
|
<div input id="name" [formInput]="communityFb.get('name')"
|
||||||
placeholder="Name of the community profile."></div>
|
placeholder="Index name of the community."></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-width-1-2@m">
|
<div class="uk-width-1-2@m">
|
||||||
<div input [formInput]="communityFb.get('shortName')"
|
<div input [formInput]="communityFb.get('shortName')"
|
||||||
placeholder="Short name of the community."></div>
|
placeholder="Index short name of the community."></div>
|
||||||
|
</div>
|
||||||
|
<div class="uk-width-1-2@m">
|
||||||
|
<div input id="name" [formInput]="communityFb.get('displayName')"
|
||||||
|
placeholder="Display name of the community."></div>
|
||||||
|
</div>
|
||||||
|
<div class="uk-width-1-2@m">
|
||||||
|
<div input [formInput]="communityFb.get('displayShortName')"
|
||||||
|
placeholder="Display short name of the community."></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-width-1-1">
|
<div class="uk-width-1-1">
|
||||||
<div class="uk-text-bold uk-margin-bottom uk-form-hint">Description of the community</div>
|
<div class="uk-text-bold uk-margin-bottom uk-form-hint">Description of the community</div>
|
||||||
|
@ -153,6 +161,8 @@ export class EditCommunityComponent {
|
||||||
communityId: this.fb.control(this.community.communityId),
|
communityId: this.fb.control(this.community.communityId),
|
||||||
name: this.fb.control(this.community.title, Validators.required),
|
name: this.fb.control(this.community.title, Validators.required),
|
||||||
shortName: this.fb.control(this.community.shortTitle, Validators.required),
|
shortName: this.fb.control(this.community.shortTitle, Validators.required),
|
||||||
|
displayName: this.fb.control(this.community.title, Validators.required),
|
||||||
|
displayShortName: this.fb.control(this.community.shortTitle, Validators.required),
|
||||||
description: this.fb.control(this.community.description),
|
description: this.fb.control(this.community.description),
|
||||||
status: this.fb.control(this.community.status),
|
status: this.fb.control(this.community.status),
|
||||||
claim: this.fb.control(this.community.claim),
|
claim: this.fb.control(this.community.claim),
|
||||||
|
@ -182,6 +192,7 @@ export class EditCommunityComponent {
|
||||||
if (!this.isAdmin) {
|
if (!this.isAdmin) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.communityFb.get('shortName').disable();
|
this.communityFb.get('shortName').disable();
|
||||||
|
this.communityFb.get('name').disable();
|
||||||
}, 0);
|
}, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -190,7 +201,7 @@ export class EditCommunityComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
public get isAdmin() {
|
public get isAdmin() {
|
||||||
return Session.isPortalAdministrator(this.user);
|
return Session.isPortalAdministrator(this.user) || Session.isCommunityCurator(this.user);
|
||||||
}
|
}
|
||||||
|
|
||||||
public get disabled(): boolean {
|
public get disabled(): boolean {
|
||||||
|
|
Loading…
Reference in New Issue