mirror of https://github.com/abpframework/abp.git
5 changed files with 131 additions and 80 deletions
@ -0,0 +1,14 @@ |
|||
<div class="row"> |
|||
<div class="mx-auto col col-md-5"> |
|||
<abp-tenant-box></abp-tenant-box> |
|||
|
|||
<div class="abp-account-container"> |
|||
<div class="card mt-3 shadow-sm rounded"> |
|||
<div class="card-body p-5"> |
|||
<ng-content *ngTemplateOutlet="mainContentRef"></ng-content> |
|||
</div> |
|||
<ng-content *ngTemplateOutlet="cancelContentRef"></ng-content> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
@ -0,0 +1,13 @@ |
|||
import { Component, Input, TemplateRef } from '@angular/core'; |
|||
|
|||
@Component({ |
|||
selector: 'abp-auth-wrapper', |
|||
templateUrl: './auth-wrapper.component.html', |
|||
}) |
|||
export class AuthWrapperComponent { |
|||
@Input() |
|||
mainContentRef: TemplateRef<any>; |
|||
|
|||
@Input() |
|||
cancelContentRef: TemplateRef<any>; |
|||
} |
|||
@ -1,41 +1,50 @@ |
|||
<div class="row"> |
|||
<div class="col col-md-4 offset-md-4"> |
|||
<abp-tenant-box></abp-tenant-box> |
|||
|
|||
<div class="abp-account-container"> |
|||
<h2>{{ 'AbpAccount::Login' | abpLocalization }}</h2> |
|||
<form [formGroup]="form" (ngSubmit)="onSubmit()" novalidate> |
|||
<div class="form-group"> |
|||
<label for="login-input-user-name-or-email-address">{{ |
|||
'AbpAccount::UserNameOrEmailAddress' | abpLocalization |
|||
}}</label> |
|||
<input |
|||
class="form-control" |
|||
type="text" |
|||
id="login-input-user-name-or-email-address" |
|||
formControlName="username" |
|||
autofocus |
|||
/> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="login-input-password">{{ 'AbpAccount::Password' | abpLocalization }}</label> |
|||
<input class="form-control" type="password" id="login-input-password" formControlName="password" /> |
|||
</div> |
|||
<div class="form-check" validationTarget validationStyle> |
|||
<label class="form-check-label" for="login-input-remember-me"> |
|||
<input class="form-check-input" type="checkbox" id="login-input-remember-me" formControlName="remember" /> |
|||
{{ 'AbpAccount::RememberMe' | abpLocalization }} |
|||
</label> |
|||
</div> |
|||
<div class="mt-2"> |
|||
<abp-button [loading]="inProgress" type="submit"> |
|||
{{ 'AbpAccount::Login' | abpLocalization }} |
|||
</abp-button> |
|||
</div> |
|||
</form> |
|||
<div style="padding-top: 20px"> |
|||
<a routerLink="/account/register">{{ 'AbpAccount::Register' | abpLocalization }}</a> |
|||
<abp-auth-wrapper [mainContentRef]="mainContentRef" [cancelContentRef]="cancelContentRef"> |
|||
<ng-template #mainContentRef> |
|||
<h4>{{ 'AbpAccount::Login' | abpLocalization }}</h4> |
|||
<strong> |
|||
{{ 'AbpAccount::AreYouANewUser' | abpLocalization }} |
|||
<a class="text-decoration-none" routerLink="/account/register">{{ 'AbpAccount::Register' | abpLocalization }}</a> |
|||
</strong> |
|||
<form [formGroup]="form" (ngSubmit)="onSubmit()" novalidate class="mt-4"> |
|||
<div class="form-group"> |
|||
<label for="login-input-user-name-or-email-address">{{ |
|||
'AbpAccount::UserNameOrEmailAddress' | abpLocalization |
|||
}}</label> |
|||
<input |
|||
class="form-control" |
|||
type="text" |
|||
id="login-input-user-name-or-email-address" |
|||
formControlName="username" |
|||
autofocus |
|||
/> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="login-input-password">{{ 'AbpAccount::Password' | abpLocalization }}</label> |
|||
<input class="form-control" type="password" id="login-input-password" formControlName="password" /> |
|||
</div> |
|||
<div class="form-check" validationTarget validationStyle> |
|||
<label class="form-check-label" for="login-input-remember-me"> |
|||
<input class="form-check-input" type="checkbox" id="login-input-remember-me" formControlName="remember" /> |
|||
{{ 'AbpAccount::RememberMe' | abpLocalization }} |
|||
</label> |
|||
</div> |
|||
<abp-button |
|||
[loading]="inProgress" |
|||
buttonType="submit" |
|||
name="Action" |
|||
buttonClass="btn-block btn-lg mt-3 btn btn-primary" |
|||
> |
|||
{{ 'AbpAccount::Login' | abpLocalization }} |
|||
</abp-button> |
|||
</form> |
|||
</ng-template> |
|||
<ng-template #cancelContentRef> |
|||
<div class="card-footer text-center border-0"> |
|||
<a routerLink="/"> |
|||
<button type="button" name="Action" value="Cancel" class="px-2 py-0 btn btn-link"> |
|||
{{ 'AbpAccount::Cancel' | abpLocalization }} |
|||
</button> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</ng-template> |
|||
</abp-auth-wrapper> |
|||
|
|||
@ -1,30 +1,32 @@ |
|||
<div class="row"> |
|||
<div class="col col-md-4 offset-md-4"> |
|||
<abp-tenant-box></abp-tenant-box> |
|||
|
|||
<div class="abp-account-container"> |
|||
<h2>{{ 'AbpAccount::Register' | abpLocalization }}</h2> |
|||
<form [formGroup]="form" (ngSubmit)="onSubmit()" novalidate> |
|||
<div class="form-group"> |
|||
<label for="input-user-name">{{ 'AbpAccount::UserName' | abpLocalization }}</label |
|||
><span> * </span |
|||
><input autofocus type="text" id="input-user-name" class="form-control" formControlName="username" /> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="input-email-address">{{ 'AbpAccount::EmailAddress' | abpLocalization }}</label |
|||
><span> * </span><input type="email" id="input-email-address" class="form-control" formControlName="email" /> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="input-password">{{ 'AbpAccount::Password' | abpLocalization }}</label |
|||
><span> * </span><input type="password" id="input-password" class="form-control" formControlName="password" /> |
|||
</div> |
|||
<abp-button [loading]="inProgress" type="submit"> |
|||
{{ 'AbpAccount::Register' | abpLocalization }} |
|||
</abp-button> |
|||
</form> |
|||
<div style="padding-top: 20px"> |
|||
<a routerLink="/account/login">{{ 'AbpAccount::Login' | abpLocalization }}</a> |
|||
<abp-auth-wrapper [mainContentRef]="mainContentRef"> |
|||
<ng-template #mainContentRef> |
|||
<h4>{{ 'AbpAccount::Register' | abpLocalization }}</h4> |
|||
<strong> |
|||
{{ 'AbpAccount::AlreadyRegistered' | abpLocalization }} |
|||
<a class="text-decoration-none" routerLink="/account/login">{{ 'AbpAccount::Login' | abpLocalization }}</a> |
|||
</strong> |
|||
<form [formGroup]="form" (ngSubmit)="onSubmit()" novalidate class="mt-4"> |
|||
<div class="form-group"> |
|||
<label for="input-user-name">{{ 'AbpAccount::UserName' | abpLocalization }}</label |
|||
><span> * </span |
|||
><input autofocus type="text" id="input-user-name" class="form-control" formControlName="username" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="input-email-address">{{ 'AbpAccount::EmailAddress' | abpLocalization }}</label |
|||
><span> * </span><input type="email" id="input-email-address" class="form-control" formControlName="email" /> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label for="input-password">{{ 'AbpAccount::Password' | abpLocalization }}</label |
|||
><span> * </span><input type="password" id="input-password" class="form-control" formControlName="password" /> |
|||
</div> |
|||
<abp-button |
|||
[loading]="inProgress" |
|||
buttonType="submit" |
|||
name="Action" |
|||
buttonClass="btn-block btn-lg mt-3 btn btn-primary" |
|||
> |
|||
{{ 'AbpAccount::Register' | abpLocalization }} |
|||
</abp-button> |
|||
</form> |
|||
</ng-template> |
|||
</abp-auth-wrapper> |
|||
|
|||
Loading…
Reference in new issue