Skip to content

Commit

Permalink
Add new "form.before_butttons" block.
Browse files Browse the repository at this point in the history
It allows you to add content before the save buttons of form.
  • Loading branch information
ADmad committed Sep 29, 2017
1 parent 2a59b15 commit 0eccf3e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Template/Element/form.ctp
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<?php
use Cake\Utility\Text;

$formSidebarExists = $this->exists('form.sidebar');
if ($this->exists('form.before_create')) {
echo $this->fetch('form.before_create');
Expand Down Expand Up @@ -30,6 +28,9 @@ if ($this->exists('form.before_create')) {
</div>
<?php endif; ?>
</div>
<?php if ($this->exists('form.before_buttons')) : ?>
<?= $this->fetch('form.before_buttons'); ?>
<?php endif; ?>
<div class="row">
<div class="col-lg-<?= $formSidebarExists ? '8' : '12' ?>">
<div class="form-group">
Expand Down

0 comments on commit 0eccf3e

Please sign in to comment.