diff --git a/nummi/main/forms.py b/nummi/main/forms.py
index d1e5de1..aff90df 100644
--- a/nummi/main/forms.py
+++ b/nummi/main/forms.py
@@ -10,7 +10,7 @@ class NummiFileInput(forms.ClearableFileInput):
class NummiForm(forms.ModelForm):
- template_name = "main/form/base.html"
+ template_name = "main/form/form_base.html"
def __init__(self, *args, user, **kwargs):
super().__init__(*args, **kwargs)
diff --git a/nummi/main/templates/main/form/account.html b/nummi/main/templates/main/form/account.html
index f14da2d..f6c8f7c 100644
--- a/nummi/main/templates/main/form/account.html
+++ b/nummi/main/templates/main/form/account.html
@@ -16,19 +16,25 @@
type="text/css" />
{% endblock %}
{% block body %}
-
{{ form.instance.icon|remix }}{{ form.instance }}
-
- {% if not form.instance.adding %}
- {% translate "Statements" %}
- {% include "main/table/snapshot.html" %}
- {% endif %}
- {% if transactions %}
- {% translate "Transactions" %}
- {% include "main/table/transaction.html" %}
- {% translate "History" %}
- {% include "main/plot/history.html" %}
- {% endif %}
+ {% with account=form.instance %}
+ {% if account.adding %}
+ {% translate "New account" %}
+ {% else %}
+ {{ account.icon|remix }}{{ account }}
+ {% endif %}
+
+ {% if not account.adding %}
+ {% translate "Statements" %}
+ {% include "main/table/snapshot.html" %}
+ {% endif %}
+ {% if transactions %}
+ {% translate "Transactions" %}
+ {% include "main/table/transaction.html" %}
+ {% translate "History" %}
+ {% include "main/plot/history.html" %}
+ {% endif %}
+ {% endwith %}
{% endblock %}
diff --git a/nummi/main/templates/main/form/category.html b/nummi/main/templates/main/form/category.html
index 27ae5e9..c5dd794 100644
--- a/nummi/main/templates/main/form/category.html
+++ b/nummi/main/templates/main/form/category.html
@@ -16,15 +16,21 @@
type="text/css" />
{% endblock %}
{% block body %}
- {{ form.instance.icon|remix }}{{ form.instance }}
-
- {% if form.instance.transactions %}
- {% translate "Transactions" %}
- {% include "main/table/transaction.html" %}
- {% translate "History" %}
- {% include "main/plot/history.html" %}
- {% endif %}
+ {% with category=form.instance %}
+ {% if category.adding %}
+ {% translate "New category" %}
+ {% else %}
+ {{ category.icon|remix }}{{ category }}
+ {% endif %}
+
+ {% if category.transactions %}
+ {% translate "Transactions" %}
+ {% include "main/table/transaction.html" %}
+ {% translate "History" %}
+ {% include "main/plot/history.html" %}
+ {% endif %}
+ {% endwith %}
{% endblock %}
diff --git a/nummi/main/templates/main/form/base.html b/nummi/main/templates/main/form/form_base.html
similarity index 100%
rename from nummi/main/templates/main/form/base.html
rename to nummi/main/templates/main/form/form_base.html
diff --git a/nummi/main/templates/main/form/invoice.html b/nummi/main/templates/main/form/invoice.html
index 26c9dd1..95afb16 100644
--- a/nummi/main/templates/main/form/invoice.html
+++ b/nummi/main/templates/main/form/invoice.html
@@ -14,7 +14,11 @@
{% endblock %}
{% block body %}
{% with invoice=form.instance %}
- {{ invoice }}
+ {% if invoice.adding %}
+ {% translate "New invoice" %}
+ {% else %}
+ {{ invoice }}
+ {% endif %}
{{ invoice.transaction }}
diff --git a/nummi/main/templates/main/form/login.html b/nummi/main/templates/main/form/login.html
index 841e941..8a74bc7 100644
--- a/nummi/main/templates/main/form/login.html
+++ b/nummi/main/templates/main/form/login.html
@@ -1,4 +1,4 @@
-{% extends "main/form/base.html" %}
+{% extends "main/form/form_base.html" %}
{% load i18n %}
{% block buttons %}
diff --git a/nummi/main/templates/main/form/search.html b/nummi/main/templates/main/form/search.html
index 58d3a2f..af7b012 100644
--- a/nummi/main/templates/main/form/search.html
+++ b/nummi/main/templates/main/form/search.html
@@ -1,4 +1,4 @@
-{% extends "main/form/base.html" %}
+{% extends "main/form/form_base.html" %}
{% load i18n %}
{% block buttons %}
diff --git a/nummi/main/templates/main/form/snapshot.html b/nummi/main/templates/main/form/snapshot.html
index 78ebae8..54c7c18 100644
--- a/nummi/main/templates/main/form/snapshot.html
+++ b/nummi/main/templates/main/form/snapshot.html
@@ -17,10 +17,14 @@
{% endblock %}
{% block body %}
{% with snapshot=form.instance %}
-
-
- {{ snapshot }}
-
+ {% if snapshot.adding %}
+ {% translate "New snapshot" %}
+ {% else %}
+
+
+ {{ snapshot }}
+
+ {% endif %}
- {% endspaceless %}
- {% if not form.instance.adding %}
- {% translate "Invoices" %}
- {% include "main/table/invoice.html" %}
- {% endif %}
+ {% with transaction=form.instance %}
+ {% if transaction.adding %}
+ {% translate "New transaction" %}
+ {% else %}
+ {{ form.instance }}
+ {% endif %}
+ {% spaceless %}
+
+ {% endspaceless %}
+ {% if not form.instance.adding %}
+ {% translate "Invoices" %}
+ {% include "main/table/invoice.html" %}
+ {% endif %}
+ {% endwith %}
{% endblock %}