Removed unused "budget maximum" preference

This commit is contained in:
James Cole 2016-09-03 21:13:08 +02:00
parent 8c7ef49eb6
commit ce003f217b
4 changed files with 3 additions and 21 deletions

View File

@ -221,12 +221,11 @@ class BudgetController extends Controller
} }
$budgetMaximum = Preferences::get('budgetMaximum', 1000)->data;
$defaultCurrency = Amount::getDefaultCurrency(); $defaultCurrency = Amount::getDefaultCurrency();
return view( return view(
'budgets.index', compact( 'budgets.index', compact(
'budgetMaximum', 'periodStart', 'periodEnd', 'periodStart', 'periodEnd',
'period', 'range', 'budgetIncomeTotal', 'period', 'range', 'budgetIncomeTotal',
'defaultCurrency', 'inactive', 'budgets', 'defaultCurrency', 'inactive', 'budgets',
'spent', 'budgeted' 'spent', 'budgeted'

View File

@ -79,9 +79,7 @@ class PreferencesController extends Controller
$viewRangePref = Preferences::get('viewRange', '1M'); $viewRangePref = Preferences::get('viewRange', '1M');
$viewRange = $viewRangePref->data; $viewRange = $viewRangePref->data;
$frontPageAccounts = Preferences::get('frontPageAccounts', []); $frontPageAccounts = Preferences::get('frontPageAccounts', []);
$budgetMax = Preferences::get('budgetMaximum', 1000);
$language = Preferences::get('language', env('DEFAULT_LANGUAGE', 'en_US'))->data; $language = Preferences::get('language', env('DEFAULT_LANGUAGE', 'en_US'))->data;
$budgetMaximum = $budgetMax->data;
$transactionPageSize = Preferences::get('transactionPageSize', 50)->data; $transactionPageSize = Preferences::get('transactionPageSize', 50)->data;
$customFiscalYear = Preferences::get('customFiscalYear', 0)->data; $customFiscalYear = Preferences::get('customFiscalYear', 0)->data;
$fiscalYearStartStr = Preferences::get('fiscalYearStart', '01-01')->data; $fiscalYearStartStr = Preferences::get('fiscalYearStart', '01-01')->data;
@ -93,7 +91,7 @@ class PreferencesController extends Controller
return view( return view(
'preferences.index', 'preferences.index',
compact( compact(
'budgetMaximum', 'language', 'accounts', 'frontPageAccounts', 'language', 'accounts', 'frontPageAccounts',
'viewRange', 'customFiscalYear', 'transactionPageSize', 'fiscalYearStart', 'is2faEnabled', 'viewRange', 'customFiscalYear', 'transactionPageSize', 'fiscalYearStart', 'is2faEnabled',
'has2faSecret', 'showIncomplete' 'has2faSecret', 'showIncomplete'
) )
@ -137,10 +135,6 @@ class PreferencesController extends Controller
Session::forget('end'); Session::forget('end');
Session::forget('range'); Session::forget('range');
// budget maximum:
$budgetMaximum = intval(Input::get('budgetMaximum'));
Preferences::set('budgetMaximum', $budgetMaximum);
// custom fiscal year // custom fiscal year
$customFiscalYear = intval(Input::get('customFiscalYear')) === 1; $customFiscalYear = intval(Input::get('customFiscalYear')) === 1;
$fiscalYearStart = date('m-d', strtotime(Input::get('fiscalYearStart'))); $fiscalYearStart = date('m-d', strtotime(Input::get('fiscalYearStart')));

View File

@ -125,7 +125,7 @@
<input type="hidden" name="balance_currency_id" value="1"/> <input type="hidden" name="balance_currency_id" value="1"/>
<input class="form-control budgetAmount" data-original="{{ budget.currentRep.amount|number_format(0,'','') }}" <input class="form-control budgetAmount" data-original="{{ budget.currentRep.amount|number_format(0,'','') }}"
data-id="{{ budget.id }}" value="{{ budget.currentRep.amount|number_format(0,'','') }}" autocomplete="off" data-id="{{ budget.id }}" value="{{ budget.currentRep.amount|number_format(0,'','') }}" autocomplete="off"
step="1" min="0" max="{{ budgetMaximum }}" name="amount" type="number"> step="1" min="0" name="amount" type="number">
</div> </div>
<!-- <!--
<div class="small"> <div class="small">

View File

@ -34,17 +34,6 @@
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ 'pref_budget_settings'|_ }}</h3>
</div>
<div class="box-body">
<p class="text-info">
{{ 'pref_budget_settings_help'|_ }}
</p>
{{ ExpandedForm.amount('budgetMaximum',budgetMaximum,{'label' : 'budget_maximum'|_}) }}
</div>
</div>
<div class="box"> <div class="box">
<div class="box-header with-border"> <div class="box-header with-border">
<h3 class="box-title">{{ 'pref_custom_fiscal_year'|_ }}</h3> <h3 class="box-title">{{ 'pref_custom_fiscal_year'|_ }}</h3>