mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-27 11:20:39 -06:00
New setting called 'budgetMaximum', see issue #36
This commit is contained in:
parent
cdb5875d6b
commit
cb2b44fef3
@ -33,9 +33,12 @@ class PreferencesController extends BaseController
|
||||
$viewRange = $preferences->get('viewRange', '1M');
|
||||
$viewRangeValue = $viewRange->data;
|
||||
$frontPage = $preferences->get('frontpageAccounts', []);
|
||||
$budgetMax = $preferences->get('budgetMaximum', 1000);
|
||||
$budgetMaximum = $budgetMax->data;
|
||||
|
||||
|
||||
return View::make('preferences.index')->with('accounts', $accounts)->with('frontpageAccounts', $frontPage)->with('viewRange', $viewRangeValue);
|
||||
return View::make('preferences.index', compact('budgetMaximum'))->with('accounts', $accounts)->with('frontpageAccounts', $frontPage)->with(
|
||||
'viewRange', $viewRangeValue
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -43,7 +46,6 @@ class PreferencesController extends BaseController
|
||||
*/
|
||||
public function postIndex()
|
||||
{
|
||||
|
||||
/** @var \FireflyIII\Shared\Preferences\Preferences $preferences */
|
||||
$preferences = App::make('FireflyIII\Shared\Preferences\Preferences');
|
||||
|
||||
@ -61,6 +63,11 @@ class PreferencesController extends BaseController
|
||||
Session::forget('end');
|
||||
Session::forget('range');
|
||||
|
||||
// budget maximum:
|
||||
$budgetMaximum = intval(Input::get('budgetMaximum'));
|
||||
$preferences->set('budgetMaximum', $budgetMaximum);
|
||||
|
||||
|
||||
Session::flash('success', 'Preferences saved!');
|
||||
|
||||
return Redirect::route('preferences');
|
||||
|
Loading…
Reference in New Issue
Block a user