From a34782575f92212e7de2c56299ee0e6a0fb2ca9a Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 18 Jul 2015 08:59:33 +0200 Subject: [PATCH] Fix form and upload thing. --- resources/lang/en/form.php | 2 +- resources/lang/nl/form.php | 2 +- resources/twig/transactions/create.twig | 166 ++++++++++++------------ 3 files changed, 86 insertions(+), 84 deletions(-) diff --git a/resources/lang/en/form.php b/resources/lang/en/form.php index 4f570dfeb9..4a962baa67 100644 --- a/resources/lang/en/form.php +++ b/resources/lang/en/form.php @@ -52,7 +52,7 @@ return [ 'csv_config' => 'CSV import configuration', 'specifix' => 'Bank- or file specific fixes', 'csv_import_account' => 'Default import account', - 'attachments' => 'Attachments', + 'attachments[]' => 'Attachments', 'store_new_withdrawal' => 'Store new withdrawal', 'store_new_deposit' => 'Store new deposit', 'store_new_transfer' => 'Store new transfer', diff --git a/resources/lang/nl/form.php b/resources/lang/nl/form.php index 4d6366f73f..771eb4edb1 100644 --- a/resources/lang/nl/form.php +++ b/resources/lang/nl/form.php @@ -51,7 +51,7 @@ return [ 'date_format' => 'Datumformaat', 'csv_config' => 'Configuratiebestand', 'specifix' => 'Bank- or of bestandsspecifieke opties', - 'attachments' => 'Bijlagen', + 'attachments[]' => 'Bijlagen', 'store_new_withdrawal' => 'Nieuwe uitgave opslaan', 'store_new_deposit' => 'Nieuwe inkomsten opslaan', diff --git a/resources/twig/transactions/create.twig b/resources/twig/transactions/create.twig index d67ef828d3..f88e569f29 100644 --- a/resources/twig/transactions/create.twig +++ b/resources/twig/transactions/create.twig @@ -5,97 +5,99 @@ {% endblock %} {% block content %} - {{ Form.open({'class' : 'form-horizontal','id' : 'store','url' : route('transactions.store',what)}) }} - -
-
-
-
-

{{ 'mandatoryFields'|_ }}

-
-
-
- +
+ + -
-
- {{ 'withdrawal'|_ }} - {{ 'deposit'|_ }} - {{ 'transfer'|_ }} +
+
+
+
+

{{ 'mandatoryFields'|_ }}

+
+
+ + + + + {{ ExpandedForm.text('description') }} + + + {{ ExpandedForm.select('account_id',accounts) }} + + + + {{ ExpandedForm.text('expense_account') }} + + + {{ ExpandedForm.text('revenue_account') }} + + + + {{ ExpandedForm.select('account_from_id',accounts) }} + {{ ExpandedForm.select('account_to_id',accounts) }} + + + + {{ ExpandedForm.amount('amount') }} + + + {{ ExpandedForm.date('date', phpdate('Y-m-d')) }} +
+
+
+
+
+
+

{{ 'optionalFields'|_ }}

+
+
+ + {{ ExpandedForm.select('budget_id',budgets,0) }} + + {{ ExpandedForm.text('category') }} + + + {{ ExpandedForm.text('tags') }} + + + + {{ ExpandedForm.select('piggy_bank_id',piggies) }} + + + {{ ExpandedForm.file('attachments[]', {'multiple': 'multiple'}) }} +
+
- - {{ ExpandedForm.text('description') }} - - - {{ ExpandedForm.select('account_id',accounts) }} - - - - {{ ExpandedForm.text('expense_account') }} - - - {{ ExpandedForm.text('revenue_account') }} - - - - {{ ExpandedForm.select('account_from_id',accounts) }} - {{ ExpandedForm.select('account_to_id',accounts) }} - - - - {{ ExpandedForm.amount('amount') }} - - - {{ ExpandedForm.date('date', phpdate('Y-m-d')) }} + +
+
+

{{ 'options'|_ }}

+
+
+ {{ ExpandedForm.optionsList('create','transaction') }} +
+
-
-
-
-

{{ 'optionalFields'|_ }}

-
-
- - {{ ExpandedForm.select('budget_id',budgets,0) }} - - {{ ExpandedForm.text('category') }} - - - {{ ExpandedForm.text('tags') }} - - - - {{ ExpandedForm.select('piggy_bank_id',piggies) }} - - - {{ ExpandedForm.file('attachments', {'multiple': 'multiple'}) }} - -
- -
- - -
-
-

{{ 'options'|_ }}

-
-
- {{ ExpandedForm.optionsList('create','transaction') }} -
- -
-
-
- {{ Form.close|raw }} + {% endblock %} {% block scripts %}