diff --git a/application/controllers/ContactGroupController.php b/application/controllers/ContactGroupController.php index 7d8198ef3..4d4f06275 100644 --- a/application/controllers/ContactGroupController.php +++ b/application/controllers/ContactGroupController.php @@ -85,7 +85,7 @@ public function editAction(): void if ($form->hasBeenRemoved()) { $form->removeContactgroup(); Notification::success(sprintf( - t('Successfully removed contact group %s'), + t('Deleted contact group "%s" successfully'), $form->getValue('group_name') )); $this->switchToSingleColumnLayout(); diff --git a/application/forms/ContactGroupForm.php b/application/forms/ContactGroupForm.php index e94985da1..2f85de3fa 100644 --- a/application/forms/ContactGroupForm.php +++ b/application/forms/ContactGroupForm.php @@ -83,17 +83,17 @@ protected function assemble(): void ); if ($this->contactgroupId) { - $removeBtn = new SubmitElement( - 'remove', + $deleteBtn = new SubmitElement( + 'delete', [ - 'label' => $this->translate('Remove'), + 'label' => $this->translate('Delete'), 'class' => 'btn-remove', 'formnovalidate' => true ] ); - $this->registerElement($removeBtn); - $this->getElement('submit')->prependWrapper((new HtmlDocument())->setHtmlContent($removeBtn)); + $this->registerElement($deleteBtn); + $this->getElement('submit')->prependWrapper((new HtmlDocument())->setHtmlContent($deleteBtn)); } } @@ -107,7 +107,7 @@ public function hasBeenRemoved(): bool $btn = $this->getPressedSubmitElement(); $csrf = $this->getElement('CSRFToken'); - return $csrf !== null && $csrf->isValid() && $btn !== null && $btn->getName() === 'remove'; + return $csrf !== null && $csrf->isValid() && $btn !== null && $btn->getName() === 'delete'; } /** diff --git a/application/forms/ScheduleForm.php b/application/forms/ScheduleForm.php index 68e08d9a8..6f499c06c 100644 --- a/application/forms/ScheduleForm.php +++ b/application/forms/ScheduleForm.php @@ -61,7 +61,7 @@ public function hasBeenRemoved(): bool $btn = $this->getPressedSubmitElement(); $csrf = $this->getElement('CSRFToken'); - return $csrf !== null && $csrf->isValid() && $btn !== null && $btn->getName() === 'remove'; + return $csrf !== null && $csrf->isValid() && $btn !== null && $btn->getName() === 'delete'; } public function loadSchedule(int $id): void @@ -164,8 +164,8 @@ protected function assemble() ]); if ($this->showRemoveButton) { - $removeBtn = $this->createElement('submit', 'remove', [ - 'label' => $this->translate('Remove'), + $removeBtn = $this->createElement('submit', 'delete', [ + 'label' => $this->translate('Delete'), 'class' => 'btn-remove', 'formnovalidate' => true ]);