Fixed Change Password Bug
This commit is contained in:
parent
c414f5861d
commit
65d63bc49d
2 changed files with 11 additions and 1 deletions
|
@ -130,11 +130,15 @@ type PasswdTplData struct {
|
||||||
NoMatchError bool
|
NoMatchError bool
|
||||||
Success bool
|
Success bool
|
||||||
CanAdmin bool
|
CanAdmin bool
|
||||||
|
Login bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleFoundPassword(w http.ResponseWriter, r *http.Request) {
|
func handleFoundPassword(w http.ResponseWriter, r *http.Request) {
|
||||||
templateFoundPasswordPage := getTemplate("passwd.html")
|
templateFoundPasswordPage := getTemplate("passwd.html")
|
||||||
data := PasswdTplData{}
|
data := PasswdTplData{
|
||||||
|
CanAdmin: false,
|
||||||
|
Login: false,
|
||||||
|
}
|
||||||
code := mux.Vars(r)["code"]
|
code := mux.Vars(r)["code"]
|
||||||
// code = strings.TrimSpace(strings.Join([]string{code}, ""))
|
// code = strings.TrimSpace(strings.Join([]string{code}, ""))
|
||||||
newCode, _ := b64.URLEncoding.DecodeString(code)
|
newCode, _ := b64.URLEncoding.DecodeString(code)
|
||||||
|
@ -193,6 +197,8 @@ func handlePasswd(w http.ResponseWriter, r *http.Request) {
|
||||||
Status: login,
|
Status: login,
|
||||||
ErrorMessage: "",
|
ErrorMessage: "",
|
||||||
Success: false,
|
Success: false,
|
||||||
|
CanAdmin: false,
|
||||||
|
Login: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
if r.Method == "POST" {
|
if r.Method == "POST" {
|
||||||
|
|
|
@ -58,6 +58,10 @@ div.card-header {
|
||||||
writing-mode: vertical-lr;
|
writing-mode: vertical-lr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body.darkmode div.card-header {
|
||||||
|
color: var(--color-text-inverted);
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 700px) {
|
@media (max-width: 700px) {
|
||||||
div.card {
|
div.card {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
Loading…
Reference in a new issue