From be0adb7cf2ec8c2fdca4c334f6379549f707cf10 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 2 May 2015 09:25:45 +0200 Subject: [PATCH] Create / edit category --- resources/twig/categories/create.twig | 45 +++++++++++++++++++++++++++ resources/twig/categories/delete.twig | 33 ++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 resources/twig/categories/create.twig create mode 100644 resources/twig/categories/delete.twig diff --git a/resources/twig/categories/create.twig b/resources/twig/categories/create.twig new file mode 100644 index 0000000000..90ea9c57a5 --- /dev/null +++ b/resources/twig/categories/create.twig @@ -0,0 +1,45 @@ +{% extends "./layout/default.twig" %} +{% block content %} + {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName) }} + {{ Form.open({'class' : 'form-horizontal','id' : 'store','url' : route('categories.store')}) }} + +
+
+
+
+ Mandatory fields +
+
+ {{ ExpandedForm.text('name') }} +
+
+
+ +
+ + +
+
+ Options +
+
+ {{ ExpandedForm.optionsList('create','category') }} +
+
+ +
+
+
+
+

+ +

+
+
+ + + +{% endblock %} + diff --git a/resources/twig/categories/delete.twig b/resources/twig/categories/delete.twig new file mode 100644 index 0000000000..bab3e41d0e --- /dev/null +++ b/resources/twig/categories/delete.twig @@ -0,0 +1,33 @@ +{% extends "./layout/default.twig" %} +{% block content %} +{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, category) }} +{{ Form.open({'class' : 'form-horizontal','id' : 'destroy','url' : route('categories.destroy',category.id)}) }} +
+
+
+
+ Delete category "{{ category.name }}" +
+
+

+ Are you sure that you want to delete category "{{ category.name }}"? +

+ + {% if category.transactionjournals|length > 0 %} +

+ Category "{{ category.name }}" still has {{ category.transactionjournals|length }} transactions connected + to it. These will not be removed but will lose their connection to this category. +

+ {% endif %} + +

+ + Cancel +

+
+
+
+
+ + +{% endblock %}