Skip to content
Permalink
Browse files

Update bake templates.

Now using 'confirm' key in options for FormHelper::postLink()
instead of removed param $confirmMessage.
  • Loading branch information...
ADmad committed Jul 5, 2014
1 parent 9d64ac6 commit 0c1b25b774661f409a8171630f2be762801e5233
@@ -49,7 +49,7 @@ use Cake\Utility\Inflector;
<h3><?= "<?= __('Actions'); ?>"; ?></h3>
<ul>
<?php if (strpos($action, 'add') === false): ?>
<li><?= "<?= \$this->Form->postLink(__('Delete'), ['action' => 'delete', \${$singularVar}->{$primaryKey[0]}], [], __('Are you sure you want to delete # %s?', \${$singularVar}->{$primaryKey[0]})); ?>"; ?></li>
<li><?= "<?= \$this->Form->postLink(__('Delete'), ['action' => 'delete', \${$singularVar}->{$primaryKey[0]}], ['confirm' => __('Are you sure you want to delete # %s?', \${$singularVar}->{$primaryKey[0]})]); ?>"; ?></li>
<?php endif; ?>
<li><?= "<?= \$this->Html->link(__('List " . $pluralHumanName . "'), ['action' => 'index']); ?>"; ?></li>
<?php
@@ -47,7 +47,7 @@ use Cake\Utility\Inflector;
echo "\t\t<td class=\"actions\">\n";
echo "\t\t\t<?= \$this->Html->link(__('View'), ['action' => 'view', {$pk}]); ?>\n";
echo "\t\t\t<?= \$this->Html->link(__('Edit'), ['action' => 'edit', {$pk}]); ?>\n";
echo "\t\t\t<?= \$this->Form->postLink(__('Delete'), ['action' => 'delete', {$pk}], [], __('Are you sure you want to delete # %s?', {$pk})); ?>\n";
echo "\t\t\t<?= \$this->Form->postLink(__('Delete'), ['action' => 'delete', {$pk}], ['confirm' => __('Are you sure you want to delete # %s?', {$pk})]); ?>\n";
echo "\t\t</td>\n";
echo "\t</tr>\n";
@@ -45,7 +45,7 @@ foreach ($fields as $field) {
$pk = "\${$singularVar}->{$primaryKey[0]}";
echo "\t\t<li><?= \$this->Html->link(__('Edit " . $singularHumanName ."'), ['action' => 'edit', {$pk}]); ?> </li>\n";
echo "\t\t<li><?= \$this->Form->postLink(__('Delete " . $singularHumanName . "'), ['action' => 'delete', {$pk}], [], __('Are you sure you want to delete # %s?', {$pk})); ?> </li>\n";
echo "\t\t<li><?= \$this->Form->postLink(__('Delete " . $singularHumanName . "'), ['action' => 'delete', {$pk}], ['confirm' => __('Are you sure you want to delete # %s?', {$pk})]); ?> </li>\n";
echo "\t\t<li><?= \$this->Html->link(__('List " . $pluralHumanName . "'), ['action' => 'index']); ?> </li>\n";
echo "\t\t<li><?= \$this->Html->link(__('New " . $singularHumanName . "'), ['action' => 'add']); ?> </li>\n";
@@ -123,7 +123,7 @@ echo "\t\t<?php foreach (\${$singularVar}->{$details['property']} as \${$otherSi
echo "\t\t\t<td class=\"actions\">\n";
echo "\t\t\t\t<?= \$this->Html->link(__('View'), ['controller' => '{$details['controller']}', 'action' => 'view', {$otherPk}]); ?>\n";
echo "\t\t\t\t<?= \$this->Html->link(__('Edit'), ['controller' => '{$details['controller']}', 'action' => 'edit', {$otherPk}]); ?>\n";
echo "\t\t\t\t<?= \$this->Form->postLink(__('Delete'), ['controller' => '{$details['controller']}', 'action' => 'delete', {$otherPk}], [], __('Are you sure you want to delete # %s?', {$otherPk})); ?>\n";
echo "\t\t\t\t<?= \$this->Form->postLink(__('Delete'), ['controller' => '{$details['controller']}', 'action' => 'delete', {$otherPk}], ['confirm' => __('Are you sure you want to delete # %s?', {$otherPk})]); ?>\n";
echo "\t\t\t</td>\n";
echo "\t\t</tr>\n";

0 comments on commit 0c1b25b

Please sign in to comment.
You can’t perform that action at this time.