Skip to content

Commit 64f82ab

Browse files
committed
Realign buttons in .form-controls
1 parent 90259fb commit 64f82ab

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

application/forms/EntryForm.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -285,14 +285,6 @@ protected function assemble()
285285
]);
286286

287287
$additionalButtons = [];
288-
$cancelBtn = $this->createElement('submit', 'cancel', [
289-
'label' => $this->translate('Cancel'),
290-
'class' => 'btn-cancel',
291-
'formnovalidate' => true
292-
]);
293-
$this->registerElement($cancelBtn);
294-
$additionalButtons[] = $cancelBtn;
295-
296288
if ($this->showRemoveButton) {
297289
$removeBtn = $this->createElement('submit', 'remove', [
298290
'label' => $this->translate('Remove Entry'),
@@ -303,6 +295,14 @@ protected function assemble()
303295
$additionalButtons[] = $removeBtn;
304296
}
305297

298+
$cancelBtn = $this->createElement('submit', 'cancel', [
299+
'label' => $this->translate('Cancel'),
300+
'class' => 'btn-cancel btn-default',
301+
'formnovalidate' => true
302+
]);
303+
$this->registerElement($cancelBtn);
304+
$additionalButtons[] = $cancelBtn;
305+
306306
$this->getElement('submit')->prependWrapper((new HtmlDocument())->setHtmlContent(...$additionalButtons));
307307

308308
$this->addElement($this->createCsrfCounterMeasure(Session::getSession()->getId()));

application/forms/ScheduleForm.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,6 @@ protected function assemble()
122122
]);
123123

124124
$additionalButtons = [];
125-
$cancelBtn = $this->createElement('submit', 'cancel', [
126-
'label' => $this->translate('Cancel'),
127-
'class' => 'btn-cancel',
128-
'formnovalidate' => true
129-
]);
130-
$this->registerElement($cancelBtn);
131-
$additionalButtons[] = $cancelBtn;
132-
133125
if ($this->showRemoveButton) {
134126
$removeBtn = $this->createElement('submit', 'remove', [
135127
'label' => $this->translate('Delete Schedule'),
@@ -140,6 +132,14 @@ protected function assemble()
140132
$additionalButtons[] = $removeBtn;
141133
}
142134

135+
$cancelBtn = $this->createElement('submit', 'cancel', [
136+
'label' => $this->translate('Cancel'),
137+
'class' => 'btn-cancel btn-default',
138+
'formnovalidate' => true
139+
]);
140+
$this->registerElement($cancelBtn);
141+
$additionalButtons[] = $cancelBtn;
142+
143143
$this->getElement('submit')->prependWrapper((new HtmlDocument())->setHtmlContent(...$additionalButtons));
144144

145145
$this->addElement($this->createCsrfCounterMeasure(Session::getSession()->getId()));

0 commit comments

Comments
 (0)