Skip to content

Commit 80dbe20

Browse files
committed
Realign buttons in .form-controls
1 parent bc213fd commit 80dbe20

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
@@ -283,14 +283,6 @@ protected function assemble()
283283
]);
284284

285285
$additionalButtons = [];
286-
$cancelBtn = $this->createElement('submit', 'cancel', [
287-
'label' => $this->translate('Cancel'),
288-
'class' => 'btn-cancel',
289-
'formnovalidate' => true
290-
]);
291-
$this->registerElement($cancelBtn);
292-
$additionalButtons[] = $cancelBtn;
293-
294286
if ($this->showRemoveButton) {
295287
$removeBtn = $this->createElement('submit', 'remove', [
296288
'label' => $this->translate('Remove Entry'),
@@ -301,6 +293,14 @@ protected function assemble()
301293
$additionalButtons[] = $removeBtn;
302294
}
303295

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

306306
$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
@@ -120,14 +120,6 @@ protected function assemble()
120120
]);
121121

122122
$additionalButtons = [];
123-
$cancelBtn = $this->createElement('submit', 'cancel', [
124-
'label' => $this->translate('Cancel'),
125-
'class' => 'btn-cancel',
126-
'formnovalidate' => true
127-
]);
128-
$this->registerElement($cancelBtn);
129-
$additionalButtons[] = $cancelBtn;
130-
131123
if ($this->showRemoveButton) {
132124
$removeBtn = $this->createElement('submit', 'remove', [
133125
'label' => $this->translate('Delete Schedule'),
@@ -138,6 +130,14 @@ protected function assemble()
138130
$additionalButtons[] = $removeBtn;
139131
}
140132

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

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

0 commit comments

Comments
 (0)