Skip to content

Commit

Permalink
Merge remote-tracking branch 'alex/themed-register-email-form-compone…
Browse files Browse the repository at this point in the history
…nt_contribute-7.6' into atmire-contributions-august_contribute-7.6

# Conflicts:
#	src/themes/custom/lazy-theme.module.ts
  • Loading branch information
alexandrevryghem committed Oct 26, 2023
2 parents cdc6b92 + a29dae5 commit c24f366
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<ds-register-email-form
<ds-themed-register-email-form
[MESSAGE_PREFIX]="'forgot-email.form'" [typeRequest]="typeRequest">
</ds-register-email-form>
</ds-themed-register-email-form>
10 changes: 8 additions & 2 deletions src/app/register-email-form/register-email-form.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,24 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { SharedModule } from '../shared/shared.module';
import { RegisterEmailFormComponent } from './register-email-form.component';
import { ThemedRegisterEmailFormComponent } from './themed-registry-email-form.component';

const DECLARATIONS = [
RegisterEmailFormComponent,
ThemedRegisterEmailFormComponent,
];

@NgModule({
imports: [
CommonModule,
SharedModule
],
declarations: [
RegisterEmailFormComponent,
...DECLARATIONS,
],
providers: [],
exports: [
RegisterEmailFormComponent,
...DECLARATIONS,
]
})

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { Component, Input } from '@angular/core';
import { ThemedComponent } from '../shared/theme-support/themed.component';
import { RegisterEmailFormComponent } from './register-email-form.component';

/**
* Themed wrapper for {@link RegisterEmailFormComponent}
*/
@Component({
selector: 'ds-themed-register-email-form',
styleUrls: [],
templateUrl: '../shared/theme-support/themed.component.html',
})
export class ThemedRegisterEmailFormComponent extends ThemedComponent<RegisterEmailFormComponent> {

@Input() MESSAGE_PREFIX: string;

@Input() typeRequest: string;

protected inAndOutputNames: (keyof RegisterEmailFormComponent & keyof this)[] = [
'MESSAGE_PREFIX',
'typeRequest',
];

protected getComponentName(): string {
return 'RegisterEmailFormComponent';
}

protected importThemedComponent(themeName: string): Promise<any> {
return import(`../../themes/${themeName}/app/register-email-form/register-email-form.component`);
}

protected importUnthemedComponent(): Promise<any> {
return import('./register-email-form.component');
}

}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<ds-register-email-form
<ds-themed-register-email-form
[MESSAGE_PREFIX]="'register-page.registration'" [typeRequest]="typeRequest">
</ds-register-email-form>
</ds-themed-register-email-form>
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Component } from '@angular/core';
import {
RegisterEmailFormComponent as BaseComponent
} from '../../../../app/register-email-form/register-email-form.component';

@Component({
selector: 'ds-register-email-form',
// templateUrl: './register-email-form.component.html',
templateUrl: '../../../../app/register-email-form/register-email-form.component.html',
})
export class RegisterEmailFormComponent extends BaseComponent {
}
2 changes: 2 additions & 0 deletions src/themes/custom/lazy-theme.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ import { EditBitstreamPageComponent } from './app/bitstream-page/edit-bitstream-
import { FormModule } from '../../app/shared/form/form.module';
import { RequestCopyModule } from 'src/app/request-copy/request-copy.module';
import { BrowseByComponent } from './app/shared/browse-by/browse-by.component';
import { RegisterEmailFormComponent } from './app/register-email-form/register-email-form.component';

const DECLARATIONS = [
FileSectionComponent,
Expand Down Expand Up @@ -241,6 +242,7 @@ const DECLARATIONS = [
ItemStatusComponent,
EditBitstreamPageComponent,
BrowseByComponent,
RegisterEmailFormComponent,
];

@NgModule({
Expand Down

0 comments on commit c24f366

Please sign in to comment.