diff --git a/app/Http/Controllers/BudgetController.php b/app/Http/Controllers/BudgetController.php index dec660f378..6cab6dbf2c 100644 --- a/app/Http/Controllers/BudgetController.php +++ b/app/Http/Controllers/BudgetController.php @@ -60,7 +60,7 @@ class BudgetController extends Controller Session::put('budgets.create.url', URL::previous()); } Session::forget('budgets.create.fromStore'); - $subTitle = 'Create a new budget'; + $subTitle = trans('firefly.create_new_budget'); return view('budgets.create', compact('subTitle')); } diff --git a/public/js/budgets.js b/public/js/budgets.js index 9e189999c0..1ab91d8b23 100644 --- a/public/js/budgets.js +++ b/public/js/budgets.js @@ -20,7 +20,7 @@ $(function () { function updateSingleRange(e) { // get some values: var input = $(e.target); - var id = input.data('id'); + var id = input.data('id'); var value = parseInt(input.val()); var spent = parseFloat($('#spent-' + id).data('value')); @@ -95,7 +95,9 @@ function updateTotal() { } function updateIncome(e) { - $('#monthlyBudgetModal').empty().load('budgets/income').modal('show'); + $('#monthlyBudgetModal').empty().load('budgets/income', function () { + $('#monthlyBudgetModal').modal('show'); + }); return false; } @@ -112,7 +114,7 @@ function updateRanges() { var value = parseInt(input.val()); // calculate sum: - sum += value + sum += value; // update small display: $('#budget-range-display-' + id).text('\u20AC ' + value.toFixed(2)); diff --git a/resources/lang/en/firefly.php b/resources/lang/en/firefly.php index 725aa3b660..bffcf4d117 100644 --- a/resources/lang/en/firefly.php +++ b/resources/lang/en/firefly.php @@ -20,6 +20,10 @@ return [ 'from' => 'From', 'to' => 'To', + 'showEverything' => 'Show everything', + 'create_new_budget' => 'Create a new budget', + 'store_new_budget' => ' Store new budget', + 'availableIn' => 'Available in :date', 'transactionsWithoutBudget' => 'Expenses without budget', 'transactionsWithoutBudgetDate' => 'Expenses without budget in :date', diff --git a/resources/lang/nl/firefly.php b/resources/lang/nl/firefly.php index 88e2f80977..aca206de42 100644 --- a/resources/lang/nl/firefly.php +++ b/resources/lang/nl/firefly.php @@ -20,6 +20,10 @@ return [ 'from' => 'Van', 'to' => 'Tot', + 'showEverything' => 'Laat alles zien', + 'create_new_budget' => 'Maak een nieuw budget', + 'store_new_budget' => 'Sla nieuw budget op', + 'availableIn' => 'Beschikbaar in :date', 'transactionsWithoutBudget' => 'Uitgaven zonder budget', 'transactionsWithoutBudgetDate' => 'Uitgaven zonder budget in :date', diff --git a/resources/twig/budgets/create.twig b/resources/twig/budgets/create.twig index 526bc9d00e..7bd44a5bfc 100644 --- a/resources/twig/budgets/create.twig +++ b/resources/twig/budgets/create.twig @@ -31,7 +31,7 @@

diff --git a/resources/twig/budgets/edit.twig b/resources/twig/budgets/edit.twig index 9818ea25a0..6242dad9ac 100644 --- a/resources/twig/budgets/edit.twig +++ b/resources/twig/budgets/edit.twig @@ -1,12 +1,6 @@ {% extends "./layout/default.twig" %} {% block content %} {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, budget) }} -
-
-

Use budgets to organize and limit your expenses.

-
-
- {{ Form.model(budget, {'class' : 'form-horizontal','id' : 'update','url' : route('budgets.update',budget.id) } ) }}
diff --git a/resources/twig/budgets/income.twig b/resources/twig/budgets/income.twig index d642a54c54..fa89e27828 100644 --- a/resources/twig/budgets/income.twig +++ b/resources/twig/budgets/income.twig @@ -1,13 +1,12 @@ -
- -
\ No newline at end of file diff --git a/resources/twig/budgets/index.twig b/resources/twig/budgets/index.twig index 1bfc6f2100..6de86a80d3 100644 --- a/resources/twig/budgets/index.twig +++ b/resources/twig/budgets/index.twig @@ -185,6 +185,8 @@ {% endblock %} diff --git a/resources/twig/budgets/show.twig b/resources/twig/budgets/show.twig index 7ad2d0add7..d83c8c1d28 100644 --- a/resources/twig/budgets/show.twig +++ b/resources/twig/budgets/show.twig @@ -29,29 +29,29 @@
- Transactions + {{ 'transactions'|_ }}
{% include 'list/journals.twig' %}
{% if limits|length == 1 %} -

Show everything

+

{{ 'showEverything'|_ }}

{% endif %} {% for limit in limits %} {% for rep in limit.limitRepetitions %}
- Amount: {{ rep.amount|formatAmount }} + {{ 'amount'|_ }}: {{ rep.amount|formatAmount }}
- Spent: {{ spentInRepetitionCorrected(rep)|formatAmount }} + {{ 'spent'|_ }}: {{ spentInRepetitionCorrected(rep)|formatAmount }}
@@ -79,7 +79,7 @@ {% endfor %} {% if limits|length == 1 %} -

Show everything

+

{{ 'showEverything'|_ }}

{% endif %}
diff --git a/resources/twig/piggy-banks/add.twig b/resources/twig/piggy-banks/add.twig index ec7fad074a..5efa39cc9b 100644 --- a/resources/twig/piggy-banks/add.twig +++ b/resources/twig/piggy-banks/add.twig @@ -1,18 +1,16 @@ - -