mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
remove old 'banned' demo from login screen (#1929)
This commit is contained in:
committed by
Eugenio Romano
parent
1060b66534
commit
4b7c958992
@@ -15,11 +15,6 @@
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.banned {
|
|
||||||
width: 130px;
|
|
||||||
margin: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toggle {
|
.toggle {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
margin: 20px;
|
margin: 20px;
|
||||||
|
@@ -21,10 +21,6 @@
|
|||||||
<span class="mdl-switch__label">CSRF</span>
|
<span class="mdl-switch__label">CSRF</span>
|
||||||
</label>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
<p class="banned">
|
|
||||||
<label for="blacklistusername">Banned username</label><br>
|
|
||||||
<input id="blacklistusername" type="text" placeholder="banned username" [(ngModel)]="blackListUsername"/>
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--SETTING BUTTON-->
|
<!--SETTING BUTTON-->
|
||||||
@@ -41,7 +37,6 @@
|
|||||||
[providers]="providers"
|
[providers]="providers"
|
||||||
[fieldsValidation]="customValidation"
|
[fieldsValidation]="customValidation"
|
||||||
[disableCsrf]="disableCsrf"
|
[disableCsrf]="disableCsrf"
|
||||||
(executeSubmit)="validateForm($event)"
|
|
||||||
(onSuccess)="onLogin($event)"
|
(onSuccess)="onLogin($event)"
|
||||||
(onError)="onError($event)">
|
(onError)="onError($event)">
|
||||||
<div class="mobile-settings">
|
<div class="mobile-settings">
|
||||||
@@ -65,9 +60,5 @@
|
|||||||
<span class="mdl-switch__label">CSRF</span>
|
<span class="mdl-switch__label">CSRF</span>
|
||||||
</label>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
|
||||||
<input class="mdl-textfield__input" type="text" [(ngModel)]="blackListUsername" id="blacklistusername"/>
|
|
||||||
<label class="mdl-textfield__label" for="blacklistusername">Banned username</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</alfresco-login>
|
</alfresco-login>
|
||||||
|
@@ -31,7 +31,6 @@ export class LoginDemoComponent implements OnInit {
|
|||||||
alfrescologin: any;
|
alfrescologin: any;
|
||||||
|
|
||||||
providers: string = 'ECM';
|
providers: string = 'ECM';
|
||||||
blackListUsername: string;
|
|
||||||
customValidation: any;
|
customValidation: any;
|
||||||
|
|
||||||
disableCsrf: boolean = false;
|
disableCsrf: boolean = false;
|
||||||
@@ -114,13 +113,4 @@ export class LoginDemoComponent implements OnInit {
|
|||||||
this.providers = '';
|
this.providers = '';
|
||||||
return this.providers;
|
return this.providers;
|
||||||
};
|
};
|
||||||
|
|
||||||
validateForm(event: any) {
|
|
||||||
let values = event.values;
|
|
||||||
if (values.controls['username'].value === this.blackListUsername) {
|
|
||||||
this.alfrescologin.addCustomFormError('username', 'This particular username has been blocked');
|
|
||||||
event.preventDefault();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user