diff options
| -rw-r--r-- | main.go | 1 | ||||
| -rw-r--r-- | modules/user/user.go | 2 | ||||
| -rw-r--r-- | views/pages/user_settings.html | 10 |
3 files changed, 5 insertions, 8 deletions
| @@ -64,6 +64,7 @@ func main() { | |||
| 64 | router.HandlerFunc("GET", "/login", login.DisplayLogin) | 64 | router.HandlerFunc("GET", "/login", login.DisplayLogin) |
| 65 | router.HandlerFunc("POST", "/login", login.Login) | 65 | router.HandlerFunc("POST", "/login", login.Login) |
| 66 | router.HandlerFunc("GET", "/settings", login.DisplayUserSettings) | 66 | router.HandlerFunc("GET", "/settings", login.DisplayUserSettings) |
| 67 | router.HandlerFunc("POST", "/settings", login.SaveUserRoute) | ||
| 67 | router.HandlerFunc("GET", "/logout", login.Logout) | 68 | router.HandlerFunc("GET", "/logout", login.Logout) |
| 68 | router.HandlerFunc("GET", "/register", login.DisplayRegistration) | 69 | router.HandlerFunc("GET", "/register", login.DisplayRegistration) |
| 69 | router.HandlerFunc("POST", "/register", login.Register) | 70 | router.HandlerFunc("POST", "/register", login.Register) |
diff --git a/modules/user/user.go b/modules/user/user.go index 2bf862b..06245e2 100644 --- a/modules/user/user.go +++ b/modules/user/user.go | |||
| @@ -68,4 +68,4 @@ func (m *Module) viewUser(w http.ResponseWriter, r *http.Request, p httprouter.P | |||
| 68 | data["Lists"] = lists.ListsToCards(userLists) | 68 | data["Lists"] = lists.ListsToCards(userLists) |
| 69 | 69 | ||
| 70 | m.g.Renderer.RenderPage("user", w, data) | 70 | m.g.Renderer.RenderPage("user", w, data) |
| 71 | } \ No newline at end of file | 71 | } |
diff --git a/views/pages/user_settings.html b/views/pages/user_settings.html index cf350a5..8c8317b 100644 --- a/views/pages/user_settings.html +++ b/views/pages/user_settings.html | |||
| @@ -25,22 +25,18 @@ | |||
| 25 | <div class="input-field col s12"> | 25 | <div class="input-field col s12"> |
| 26 | <blockquote>Standardmäßig wird dein Benutzername angezeigt. Das Ändern des Anzeigenamen erlaubt dir, dass dich andere Nutzer unter einem anderen Namen sehen.</blockquote> | 26 | <blockquote>Standardmäßig wird dein Benutzername angezeigt. Das Ändern des Anzeigenamen erlaubt dir, dass dich andere Nutzer unter einem anderen Namen sehen.</blockquote> |
| 27 | <i class="material-icons prefix">perm_identity</i> | 27 | <i class="material-icons prefix">perm_identity</i> |
| 28 | <input name="username" type="text" placeholder="Anzeigename" class="validate" value="{{ if .user.DisplayName.Valid }}{{ .user.DisplayName.Value }}{{ end }}"/> | 28 | <input name="display_name" type="text" placeholder="Anzeigename" class="validate" value="{{ if .user.DisplayName.Valid }}{{ .user.DisplayName.Value }}{{ end }}"/> |
| 29 | </div> | 29 | </div> |
| 30 | <br /><br /> | 30 | <br /><br /> |
| 31 | <h3>Passwort ändern</h3> | 31 | <h3>Passwort ändern</h3> |
| 32 | <blockquote>Dein Passwort muss eine Länge von mindestens benis Zeichen haben.</blockquote> | 32 | <blockquote>Dein Passwort muss eine Länge von mindestens benis Zeichen haben.</blockquote> |
| 33 | <div class="input-field col s12"> | 33 | <div class="input-field col s12"> |
| 34 | <i class="material-icons prefix">lock_outline</i> | 34 | <i class="material-icons prefix">lock_outline</i> |
| 35 | <input name="password_current" type="password" placeholder="Aktuelles Passwort" class="validate" /> | 35 | <input name="current_password" type="password" placeholder="Aktuelles Passwort" class="validate" /> |
| 36 | </div> | 36 | </div> |
| 37 | <div class="input-field col s12"> | 37 | <div class="input-field col s12"> |
| 38 | <i class="material-icons prefix">lock</i> | 38 | <i class="material-icons prefix">lock</i> |
| 39 | <input name="password_new" type="password" placeholder="Neues Passwort" class="validate" /> | 39 | <input name="new_password" type="password" placeholder="Neues Passwort" class="validate" /> |
| 40 | </div> | ||
| 41 | <div class="input-field col s12"> | ||
| 42 | <i class="material-icons prefix">lock</i> | ||
| 43 | <input name="password_new2" type="password" placeholder="Neues Passwort (wiederholen)" class="validate" /> | ||
| 44 | </div> | 40 | </div> |
| 45 | <div class="row col s12 right-align"> | 41 | <div class="row col s12 right-align"> |
| 46 | <button class="btn waves-effect waves-light purple lighten-2" type="submit" name="action"> | 42 | <button class="btn waves-effect waves-light purple lighten-2" type="submit" name="action"> |
