Various updates to facilitate validating things.

This commit is contained in:
Sander Dorigo
2014-10-06 19:32:09 +02:00
parent 28aaea1aa3
commit d5bcf5497f
13 changed files with 304 additions and 315 deletions

View File

@@ -323,7 +323,7 @@ class TransactionController extends BaseController
public function update(TransactionJournal $journal)
{
switch (Input::get('post_submit_action')) {
case 'store':
case 'update':
case 'return_to_edit':
$what = strtolower($journal->transactionType->type);
$messageBag = $this->_helper->update($journal, Input::all());
@@ -333,7 +333,7 @@ class TransactionController extends BaseController
Event::fire('journals.update', [$journal]);
if (Input::get('post_submit_action') == 'return_to_edit') {
return Redirect::route('transactions.edit', $journal->id);
return Redirect::route('transactions.edit', $journal->id)->withInput();
} else {
return Redirect::route('transactions.index.' . $what);
}