Skip to content

Commit cb7ac09

Browse files
authored
Merge pull request #6 from m0rth1um/patch-1
Add option to hide hr in form buttons
2 parents c0ee955 + 673903b commit cb7ac09

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/View/Helper/CkToolsHelper.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ public function formButtons(array $options = [])
272272
$url = ['action' => 'index'];
273273
$options = Hash::merge([
274274
'useReferer' => false,
275+
'horizontalLine' => true,
275276
'cancelButton' => true,
276277
'saveButtonTitle' => __d('cktools', 'save'),
277278
'cancelButtonTitle' => __d('cktools', 'cancel')
@@ -282,7 +283,9 @@ public function formButtons(array $options = [])
282283
}
283284

284285
$formButtons = '<div class="submit-group">';
285-
$formButtons .= '<hr>';
286+
if ($options['horizontalLine']) {
287+
$formButtons .= '<hr>';
288+
}
286289
$formButtons .= $this->Form->button($options['saveButtonTitle'], ['class' => 'btn-success']);
287290
if ($options['cancelButton']) {
288291
$formButtons .= $this->backButton($options['cancelButtonTitle'], null, ['class' => 'btn btn-default cancel-button', 'icon' => null]);

0 commit comments

Comments
 (0)