aboutsummaryrefslogtreecommitdiff
path: root/admin.go
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-02-10 09:48:55 +0100
committerAlex Auvolat <alex@adnab.me>2020-02-10 09:48:55 +0100
commitb194b5f7eba47cbac677ba28fc9f8e1e29a7ed1a (patch)
treedc561eb6b7b621b3a3a2e7994b47bfaff1a16407 /admin.go
parent9f891bdb9a41de73f5970219b2557b4039358a4f (diff)
downloadguichet-b194b5f7eba47cbac677ba28fc9f8e1e29a7ed1a.tar.gz
guichet-b194b5f7eba47cbac677ba28fc9f8e1e29a7ed1a.zip
Fix creation form
Diffstat (limited to 'admin.go')
-rw-r--r--admin.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/admin.go b/admin.go
index 8803531..870439f 100644
--- a/admin.go
+++ b/admin.go
@@ -539,11 +539,13 @@ func handleAdminCreate(w http.ResponseWriter, r *http.Request) {
if r.Method == "POST" {
r.ParseForm()
- data.IdType = strings.Join(r.Form["idtype"], "")
+ if !data.IsTemplated {
+ data.IdType = strings.Join(r.Form["idtype"], "")
+ data.StructuralObjectClass = strings.Join(r.Form["soc"], "")
+ data.ObjectClass = strings.Join(r.Form["oc"], "")
+ }
data.IdValue = strings.Join(r.Form["idvalue"], "")
data.DisplayName = strings.Join(r.Form["displayname"], "")
- data.StructuralObjectClass = strings.Join(r.Form["soc"], "")
- data.ObjectClass = strings.Join(r.Form["oc"], "")
object_class := []string{}
for _, oc := range strings.Split(data.ObjectClass, "\n") {