diff --git a/src/app/shared/uploader/uploader.component.ts b/src/app/shared/uploader/uploader.component.ts index 0e19c38b55..4e5b002b51 100644 --- a/src/app/shared/uploader/uploader.component.ts +++ b/src/app/shared/uploader/uploader.component.ts @@ -146,12 +146,6 @@ export class UploaderComponent { this.uploader.options.headers = [{ name: XSRF_REQUEST_HEADER, value: this.tokenExtractor.getToken() }]; this.onBeforeUpload(); this.isOverDocumentDropZone = observableOf(false); - - // Move page target to the uploader - const config: ScrollToConfigOptions = { - target: this.uploaderId - }; - this.scrollToService.scrollTo(config); }; if (hasValue(this.uploadProperties)) { this.uploader.onBuildItemForm = (item, form) => { diff --git a/src/app/submission/form/submission-form.component.html b/src/app/submission/form/submission-form.component.html index 7376b1e10b..a8e963d8ea 100644 --- a/src/app/submission/form/submission-form.component.html +++ b/src/app/submission/form/submission-form.component.html @@ -1,5 +1,5 @@
-
+
= observableOf(true); + /** + * Emits true when the submission config has bitstream uploading enabled in submission + */ + public uploadEnabled$ = new BehaviorSubject(false); + /** * Observable of the list of submission's sections * @type {Observable} @@ -128,7 +135,11 @@ export class SubmissionFormComponent implements OnChanges, OnDestroy { } else { return observableOf([]); } - })); + }), + tap((sectionList) => { + this.uploadEnabled$.next(isNotEmpty(sectionList) && sectionList.some(config => config.sectionType === SectionsType.Upload)); + }) + ); // check if is submission loading this.loading = this.submissionService.getSubmissionObject(this.submissionId).pipe(