diff --git a/src/app/+collection-page/collection-form/collection-form.component.ts b/src/app/+collection-page/collection-form/collection-form.component.ts index e3ca07a2ad..d91d9fc1fb 100644 --- a/src/app/+collection-page/collection-form/collection-form.component.ts +++ b/src/app/+collection-page/collection-form/collection-form.component.ts @@ -24,26 +24,6 @@ export class CollectionFormComponent extends ComColFormComponent { */ @Input() dso: Collection = new Collection(); - /** - * i18n key for the logo's label - */ - protected logoLabelMsg = 'collection.edit.logo.label'; - - /** - * i18n key for the logo's drop message - */ - protected logoDropMsg = 'collection.edit.logo.upload'; - - /** - * i18n key for the logo's upload success message - */ - protected logoSuccessMsg = 'collection.edit.logo.notifications.success'; - - /** - * i18n key for the logo's upload error message - */ - protected logoErrorMsg = 'collection.edit.logo.notifications.error'; - /** * @type {Collection.type} This is a collection-type form */ diff --git a/src/app/+community-page/community-form/community-form.component.ts b/src/app/+community-page/community-form/community-form.component.ts index 29149f4d01..fc1e77c445 100644 --- a/src/app/+community-page/community-form/community-form.component.ts +++ b/src/app/+community-page/community-form/community-form.component.ts @@ -24,26 +24,6 @@ export class CommunityFormComponent extends ComColFormComponent { */ @Input() dso: Community = new Community(); - /** - * i18n key for the logo's label - */ - protected logoLabelMsg = 'community.edit.logo.label'; - - /** - * i18n key for the logo's drop message - */ - protected logoDropMsg = 'community.edit.logo.upload'; - - /** - * i18n key for the logo's upload success message - */ - protected logoSuccessMsg = 'community.edit.logo.notifications.success'; - - /** - * i18n key for the logo's upload error message - */ - protected logoErrorMsg = 'community.edit.logo.notifications.error'; - /** * @type {Community.type} This is a community-type form */ diff --git a/src/app/shared/comcol-forms/comcol-form/comcol-form.component.html b/src/app/shared/comcol-forms/comcol-form/comcol-form.component.html index 8e1e280b22..fff1908823 100644 --- a/src/app/shared/comcol-forms/comcol-form/comcol-form.component.html +++ b/src/app/shared/comcol-forms/comcol-form/comcol-form.component.html @@ -1,9 +1,9 @@
- + implements OnInit, OnDe */ @Input() dso: T; - /** - * i18n key for the logo's label - */ - protected logoLabelMsg: string; - - /** - * i18n key for the logo's drop message - */ - protected logoDropMsg: string; - - /** - * i18n key for the logo's upload success message - */ - protected logoSuccessMsg: string; - - /** - * i18n key for the logo's upload error message - */ - protected logoErrorMsg: string; - /** * Type of DSpaceObject that the form represents */ @@ -208,7 +188,7 @@ export class ComColFormComponent implements OnInit, OnDe * The request was successful, display a success notification */ public onCompleteItem() { - this.notificationsService.success(null, this.translate.get(this.logoSuccessMsg)); + this.notificationsService.success(null, this.translate.get(this.type.value + '.edit.logo.notifications.success')); this.finishUpload.emit(); } @@ -216,7 +196,7 @@ export class ComColFormComponent implements OnInit, OnDe * The request was unsuccessful, display an error notification */ public onUploadError() { - this.notificationsService.error(null, this.translate.get(this.logoErrorMsg)); + this.notificationsService.error(null, this.translate.get(this.type.value + '.edit.logo.notifications.error')); this.finishUpload.emit(); }