Components/delete-modal: reformat

This commit is contained in:
Toast 2025-02-05 01:08:38 +01:00
parent 093180f5b2
commit d1fd09ab75
3 changed files with 75 additions and 69 deletions

View file

@ -1,6 +1,12 @@
import {Component, inject} from '@angular/core';
import {NgbActiveModal, NgbCollapse} from '@ng-bootstrap/ng-bootstrap';
import {FormControl, FormGroup, FormsModule, ReactiveFormsModule, Validators} from '@angular/forms';
import {
FormControl,
FormGroup,
FormsModule,
ReactiveFormsModule,
Validators
} from '@angular/forms';
@Component({
selector: 'app-delete-modal',
@ -27,10 +33,10 @@ export class DeleteModalComponent {
deletePressed() {
if (this.formHidden) {
const regex = new RegExp(this.showName)
const control = new FormControl("", [Validators.required, Validators.pattern(regex)])
this.confirmationForm.setControl("name", control)
if (this.formHidden) {
this.formHidden = false;
this.buttonDisabled = true;
} else {