From dde77732779dd66a33d86f0ddb6daa8be9d8cb10 Mon Sep 17 00:00:00 2001
From: Thorge Petersen <petersen@rz.uni-kiel.de>
Date: Mon, 20 Nov 2023 10:08:44 +0100
Subject: [PATCH] Fixed key generation for organization extras

---
 .../templates/organization/snippets/organization_form.html  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ckanext/odsh/templates/organization/snippets/organization_form.html b/ckanext/odsh/templates/organization/snippets/organization_form.html
index 153a5e15..9af3071d 100644
--- a/ckanext/odsh/templates/organization/snippets/organization_form.html
+++ b/ckanext/odsh/templates/organization/snippets/organization_form.html
@@ -47,8 +47,8 @@
   
     {{ form.input_address('gnd','GND URI', value=extras.gnd, index=6, placeholder='https://d-nb.info/gnd/1136109587', type='text', attrs={}) }}
 
-    <!-- {% for extra in data.extras %}
-      {% set custom_extras = ['person','street','location','telephone','mail','web','gnd'] %}
+    {% set custom_extras = ['person','street','location','telephone','mail','web','gnd'] %}
+    {% for extra in data.extras %}
       {% if extra.key not in custom_extras %}
         {% set prefix = 'extras__%d__' % (loop.index0 + (custom_extras|count)) %}
         {{ form.custom(
@@ -76,7 +76,7 @@
         values=(extra.key, extra.value, extra.deleted),
         error=errors[prefix ~ 'key'] or errors[prefix ~ 'value']
       ) }}
-    {% endfor %} -->
+    {% endfor %}
   </div>
   {% endblock %}
 
-- 
GitLab