This commit is contained in:
Chris Mann 2023-07-23 08:34:06 +02:00
parent 9cfc977dda
commit fb07ee9019
2 changed files with 9 additions and 3 deletions

View file

@ -54,12 +54,16 @@ func handleLostPassword(w http.ResponseWriter, r *http.Request) {
if err != nil {
log.Printf(fmt.Sprintf("handleLostPassword : %v %v", err, l))
}
data := LostPasswordData{}
data := LostPasswordData{
Username: "",
Mail: "",
OtherMailbox: "",
}
if r.Method == "POST" {
r.ParseForm()
data.Username = strings.TrimSpace(strings.Join(r.Form["username"], ""))
data.Mail = strings.TrimSpace(strings.Join(r.Form["mail"], ""))
data.OtherMailbox = strings.TrimSpace(strings.Join(r.Form["otherMailbox"], ""))
data.OtherMailbox = strings.TrimSpace(strings.Join(r.Form["othermailbox"], ""))
user := User{
CN: data.Username,
Mail: data.Mail,

View file

@ -29,5 +29,7 @@
<label for="username">Mail de secours :</label>
<input type="text" name="othermailbox" id="othermailbox" class="form-control" value="{{ .OtherMailbox }}" />
</div>
<button type="submit" class="btn btn-primary">Refaire son mal de passe</button>
</form>
<script src="/static/javascript/minio.js"></script>
{{end}}