mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
[DURACOM-191] change routing for forgot-password, delete forgot-password.module.ts
This commit is contained in:
@@ -92,8 +92,8 @@ import { ThemedPageErrorComponent } from './page-error/themed-page-error.compone
|
||||
},
|
||||
{
|
||||
path: FORGOT_PASSWORD_PATH,
|
||||
loadChildren: () => import('./forgot-password/forgot-password.module')
|
||||
.then((m) => m.ForgotPasswordModule),
|
||||
loadChildren: () => import('./forgot-password/forgot-password-routes')
|
||||
.then((m) => m.ROUTES),
|
||||
canActivate: [EndUserAgreementCurrentUserGuard]
|
||||
},
|
||||
{
|
||||
|
@@ -16,11 +16,11 @@ export const CAPTCHA_NAME = 'google-recaptcha';
|
||||
/**
|
||||
* A GoogleRecaptchaService used to send action and get a token from REST
|
||||
*/
|
||||
@Injectable()
|
||||
@Injectable({providedIn: 'root'})
|
||||
export class GoogleRecaptchaService {
|
||||
|
||||
private renderer: Renderer2;
|
||||
|
||||
x
|
||||
/**
|
||||
* A Google Recaptcha version
|
||||
*/
|
||||
|
24
src/app/forgot-password/forgot-password-routes.ts
Normal file
24
src/app/forgot-password/forgot-password-routes.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { ItemPageResolver } from '../item-page/item-page.resolver';
|
||||
import { ThemedForgotPasswordFormComponent } from './forgot-password-form/themed-forgot-password-form.component';
|
||||
import { ThemedForgotEmailComponent } from './forgot-password-email/themed-forgot-email.component';
|
||||
import { RegistrationGuard } from '../register-page/registration.guard';
|
||||
import { Route } from '@angular/router';
|
||||
|
||||
export const ROUTES: Route[] = [
|
||||
{
|
||||
path: '',
|
||||
component: ThemedForgotEmailComponent,
|
||||
data: {title: 'forgot-password.title'},
|
||||
providers: [
|
||||
ItemPageResolver,
|
||||
]
|
||||
},
|
||||
{
|
||||
path: ':token',
|
||||
component: ThemedForgotPasswordFormComponent,
|
||||
canActivate: [RegistrationGuard],
|
||||
providers: [
|
||||
ItemPageResolver,
|
||||
]
|
||||
}
|
||||
];
|
@@ -1,31 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { ItemPageResolver } from '../item-page/item-page.resolver';
|
||||
import { ThemedForgotPasswordFormComponent } from './forgot-password-form/themed-forgot-password-form.component';
|
||||
import { ThemedForgotEmailComponent } from './forgot-password-email/themed-forgot-email.component';
|
||||
import { RegistrationGuard } from '../register-page/registration.guard';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{
|
||||
path: '',
|
||||
component: ThemedForgotEmailComponent,
|
||||
data: {title: 'forgot-password.title'},
|
||||
},
|
||||
{
|
||||
path: ':token',
|
||||
component: ThemedForgotPasswordFormComponent,
|
||||
canActivate: [ RegistrationGuard ],
|
||||
}
|
||||
])
|
||||
],
|
||||
providers: [
|
||||
ItemPageResolver,
|
||||
]
|
||||
})
|
||||
/**
|
||||
* This module defines the routing to the components related to the forgot password components.
|
||||
*/
|
||||
export class ForgotPasswordRoutingModule {
|
||||
}
|
@@ -1,30 +0,0 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { ForgotEmailComponent } from './forgot-password-email/forgot-email.component';
|
||||
import { ForgotPasswordRoutingModule } from './forgot-password-routing.module';
|
||||
import { RegisterEmailFormModule } from '../register-email-form/register-email-form.module';
|
||||
import { ForgotPasswordFormComponent } from './forgot-password-form/forgot-password-form.component';
|
||||
import { ProfilePageModule } from '../profile-page/profile-page.module';
|
||||
import { ThemedForgotPasswordFormComponent } from './forgot-password-form/themed-forgot-password-form.component';
|
||||
import { ThemedForgotEmailComponent } from './forgot-password-email/themed-forgot-email.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
ForgotPasswordRoutingModule,
|
||||
RegisterEmailFormModule,
|
||||
ProfilePageModule,
|
||||
ForgotEmailComponent,
|
||||
ThemedForgotEmailComponent,
|
||||
ForgotPasswordFormComponent,
|
||||
ThemedForgotPasswordFormComponent
|
||||
],
|
||||
providers: []
|
||||
})
|
||||
|
||||
/**
|
||||
* Module related to the Forgot Password components
|
||||
*/
|
||||
export class ForgotPasswordModule {
|
||||
|
||||
}
|
Reference in New Issue
Block a user