diff --git a/src/ui_ng/src/app/project/create-project/create-project.component.ts b/src/ui_ng/src/app/project/create-project/create-project.component.ts index 89635a905..8f52d9a28 100644 --- a/src/ui_ng/src/app/project/create-project/create-project.component.ts +++ b/src/ui_ng/src/app/project/create-project/create-project.component.ts @@ -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; }