Components/delete-modal: fix
This commit is contained in:
parent
d1fd09ab75
commit
d9a26a6645
1 changed files with 4 additions and 3 deletions
|
|
@ -33,10 +33,11 @@ export class DeleteModalComponent {
|
||||||
|
|
||||||
|
|
||||||
deletePressed() {
|
deletePressed() {
|
||||||
const regex = new RegExp(this.showName)
|
|
||||||
const control = new FormControl("", [Validators.required, Validators.pattern(regex)])
|
|
||||||
this.confirmationForm.setControl("name", control)
|
|
||||||
if (this.formHidden) {
|
if (this.formHidden) {
|
||||||
|
// Only add the control the first time the button is pressed
|
||||||
|
const regex = new RegExp(this.showName)
|
||||||
|
const control = new FormControl("", [Validators.required, Validators.pattern(regex)])
|
||||||
|
this.confirmationForm.setControl("name", control)
|
||||||
this.formHidden = false;
|
this.formHidden = false;
|
||||||
this.buttonDisabled = true;
|
this.buttonDisabled = true;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue