Skip to content

Commit

Permalink
Fixes #447 - added asset log entry on save
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Jan 22, 2015
1 parent 6fba41e commit 4a77dee
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/controllers/admin/AssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,15 @@ public function postCreate()

// Was the asset created?
if($asset->save()) {

$logaction = new Actionlog();
$logaction->asset_id = $asset->id;
$logaction->checkedout_to = $asset->assigned_to;
$logaction->asset_type = 'hardware';
$logaction->user_id = Sentry::getUser()->id;
$logaction->note = e(Input::get('note'));
$log = $logaction->logaction('checkout');

// Redirect to the asset listing page
return Redirect::to("hardware")->with('success', Lang::get('admin/hardware/message.create.success'));
}
Expand Down

0 comments on commit 4a77dee

Please sign in to comment.