Skip to content
This repository has been archived by the owner on Jun 10, 2019. It is now read-only.

Commit

Permalink
Merge pull request #5 from asirco/master
Browse files Browse the repository at this point in the history
Cancel button and Input::old()
  • Loading branch information
loic-sharma committed Jul 12, 2012
2 parents d054e3c + f70e6ad commit f1debfa
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions views/blade/create.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

<div class="actions">
{{Form::submit('Save', array('class' => 'btn primary'))}}
<a href="{{ URL::to(Request::referrer()) }}">Cancel</a>
</div>
</fieldset>
{{Form::close()}}
1 change: 1 addition & 0 deletions views/blade/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

<div class="actions">
{{Form::submit('Save', array('class' => 'btn primary'))}}
<a href="{{ URL::to(Request::referrer()) }}">Cancel</a>
</div>
</fieldset>
{{Form::close()}}
2 changes: 2 additions & 0 deletions views/controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ public function post_create()

else
{
Input::flash();
return Redirect::to('<?php echo $nested_path.$plural; ?>/create')->with_errors($validation->errors);
}
}
Expand Down Expand Up @@ -178,6 +179,7 @@ public function post_edit($id)

else
{
Input::flash();
return Redirect::to('<?php echo $nested_path.$plural; ?>/edit/'.$id)->with_errors($validation->errors);
}
}
Expand Down
1 change: 1 addition & 0 deletions views/php/create.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

<div class="actions">
<?php echo '<?php'; ?> echo Form::submit('Save', array('class' => 'btn primary')); ?>
<a href="<?php echo '<?php'; ?> echo URL::to(<?php echo "Request::referrer()" ?>); ?>"><?php echo "Cancel"; ?></a>
</div>
</fieldset>
<?php echo '<?php'; ?> echo Form::close(); ?>
1 change: 1 addition & 0 deletions views/php/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

<div class="actions">
<?php echo '<?php'; ?> echo Form::submit('Save', array('class' => 'btn primary')); ?>
<a href="<?php echo '<?php'; ?> echo URL::to(<?php echo "Request::referrer()" ?>); ?>"><?php echo "Cancel"; ?></a>
</div>
</fieldset>
<?php echo '<?php'; ?> echo Form::close(); ?>

0 comments on commit f1debfa

Please sign in to comment.