Fixed login handler
Cette révision appartient à :
Parent
97efa46a29
révision
7f053c978d
2 fichiers modifiés avec 3 ajouts et 1 suppressions
|
@ -32,6 +32,7 @@ func init() {
|
|||
gzipUserLoginFormHandler := handlers.CompressHandler(http.HandlerFunc(UserLoginFormHandler))
|
||||
gzipUserVerifyEmailHandler := handlers.CompressHandler(http.HandlerFunc(UserVerifyEmailHandler))
|
||||
gzipUserRegisterPostHandler := handlers.CompressHandler(http.HandlerFunc(UserRegisterPostHandler))
|
||||
gzipUserLoginPostHandler := handlers.CompressHandler(http.HandlerFunc(UserLoginPostHandler))
|
||||
|
||||
Router = mux.NewRouter()
|
||||
|
||||
|
@ -55,6 +56,7 @@ func init() {
|
|||
Router.Handle("/user/login", gzipUserLoginFormHandler).Name("user_login").Methods("GET")
|
||||
Router.Handle("/verify/email/{token}", gzipUserVerifyEmailHandler).Name("user_verify").Methods("GET")
|
||||
Router.Handle("/user/register", gzipUserRegisterPostHandler).Name("user_register").Methods("POST")
|
||||
Router.Handle("/user/login", gzipUserLoginPostHandler).Name("user_login").Methods("POST")
|
||||
Router.PathPrefix("/captcha").Methods("GET").HandlerFunc(captcha.ServeFiles)
|
||||
|
||||
Router.NotFoundHandler = http.HandlerFunc(NotFoundHandler)
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
{{end}}
|
||||
<form method="post">
|
||||
<div class="form-group">
|
||||
<label for="comment">Submit a Comment</label>
|
||||
<label for="comment">Submit a Comment as {{ if gt .User.Id 0}} {{.User.Username}} {{else}} Anonymous {{end}}</label>
|
||||
<textarea name="comment" class="form-control" rows="5"></textarea>
|
||||
</div>
|
||||
{{with .Captcha}}
|
||||
|
|
Référencer dans un nouveau ticket