From 1f321fadd498ebf5bf7bf2bbce6d931b066323c2 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 27 Aug 2016 04:18:02 +0200 Subject: [PATCH] Removed some form-tags in favour of plain HTML Signed-off-by: James Cole --- resources/views/accounts/delete.twig | 79 ++++----- resources/views/attachments/delete.twig | 42 ++--- resources/views/bills/delete.twig | 51 +++--- resources/views/budgets/delete.twig | 57 ++++--- resources/views/categories/delete.twig | 52 +++--- resources/views/currency/delete.twig | 42 ++--- resources/views/piggy-banks/delete.twig | 42 ++--- resources/views/rules/rule-group/delete.twig | 74 ++++---- resources/views/rules/rule/delete.twig | 42 ++--- resources/views/tags/delete.twig | 53 +++--- resources/views/transactions/delete.twig | 57 +++---- resources/views/transactions/mass-delete.twig | 122 +++++++------- resources/views/transactions/mass-edit.twig | 158 +++++++++--------- 13 files changed, 443 insertions(+), 428 deletions(-) diff --git a/resources/views/accounts/delete.twig b/resources/views/accounts/delete.twig index 3e730fec42..ac4771189c 100644 --- a/resources/views/accounts/delete.twig +++ b/resources/views/accounts/delete.twig @@ -6,52 +6,53 @@ {% block content %} - {{ Form.open({'class' : 'form-horizontal','id' : 'destroy','url' : route('accounts.destroy',account.id)}) }} -
-
-
-
-

{{ trans('form.delete_account', {'name': account.name}) }}

-
-
-

- {{ trans('form.permDeleteWarning') }} -

- -

- {{ trans('form.account_areYouSure', {'name': account.name}) }} -

- - {% if account.transactions|length > 0 or account.piggyBanks|length > 0 %} -

- {% if account.transactions|length > 0 %} - {{ Lang.choice('form.also_delete_transactions', account.transactions|length, {count: account.transactions|length}) }} - {% endif %}
- {% if account.piggyBanks|length > 0 %} - {{ Lang.choice('form.also_delete_piggyBanks', account.piggyBanks|length, {count: account.piggyBanks|length}) }} - {% endif %} -

- {% endif %} - {% if account.transactions|length > 0 %} -

- {{ 'save_transactions_by_moving'|_ }} +

+ +
+
+
+
+

{{ trans('form.delete_account', {'name': account.name}) }}

+
+
+

+ {{ trans('form.permDeleteWarning') }}

- {{ Form.select('move_account_before_delete', accountList, null, {class: 'form-control'}) }} + {{ trans('form.account_areYouSure', {'name': account.name}) }}

- {% else %} - - {% endif %} -
- +
-
- {{ Form.close|raw }} + {% endblock %} diff --git a/resources/views/attachments/delete.twig b/resources/views/attachments/delete.twig index 3b7d412b32..a6191d5c6e 100644 --- a/resources/views/attachments/delete.twig +++ b/resources/views/attachments/delete.twig @@ -6,29 +6,29 @@ {% block content %} - {{ Form.open({'class' : 'form-horizontal','id' : 'destroy','url' : route('attachments.destroy',attachment.id)}) }} -
-
-
-
-

{{ trans('form.delete_attachment', {'name': attachment.filename}) }}

-
-
-

- {{ trans('form.permDeleteWarning') }} -

+
+ +
+
+
+
+

{{ trans('form.delete_attachment', {'name': attachment.filename}) }}

+
+
+

+ {{ trans('form.permDeleteWarning') }} +

-

- {{ trans('form.attachment_areYouSure', {'name': attachment.filename}) }} -

-
- +
-
- - {{ Form.close|raw }} + {% endblock %} diff --git a/resources/views/bills/delete.twig b/resources/views/bills/delete.twig index 89c1e76621..d9185aa759 100644 --- a/resources/views/bills/delete.twig +++ b/resources/views/bills/delete.twig @@ -6,34 +6,35 @@ {% block content %} - {{ Form.open({'class' : 'form-horizontal','id' : 'destroy','url' : route('bills.destroy',bill.id)}) }} -
-
-
-
-

{{ trans('form.delete_bill', {'name': bill.name}) }}

-
-
-

- {{ trans('form.permDeleteWarning') }} -

+
+ +
+
+
+
+

{{ trans('form.delete_bill', {'name': bill.name}) }}

+
+
+

+ {{ trans('form.permDeleteWarning') }} +

-

- {{ trans('form.bill_areYouSure', {'name': bill.name}) }} -

+

+ {{ trans('form.bill_areYouSure', {'name': bill.name}) }} +

-

- {% if bill.transactionjournals|length > 0 %} - {{ Lang.choice('form.bill_keep_transactions', bill.transactionjournals|length,{count: bill.transactionjournals|length}) }} - {% endif %} -

-
- +
-
- {{ Form.close|raw }} + {% endblock %} diff --git a/resources/views/budgets/delete.twig b/resources/views/budgets/delete.twig index 9497d1c707..10601310ee 100644 --- a/resources/views/budgets/delete.twig +++ b/resources/views/budgets/delete.twig @@ -5,37 +5,40 @@ {% endblock %} {% block content %} - {{ Form.open({'class' : 'form-horizontal','id' : 'destroy','url' : route('budgets.destroy',budget.id) }) }} -
-
-
-
-

{{ trans('form.delete_budget', {'name': budget.name}) }}

-
-
-

- {{ trans('form.permDeleteWarning') }} -

-

- {{ trans('form.budget_areYouSure', {'name': budget.name}) }} -

+
+ + +
+
+
+
+

{{ trans('form.delete_budget', {'name': budget.name}) }}

+
+
+

+ {{ trans('form.permDeleteWarning') }} +

+ +

+ {{ trans('form.budget_areYouSure', {'name': budget.name}) }} +

+ +

+ {% if budget.transactionjournals|length > 0 %} + {{ Lang.choice('form.budget_keep_transactions', budget.transactionjournals|length, {count: budget.transactionjournals|length}) }} + {% endif %} +

+ +
+ -

- {% if budget.transactionjournals|length > 0 %} - {{ Lang.choice('form.budget_keep_transactions', budget.transactionjournals|length, {count: budget.transactionjournals|length}) }} - {% endif %} -

- - -
-
- {{ Form.close|raw }} + {% endblock %} diff --git a/resources/views/categories/delete.twig b/resources/views/categories/delete.twig index de9fc3b65a..858af38417 100644 --- a/resources/views/categories/delete.twig +++ b/resources/views/categories/delete.twig @@ -5,35 +5,37 @@ {% endblock %} {% block content %} - {{ Form.open({'class' : 'form-horizontal','id' : 'destroy','url' : route('categories.destroy',category.id)}) }} -
-
-
-
-

{{ trans('form.delete_category', {'name': category.name}) }}

-
-
-

- {{ trans('form.permDeleteWarning') }} -

-

- {{ trans('form.category_areYouSure', {'name': category.name}) }} -

+
+ +
+
+
+
+

{{ trans('form.delete_category', {'name': category.name}) }}

+
+
+

+ {{ trans('form.permDeleteWarning') }} +

-

- {% if category.transactionjournals|length > 0 %} - {{ Lang.choice('form.category_keep_transactions', category.transactionjournals|length, {count: category.transactionjournals|length}) }} - {% endif %} -

-
- +
-
- {{ Form.close|raw }} + {% endblock %} diff --git a/resources/views/currency/delete.twig b/resources/views/currency/delete.twig index 69d1d7bacf..492f33b6e0 100644 --- a/resources/views/currency/delete.twig +++ b/resources/views/currency/delete.twig @@ -6,30 +6,30 @@ {% block content %} - {{ Form.open({'class' : 'form-horizontal','id' : 'destroy','url' : route('currency.destroy',currency.id)}) }} -
-
-
-
-

{{ trans('form.delete_currency', {'name': currency.name}) }}

-
-
-

- {{ trans('form.permDeleteWarning') }} -

+
+ +
+
+
+
+

{{ trans('form.delete_currency', {'name': currency.name}) }}

+
+
+

+ {{ trans('form.permDeleteWarning') }} +

-

- {{ trans('form.currency_areYouSure', {'name': currency.name}) }} -

-
- +
-
- - {{ Form.close|raw }} + {% endblock %} diff --git a/resources/views/piggy-banks/delete.twig b/resources/views/piggy-banks/delete.twig index 74e954fe14..6c52087c91 100644 --- a/resources/views/piggy-banks/delete.twig +++ b/resources/views/piggy-banks/delete.twig @@ -5,29 +5,31 @@ {% endblock %} {% block content %} - {{ Form.open({'class' : 'form-horizontal','id' : 'destroy','url' : route('piggy-banks.destroy',piggyBank.id)}) }} -
-
-
-
-

{{ trans('firefly.delete_piggy_bank', {'name': piggyBank.name}) }}

-
-
-

- {{ trans('form.permDeleteWarning') }} -

-

- {{ trans('form.piggyBank_areYouSure', {'name': piggyBank.name}) }} -

-
- - {{ Form.close|raw }} + {% endblock %} diff --git a/resources/views/rules/rule-group/delete.twig b/resources/views/rules/rule-group/delete.twig index 17aa5a2bd5..123977b5c1 100644 --- a/resources/views/rules/rule-group/delete.twig +++ b/resources/views/rules/rule-group/delete.twig @@ -5,49 +5,51 @@ {% endblock %} {% block content %} - {{ Form.open({'class' : 'form-horizontal','id' : 'destroy','url' : route('rules.rule-group.destroy',ruleGroup.id) }) }} -
-
-
-
-

{{ trans('form.delete_rule_group', {'title': ruleGroup.title}) }}

-
-
-

- {{ trans('form.permDeleteWarning') }} -

-

- {{ trans('form.ruleGroup_areYouSure', {'title': ruleGroup.title}) }} -

- -

- {% if ruleGroup.rules|length > 0 %} - {{ Lang.choice('form.also_delete_rules', ruleGroup.rules|length, {count: ruleGroup.rules|length}) }} - {% endif %} -

- - {% if ruleGroup.rules|length > 0 %} -

- {{ 'save_rules_by_moving'|_ }} +

+ +
+
+
+
+

{{ trans('form.delete_rule_group', {'title': ruleGroup.title}) }}

+
+
+

+ {{ trans('form.permDeleteWarning') }}

- {{ Form.select('move_rules_before_delete', ruleGroupList, null, {class: 'form-control'}) }} + {{ trans('form.ruleGroup_areYouSure', {'title': ruleGroup.title}) }}

- {% else %} - - {% endif %} + +

+ {% if ruleGroup.rules|length > 0 %} + {{ Lang.choice('form.also_delete_rules', ruleGroup.rules|length, {count: ruleGroup.rules|length}) }} + {% endif %} +

+ + {% if ruleGroup.rules|length > 0 %} +

+ {{ 'save_rules_by_moving'|_ }} +

+ +

+ {{ Form.select('move_rules_before_delete', ruleGroupList, null, {class: 'form-control'}) }} +

+ {% else %} + + {% endif %} + +
+ +
- - -
-
- {{ Form.close|raw }} + {% endblock %} diff --git a/resources/views/rules/rule/delete.twig b/resources/views/rules/rule/delete.twig index c468dcfa47..3c37f0da08 100644 --- a/resources/views/rules/rule/delete.twig +++ b/resources/views/rules/rule/delete.twig @@ -5,28 +5,30 @@ {% endblock %} {% block content %} - {{ Form.open({'class' : 'form-horizontal','id' : 'destroy','url' : route('rules.rule.destroy',rule.id) }) }} -
-
-
-
-

{{ trans('form.delete_rule', {'title': rule.title}) }}

-
-
-

- {{ trans('form.permDeleteWarning') }} -

-

- {{ trans('form.rule_areYouSure', {'title': rule.title}) }} -

-
- - {{ Form.close|raw }} + {% endblock %} diff --git a/resources/views/tags/delete.twig b/resources/views/tags/delete.twig index ca1a79c8fe..966ad7e011 100644 --- a/resources/views/tags/delete.twig +++ b/resources/views/tags/delete.twig @@ -5,35 +5,36 @@ {% endblock %} {% block content %} - {{ Form.open({'class' : 'form-horizontal','id' : 'destroy','url' : route('tags.destroy',tag.id)}) }} -
-
-
-
-

Delete tag "{{ tag.tag }}"

-
-
-

- {{ trans('form.permDeleteWarning') }} -

-

- {{ trans('form.tag_areYouSure', {'tag': tag.tag}) }} -

+
+ +
+
+
+
+

Delete tag "{{ tag.tag }}"

+
+
+

+ {{ trans('form.permDeleteWarning') }} +

-

- {% if tag.transactionjournals|length == 0 %} - {{ Lang.choice('form.tag_keep_transactions', tag.transactionjournals|length, {count: tag.transactionjournals|length}) }} - {% endif %} -

-
- +
-
- - {{ Form.close|raw }} + {% endblock %} diff --git a/resources/views/transactions/delete.twig b/resources/views/transactions/delete.twig index 80e4f4e2ef..0ce9edbec9 100644 --- a/resources/views/transactions/delete.twig +++ b/resources/views/transactions/delete.twig @@ -5,38 +5,39 @@ {% endblock %} {% block content %} - {{ Form.open({'class' : 'form-horizontal','id' : 'destroy','url' : route('transactions.destroy',journal.id)}) }} +
+ -
-
-
-
-

{{ trans('form.delete_journal', {'description': journal.description}) }}

-
-
-

- {{ trans('form.permDeleteWarning') }} -

+
+
+
+
+

{{ trans('form.delete_journal', {'description': journal.description}) }}

+
+
+

+ {{ trans('form.permDeleteWarning') }} +

-

- {{ trans('form.journal_areYouSure', {'description': journal.description}) }} -

-
- +
-
- {{ Form.close|raw }} + {% endblock %} diff --git a/resources/views/transactions/mass-delete.twig b/resources/views/transactions/mass-delete.twig index c8ebe76b87..2be459dbbc 100644 --- a/resources/views/transactions/mass-delete.twig +++ b/resources/views/transactions/mass-delete.twig @@ -5,74 +5,74 @@ {% endblock %} {% block content %} - {{ Form.open({'class' : 'form-horizontal','id' : 'destroy','url' : route('transactions.mass-destroy')}) }} +
+ -
-
-
-
-

{{ 'mass_delete_journals'|_ }}

-
-
-

- {{ trans('form.permDeleteWarning') }} - {{ 'perm-delete-many'|_ }} -

+
+
+
+
+

{{ 'mass_delete_journals'|_ }}

+
+
+

+ {{ trans('form.permDeleteWarning') }} + {{ 'perm-delete-many'|_ }} +

-

- {{ trans('form.mass_journal_are_you_sure') }} - {{ trans('form.mass_make_selection') }} -

+

+ {{ trans('form.mass_journal_are_you_sure') }} + {{ trans('form.mass_make_selection') }} +

- - - - - - - - - - {% for journal in journals %} +
 {{ trans('list.description') }}{{ trans('list.amount') }}
- - - - - - + + + + + + - {% endfor %} -
- - - {{ journal.description }} - - {{ journal|formatJournal }} - - {{ journal.date.formatLocalized(monthAndDayFormat) }} - - {% if journal.source_account_type == 'Cash account' %} - (cash) - {% else %} - {{ journal.source_account_name }} - {% endif %} - - {% if journal.destination_account_type == 'Cash account' %} - (cash) - {% else %} - {{ journal.destination_account_name }} - {% endif %} -  {{ trans('list.description') }}{{ trans('list.amount') }}
+ {% for journal in journals %} + + + + + + {{ journal.description }} + + + {{ journal|formatJournal }} + + + {{ journal.date.formatLocalized(monthAndDayFormat) }} + + + {% if journal.source_account_type == 'Cash account' %} + (cash) + {% else %} + {{ journal.source_account_name }} + {% endif %} + + + {% if journal.destination_account_type == 'Cash account' %} + (cash) + {% else %} + {{ journal.destination_account_name }} + {% endif %} + + + {% endfor %} + -
- +
-
- - {{ Form.close|raw }} + {% endblock %} diff --git a/resources/views/transactions/mass-edit.twig b/resources/views/transactions/mass-edit.twig index ddeb20afa9..7ad49060f9 100644 --- a/resources/views/transactions/mass-edit.twig +++ b/resources/views/transactions/mass-edit.twig @@ -5,95 +5,95 @@ {% endblock %} {% block content %} - {{ Form.open({'class' : 'form-horizontal','id' : 'destroy','url' : route('transactions.mass-update')}) }} +
+ -
-
-
-
-

{{ 'mass_edit_journals'|_ }}

-
-
-

- {{ 'cannot_edit_other_fields'|_ }} -

- - - - - - - - - - {% for journal in journals %} - {% if journal.transaction_count == 2 %} - - - - - - + + {% endif %} + {% endfor %} +
 {{ trans('list.description') }}{{ trans('list.amount') }}{{ trans('list.date') }}{{ trans('list.from') }}{{ trans('list.to') }}
- - - - - - - - - - - {{ ExpandedForm.amountSmall('amount_'~journal.id, journal.amount, {'name' : 'amount['~journal.id~']', 'currency' : journal.transactionCurrency}) }} - - - - +
+
+
+
+

{{ 'mass_edit_journals'|_ }}

+
+
+

+ {{ 'cannot_edit_other_fields'|_ }} +

+ + + + + + + + + + {% for journal in journals %} + {% if journal.transaction_count == 2 %} + + + + + + - + - - {% endif %} - {% endfor %} -
 {{ trans('list.description') }}{{ trans('list.amount') }}{{ trans('list.date') }}{{ trans('list.from') }}{{ trans('list.to') }}
+ + + + + + + + + + + {{ ExpandedForm.amountSmall('amount_'~journal.id, journal.amount, {'name' : 'amount['~journal.id~']', 'currency' : journal.transactionCurrency}) }} + + + + - - {% if journal.transaction_type_type == 'Transfer' or journal.transaction_type_type == 'Withdrawal' %} - {{ Form.select('source_account_id['~journal.id~']', accountList, journal.source_account_id, {'class': 'form-control'}) }} - {% else %} - - {{ Form.input('text', 'source_account_name['~journal.id~']', journal.source_account_name, {'class': 'form-control', 'placeholder': trans('form.revenue_account')}) }} - {% endif %} + + {% if journal.transaction_type_type == 'Transfer' or journal.transaction_type_type == 'Withdrawal' %} + {{ Form.select('source_account_id['~journal.id~']', accountList, journal.source_account_id, {'class': 'form-control'}) }} + {% else %} + + {{ Form.input('text', 'source_account_name['~journal.id~']', journal.source_account_name, {'class': 'form-control', 'placeholder': trans('form.revenue_account')}) }} + {% endif %} - + - {% if journal.transaction_type_type == 'Transfer' or journal.transaction_type_type == 'Deposit' %} - - {{ Form.select('destination_account_id['~journal.id~']', accountList, journal.destination_account_id, {'class': 'form-control'}) }} - {% else %} - + {% if journal.transaction_type_type == 'Transfer' or journal.transaction_type_type == 'Deposit' %} + + {{ Form.select('destination_account_id['~journal.id~']', accountList, journal.destination_account_id, {'class': 'form-control'}) }} + {% else %} + - {{ Form.input('text', 'destination_account_name['~journal.id~']', journal.destination_account_name, {'class': 'form-control', 'placeholder': trans('form.expense_account')}) }} - {% endif %} + {{ Form.input('text', 'destination_account_name['~journal.id~']', journal.destination_account_name, {'class': 'form-control', 'placeholder': trans('form.expense_account')}) }} + {% endif %} -
-
-
+
+
-
- - {{ Form.close|raw }} + {% endblock %} {% block scripts %}