Skip to content

Commit 8f59fbd

Browse files
committed
event-rule: Do not delete rules by pushing Enter
External buttons seem to also follow the rule that the first associated button is chosen by default. fixes #382
1 parent 574ce0a commit 8f59fbd

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

application/forms/EventRuleConfigForm.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,13 @@ public function prepareObjectFilterUpdate(string $newFilter): ValidHtml
198198
*/
199199
public function createExternalSubmitButtons(): array
200200
{
201-
$buttons = [];
201+
$buttons = [
202+
$this->createElement('submitButton', 'save', [
203+
'data-progress-label' => $this->translate('Saving rule'),
204+
'label' => $this->translate('Save'),
205+
'form' => 'event-rule-config-form'
206+
])
207+
];
202208

203209
if ((int) $this->getValue('id') !== -1) {
204210
$buttons[] = $this->createElement('submitButton', 'delete', [
@@ -210,12 +216,6 @@ public function createExternalSubmitButtons(): array
210216
]);
211217
}
212218

213-
$buttons[] = $this->createElement('submitButton', 'save', [
214-
'data-progress-label' => $this->translate('Saving rule'),
215-
'label' => $this->translate('Save'),
216-
'form' => 'event-rule-config-form'
217-
]);
218-
219219
return $buttons;
220220
}
221221

public/css/detail/event-rule-detail.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@
249249

250250
#save-config {
251251
display: flex;
252+
flex-direction: row-reverse;
252253
gap: .5em;
253254
max-height: 2em;
254255

0 commit comments

Comments
 (0)