Skip to content

Commit a15e7c0

Browse files
authored
Merge pull request #80 from aspnetboilerplate/pr/71
Pr/71
2 parents e36193f + fffd851 commit a15e7c0

21 files changed

+100
-83
lines changed

angular/src/account/account.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ import { LoginService } from './login/login.service';
4747
})
4848
export class AccountModule {
4949

50-
}
50+
}

angular/src/account/login/login.component.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ <h4 class="text-center">{{l("LogIn")}}</h4>
88
<i class="material-icons">person</i>
99
</span>
1010
<div class="form-line">
11-
<input [(ngModel)]="loginService.authenticateModel.userNameOrEmailAddress" autoFocus class="form-control" type="text" autocomplete="off" placeholder="{{l('UserNameOrEmail')}}" name="userNameOrEmailAddress" required maxlength="255" />
11+
<input materialInput [(ngModel)]="loginService.authenticateModel.userNameOrEmailAddress" autoFocus class="form-control" type="text" autocomplete="off" placeholder="{{l('UserNameOrEmail')}}" name="userNameOrEmailAddress" required maxlength="255" />
1212
</div>
1313
</div>
14-
14+
1515
<div class="input-group">
1616
<span class="input-group-addon">
1717
<i class="material-icons">lock</i>
1818
</span>
1919
<div class="form-line">
20-
<input type="password" [(ngModel)]="loginService.authenticateModel.password" class="form-control" name="password" placeholder="{{l('Password')}}" required maxlength="32">
20+
<input materialInput type="password" [(ngModel)]="loginService.authenticateModel.password" class="form-control" name="password" placeholder="{{l('Password')}}" required maxlength="32">
2121
</div>
2222
</div>
2323
<div class="row">
@@ -29,14 +29,14 @@ <h4 class="text-center">{{l("LogIn")}}</h4>
2929
<button id="LoginButton" class="btn btn-block bg-pink waves-effect" type="submit">{{l("LogIn")}}</button>
3030
</div>
3131
</div>
32-
32+
3333
<div class="row m-t-15 m-b--20" *ngIf="isSelfRegistrationAllowed">
3434
<div class="col-xs-12">
3535
<a [routerLink]="['../register']">{{l("Register")}}</a>
3636
</div>
3737
</div>
3838
</form>
39-
39+
4040
<div class="login-options" *ngIf="multiTenancySideIsTeanant && loginService.externalLoginProviders.length > 0">
4141
<h4>{{l("OrLoginWith")}}</h4>
4242
<ul class="social-icons">
@@ -48,4 +48,4 @@ <h4>{{l("OrLoginWith")}}</h4>
4848
</ul>
4949
</div>
5050
</div>
51-
</div>
51+
</div>

angular/src/account/login/login.component.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, Injector, ElementRef, AfterViewInit, ViewChild } from '@angular/core';
1+
import { Component, Injector, ElementRef, ViewChild } from '@angular/core';
22
import { Router } from '@angular/router';
33
import { AppComponentBase } from '@shared/app-component-base';
44
import { LoginService, ExternalLoginProvider } from './login.service';
@@ -10,7 +10,7 @@ import { AbpSessionService } from '@abp/session/abp-session.service';
1010
styleUrls: [
1111
'./login.component.less'
1212
],
13-
animations: [accountModuleAnimation()]
13+
animations: [accountModuleAnimation()]
1414
})
1515
export class LoginComponent extends AppComponentBase {
1616

@@ -28,7 +28,6 @@ export class LoginComponent extends AppComponentBase {
2828
}
2929

3030
ngAfterViewInit(): void {
31-
($ as any).AdminBSB.input.activate($(this.cardBody.nativeElement));
3231
$(this.cardBody.nativeElement).find('input:first').focus();
3332
}
3433

@@ -54,4 +53,4 @@ export class LoginComponent extends AppComponentBase {
5453
externalLogin(provider: ExternalLoginProvider) {
5554
this.loginService.externalAuthenticate(provider);
5655
}
57-
}
56+
}

angular/src/account/register/register.component.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,35 @@ <h4 class="text-center">{{l("Register")}}</h4>
55

66
<div class="form-group form-float">
77
<div class="form-line">
8-
<input class="form-control" autoFocus type="text" [(ngModel)]="model.name" name="Name" required maxlength="32" />
8+
<input materialInput class="form-control" autoFocus type="text" [(ngModel)]="model.name" name="Name" required maxlength="32" />
99
<label class="form-label">{{l('Name')}}</label>
1010
</div>
1111
</div>
12-
12+
1313
<div class="form-group form-float">
1414
<div class="form-line">
15-
<input class="form-control" type="text" [(ngModel)]="model.surname" name="Surname" required maxlength="32" />
15+
<input materialInput class="form-control" type="text" [(ngModel)]="model.surname" name="Surname" required maxlength="32" />
1616
<label class="form-label">{{l('Surname')}}</label>
1717
</div>
1818
</div>
1919

2020
<div class="form-group form-float">
2121
<div class="form-line">
22-
<input class="form-control" type="email" [(ngModel)]="model.emailAddress" name="EmailAddress" required maxlength="255" pattern="^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{1,})+$" />
22+
<input materialInput class="form-control" type="email" [(ngModel)]="model.emailAddress" name="EmailAddress" required maxlength="255" pattern="^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{1,})+$" />
2323
<label class="form-label">{{l('EmailAddress')}}</label>
2424
</div>
2525
</div>
2626

2727
<div class="form-group form-float">
2828
<div class="form-line">
29-
<input class="form-control" type="text" autocomplete="off" [(ngModel)]="model.userName" name="UserName" required maxlength="32" />
29+
<input materialInput class="form-control" type="text" autocomplete="off" [(ngModel)]="model.userName" name="UserName" required maxlength="32" />
3030
<label class="form-label">{{l('UserName')}}</label>
3131
</div>
3232
</div>
33-
33+
3434
<div class="form-group form-float">
3535
<div class="form-line">
36-
<input class="form-control" type="password" [(ngModel)]="model.password" name="Password" required maxlength="32" />
36+
<input materialInput class="form-control" type="password" [(ngModel)]="model.password" name="Password" required maxlength="32" />
3737
<label class="form-label">{{l('Password')}}</label>
3838
</div>
3939
</div>
@@ -45,4 +45,4 @@ <h4 class="text-center">{{l("Register")}}</h4>
4545

4646
</form>
4747
</div>
48-
</div>
48+
</div>

angular/src/account/register/register.component.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Component, Injector, ElementRef, AfterViewInit, ViewChild } from '@angular/core';
22
import { Router } from '@angular/router';
3-
import { AccountServiceProxy, RegisterInput } from '@shared/service-proxies/service-proxies'
3+
import { AccountServiceProxy, RegisterInput, RegisterOutput } from '@shared/service-proxies/service-proxies'
44
import { AppComponentBase } from '@shared/app-component-base';
55
import { LoginService } from '../login/login.service';
66
import { accountModuleAnimation } from '@shared/animations/routerTransition';
@@ -27,7 +27,6 @@ export class RegisterComponent extends AppComponentBase implements AfterViewInit
2727
}
2828

2929
ngAfterViewInit(): void {
30-
($ as any).AdminBSB.input.activate($(this.cardBody.nativeElement));
3130
$(this.cardBody.nativeElement).find('input:first').focus();
3231
}
3332

@@ -39,7 +38,7 @@ export class RegisterComponent extends AppComponentBase implements AfterViewInit
3938
this.saving = true;
4039
this._accountService.register(this.model)
4140
.finally(() => { this.saving = false; })
42-
.subscribe((result) => {
41+
.subscribe((result:RegisterOutput) => {
4342
if (!result.canLogin) {
4443
this.notify.success(this.l('SuccessfullyRegistered'));
4544
this._router.navigate(['/login']);
@@ -53,4 +52,4 @@ export class RegisterComponent extends AppComponentBase implements AfterViewInit
5352
this._loginService.authenticate(() => { this.saving = false; });
5453
});
5554
}
56-
}
55+
}

angular/src/account/tenant/tenant-change-modal.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ <h4 class="modal-title">
1717
<div class="modal-body">
1818
<div class="form-group form-float">
1919
<div class="form-line">
20-
<input #tenancyNameInput type="text" name="TenancyName" class="form-control" [ngClass]="{'edited':tenancyName}" [(ngModel)]="tenancyName" maxlength="64">
20+
<input #tenancyNameInput materialInput type="text" name="TenancyName" class="form-control" [ngClass]="{'edited':tenancyName}" [(ngModel)]="tenancyName" maxlength="64">
2121
<label class="form-label">{{l("TenancyName")}}</label>
2222
</div>
2323
</div>
@@ -33,4 +33,4 @@ <h4 class="modal-title">
3333

3434
</div>
3535
</div>
36-
</div>
36+
</div>

angular/src/account/tenant/tenant-change-modal.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ export class TenantChangeModalComponent extends AppComponentBase {
3333
}
3434

3535
onShown(): void {
36-
($ as any).AdminBSB.input.activate($(this.modalContent.nativeElement));
3736
$(this.tenancyNameInput.nativeElement).focus().select();
3837
}
3938

@@ -73,4 +72,4 @@ export class TenantChangeModalComponent extends AppComponentBase {
7372
this.active = false;
7473
this.modal.hide();
7574
}
76-
}
75+
}

angular/src/app/app.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import { SideBarUserAreaComponent } from '@app/layout/sidebar-user-area.componen
3131
import { SideBarNavComponent } from '@app/layout/sidebar-nav.component';
3232
import { SideBarFooterComponent } from '@app/layout/sidebar-footer.component';
3333
import { RightSideBarComponent } from '@app/layout/right-sidebar.component';
34+
import { MaterialInput } from '@shared/directives/material-input.directive';
3435

3536
@NgModule({
3637
declarations: [
@@ -70,4 +71,4 @@ import { RightSideBarComponent } from '@app/layout/right-sidebar.component';
7071

7172
]
7273
})
73-
export class AppModule { }
74+
export class AppModule { }

angular/src/app/layout/topbar.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="search-icon">
44
<i class="material-icons">search</i>
55
</div>
6-
<input type="text" placeholder="START TYPING...">
6+
<input materialInput type="text" placeholder="START TYPING...">
77
<div class="close-search">
88
<i class="material-icons">close</i>
99
</div>
@@ -24,4 +24,4 @@
2424
</ul>
2525
</div>
2626
</div>
27-
</nav>
27+
</nav>

angular/src/app/roles/create-role/create-role.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class CreateRoleComponent extends AppComponentBase implements OnInit {
4141
}
4242

4343
onShown(): void {
44-
($ as any).AdminBSB.input.activate($(this.modalContent.nativeElement));
44+
$.AdminBSB.input.activate($(this.modalContent.nativeElement));
4545

4646
$('#frm_create_role').validate({
4747
highlight: input => {

0 commit comments

Comments
 (0)