Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Making check for 'add' prefix insensitive. Fixes #434
  • Loading branch information
markstory committed Mar 7, 2010
1 parent 12edc75 commit bfbf31e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cake/console/templates/default/views/form.ctp
Expand Up @@ -45,7 +45,8 @@
<div class="actions">
<h3><?php echo "<?php __('Actions'); ?>"; ?></h3>
<ul>
<?php if ($action != 'add'):?>

<?php if (strpos($action, 'add') === false): ?>
<li><?php echo "<?php echo \$this->Html->link(__('Delete', true), array('action' => 'delete', \$this->Form->value('{$modelClass}.{$primaryKey}')), null, sprintf(__('Are you sure you want to delete # %s?', true), \$this->Form->value('{$modelClass}.{$primaryKey}'))); ?>";?></li>
<?php endif;?>
<li><?php echo "<?php echo \$this->Html->link(sprintf(__('List %s', true), __('{$pluralHumanName}', true)), array('action' => 'index'));?>";?></li>
Expand Down

0 comments on commit bfbf31e

Please sign in to comment.