mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-23 10:45:45 +01:00
fix2564 issue
This commit is contained in:
parent
186538010d
commit
66bfc02d5b
@ -54,6 +54,7 @@ export class CreateProjectComponent implements AfterViewChecked, OnInit, OnDestr
|
||||
createProjectOpened: boolean;
|
||||
|
||||
hasChanged: boolean;
|
||||
btnIsOk:boolean=false;
|
||||
|
||||
staticBackdrop: boolean = true;
|
||||
closable: boolean = false;
|
||||
@ -90,6 +91,7 @@ export class CreateProjectComponent implements AfterViewChecked, OnInit, OnDestr
|
||||
.checkProjectExists(cont.value).toPromise()
|
||||
.then(() => {
|
||||
//Project existing
|
||||
this.btnIsOk=true;
|
||||
this.isNameValid = false;
|
||||
this.nameTooltipText = 'PROJECT.NAME_ALREADY_EXISTS';
|
||||
this.checkOnGoing = false;
|
||||
@ -109,6 +111,7 @@ export class CreateProjectComponent implements AfterViewChecked, OnInit, OnDestr
|
||||
}
|
||||
|
||||
onSubmit() {
|
||||
this.btnIsOk=false;
|
||||
this.projectService
|
||||
.createProject(this.project.name, this.project.public ? 1 : 0)
|
||||
.subscribe(
|
||||
@ -181,9 +184,10 @@ export class CreateProjectComponent implements AfterViewChecked, OnInit, OnDestr
|
||||
this.projectForm.reset();
|
||||
}
|
||||
|
||||
public get isValid(): boolean {
|
||||
return this.currentForm &&
|
||||
this.currentForm.valid &&
|
||||
public get isValid(): boolean {git
|
||||
return this.currentForm &&
|
||||
this.currentForm.valid &&
|
||||
this.btnIsOk&&
|
||||
this.isNameValid &&
|
||||
!this.checkOnGoing;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user