From 7d6df66e5d36787ea9779320bee873649650a87d Mon Sep 17 00:00:00 2001
From: jensilo <k@jensheise.com>
Date: Fri, 15 Dec 2023 00:42:06 +0100
Subject: [PATCH] show email as disabled input in user profile as this could be
 interesting after logging in

---
 templates/user/_form-edit.go.html | 5 +++++
 translations/de.json              | 1 +
 2 files changed, 6 insertions(+)

diff --git a/templates/user/_form-edit.go.html b/templates/user/_form-edit.go.html
index e5ef25a..d0ad41b 100644
--- a/templates/user/_form-edit.go.html
+++ b/templates/user/_form-edit.go.html
@@ -51,6 +51,11 @@
                                 <div class="invalid-feedback">{{ t $validation.GenericErrorKey }}</div>
                             {{ end }}
                         </div>
+                        <div class="col-12 mt-2">
+                            <label for="email" class="form-label">{{ t "user.email" }}</label>
+                            <input id="email" type="email" class="form-control" disabled value="{{ .Extra.User.Email }}"/>
+                            <div class="form-text">{{ t "user.email.help" }}</div>
+                        </div>
                         <div class="col mt-2">
                             <button type="submit" class="btn btn-primary">{{ t "harmony.generic.save" }}</button>
                         </div>
diff --git a/translations/de.json b/translations/de.json
index 7364b49..6b2fad9 100644
--- a/translations/de.json
+++ b/translations/de.json
@@ -3,6 +3,7 @@
     "firstname": "Vorname",
     "lastname": "Nachname",
     "email": "E-Mail",
+    "email.help": "Die E-Mail-Adresse wird durch den OAuth-Anbieter, mit dem Sie sich anmelden, festgelegt. Sie können diese E-Mail-Adresse nicht ändern. Wir nutzen diese E-Mail-Adresse, um Sie zu identifizieren.",
     "auth": {
       "login": {
         "title": "Anmelden",
-- 
GitLab