UI: Fix login url params
This commit is contained in:
		
							parent
							
								
									cc123a9e67
								
							
						
					
					
						commit
						5e3c85a897
					
				@ -23,7 +23,7 @@ import { FormBuilder } from '@angular/forms';
 | 
			
		||||
import { HttpErrorResponse } from '@angular/common/http';
 | 
			
		||||
import { Constants } from '@shared/models/constants';
 | 
			
		||||
import { Router } from '@angular/router';
 | 
			
		||||
import { ActivatedRoute } from "@angular/router";
 | 
			
		||||
import { ActivatedRoute } from '@angular/router';
 | 
			
		||||
 | 
			
		||||
@Component({
 | 
			
		||||
  selector: 'tb-login',
 | 
			
		||||
@ -46,8 +46,9 @@ export class LoginComponent extends PageComponent implements OnInit {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  ngOnInit() {
 | 
			
		||||
    if (this.route.snapshot.queryParams["username"] && this.route.snapshot.queryParams["password"]) {
 | 
			
		||||
      this.loginFormGroup.setValue({username: this.route.snapshot.queryParams["username"], password: this.route.snapshot.queryParams["password"]});
 | 
			
		||||
    if (this.route.snapshot.queryParams.username && this.route.snapshot.queryParams.password) {
 | 
			
		||||
      this.loginFormGroup.setValue({username: this.route.snapshot.queryParams.username,
 | 
			
		||||
        password: this.route.snapshot.queryParams.password});
 | 
			
		||||
      this.login();
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user