Skip to content

Commit

Permalink
Themed RegisterEmailFormComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrevryghem committed Oct 2, 2023
1 parent 9fc7b57 commit e7c0936
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 7 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'">
</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,27 @@
import { Component } 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> {

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'">
</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 {
}
4 changes: 3 additions & 1 deletion src/themes/custom/theme.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ import { HeaderComponent } from './app/header/header.component';
import { FooterComponent } from './app/footer/footer.component';
import { BreadcrumbsComponent } from './app/breadcrumbs/breadcrumbs.component';
import { HeaderNavbarWrapperComponent } from './app/header-nav-wrapper/header-navbar-wrapper.component';
import { RegisterEmailFormComponent } from './app/register-email-form/register-email-form.component';

const DECLARATIONS = [
HomePageComponent,
Expand Down Expand Up @@ -119,7 +120,8 @@ const DECLARATIONS = [
HeaderComponent,
NavbarComponent,
HeaderNavbarWrapperComponent,
BreadcrumbsComponent
BreadcrumbsComponent,
RegisterEmailFormComponent,
];

@NgModule({
Expand Down

0 comments on commit e7c0936

Please sign in to comment.