Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion application/controllers/ContactGroupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

$query = Contactgroup::on(Database::get())
->columns(['id', 'name'])
->filter(Filter::equal('id', $groupId));

Check failure on line 36 in application/controllers/ContactGroupController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.4 on ubuntu-latest

Parameter #2 $value of static method ipl\Stdlib\Filter::equal() expects array<mixed>|bool|float|int|string, mixed given.

Check failure on line 36 in application/controllers/ContactGroupController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.2 on ubuntu-latest

Parameter #2 $value of static method ipl\Stdlib\Filter::equal() expects array<mixed>|bool|float|int|string, mixed given.

Check failure on line 36 in application/controllers/ContactGroupController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.3 on ubuntu-latest

Parameter #2 $value of static method ipl\Stdlib\Filter::equal() expects array<mixed>|bool|float|int|string, mixed given.

$group = $query->first();
if ($group === null) {
Expand Down Expand Up @@ -84,7 +84,7 @@
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();
Expand Down
12 changes: 6 additions & 6 deletions application/forms/ContactGroupForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

Expand All @@ -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';
}

/**
Expand Down
6 changes: 3 additions & 3 deletions application/forms/ScheduleForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,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
Expand Down Expand Up @@ -180,8 +180,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
]);
Expand Down
Loading