Repository: OpenEnergyPlatform/oeplatform

Issue:
Framework Factsheet: there is no button to complete missing fields
The form informs about missing mandatory fields, but does not offer a button to edit them.
![grafik](https://user-images.githubusercontent.com/36844029/76749375-afb98c80-677c-11ea-8dac-13edb28262f8.png)

Framework Factsheet: Name information seems double
Users have to add _Name_ information under overview and under Basic information. The tooltip does not yet work, so it is not clear what _Name_  really refers to under these two sections. 
![grafik](https://user-images.githubusercontent.com/36844029/76750149-08d5f000-677e-11ea-9364-9536ecef5aef.png)



Discussion:
I do not understand. You have to click on the categories. Maybe the error panels should be displayed over the category tabs.
Yes, that maybe helpful.  Or if the category would be noted next to the field name to which the error applies. 
According to the error message  flagged in #564  may it be a good idea to replace_Name_ by _Framework name_  and only ask for it once?

Resolving patch:
diff --git a/modelview/templatetags/modelview_extras.py b/modelview/templatetags/modelview_extras.py
--- a/modelview/templatetags/modelview_extras.py
+++ b/modelview/templatetags/modelview_extras.py
@@ -145,7 +145,10 @@ def white_out(value, arg):
 
 
 @register.simple_tag
-def get_field_attr(instance, field_name, attr, cut=None):
+def get_field_attr(instance, field_name, attr, fieldNameOverride=None, cut=None):
+    if fieldNameOverride:
+        return fieldNameOverride
+
     val = instance._meta.get_field(field_name).__dict__[attr]
     if cut:
         val = val.replace(cut, "")
diff --git a/modelview/views.py b/modelview/views.py
--- a/modelview/views.py
+++ b/modelview/views.py
@@ -312,11 +312,14 @@ def post(self, request, sheettype, method="add", pk=None):
                     )
                 )
             else:
-                errors = [
-                    (field.label, str(field.errors.data[0].message))
-                    for field in form
-                    if field.errors
-                ] + errorsStudy
+                errors = []
+                for field in form.errors:
+                    e = form.errors[field]
+                    error = e[0]
+                    field = form.fields[field].label
+                    errors.append((field, str(error)))
+
+                errors = errors + errorsStudy
                 return render(
                     request,
                     "modelview/new{}.html".format(sheettype),
@@ -352,11 +355,13 @@ def post(self, request, sheettype, method="add", pk=None):
                     )
                 )
             else:
-                errors = [
-                    (field.label, str(field.errors.data[0].message))
-                    for field in form
-                    if field.errors
-                ]
+                errors = []
+                for field in form.errors:
+                    e = form.errors[field]
+                    error = e[0]
+                    field = form.fields[field].label
+                    errors.append((field, str(error)))
+
                 return render(
                     request,
                     "modelview/edit{}.html".format(sheettype),


Test patch: