liquid_feedback_frontend

view app/main/index/reset_password.lua @ 989:5a712ec1a7f1

Added support for login name recovery by email address
author bsw
date Sat Apr 20 18:51:28 2013 +0200 (2013-04-20)
parents 58647c8a0339
children 701a5cf6b067
line source
1 execute.view{ module = "index", view = "_lang_chooser" }
3 ui.title(_"Reset password")
5 ui.actions(function()
6 ui.link{
7 content = function()
8 slot.put(_"Cancel")
9 end,
10 module = "index",
11 view = "login"
12 }
13 end)
16 local secret = param.get("secret")
18 if not secret then
19 ui.tag{
20 tag = 'p',
21 content = _'Please enter your login name. You will receive an email with a link to reset your password.'
22 }
23 ui.form{
24 attr = { class = "vertical" },
25 module = "index",
26 action = "reset_password",
27 routing = {
28 ok = {
29 mode = "redirect",
30 module = "index",
31 view = "index"
32 }
33 },
34 content = function()
35 ui.field.text{
36 label = _"login name",
37 name = "login"
38 }
39 ui.submit{ text = _"Request password reset link" }
40 slot.put("  ")
41 ui.link{ module = "index", view = "send_login", text = _"Forgot login name?" }
42 end
43 }
45 else
47 ui.form{
48 attr = { class = "vertical" },
49 module = "index",
50 action = "reset_password",
51 routing = {
52 ok = {
53 mode = "redirect",
54 module = "index",
55 view = "index"
56 }
57 },
58 content = function()
59 ui.tag{
60 tag = 'p',
61 content = _'Please enter the email reset code you have received:'
62 }
63 ui.field.text{
64 label = _"Reset code",
65 name = "secret",
66 value = secret
67 }
68 ui.tag{
69 tag = 'p',
70 content = _'Please enter your new password twice.'
71 }
72 ui.field.password{
73 label = "New password",
74 name = "password1"
75 }
76 ui.field.password{
77 label = "New password (repeat)",
78 name = "password2"
79 }
80 ui.submit{ text = _"Set new password" }
81 end
82 }
84 end

Impressum / About Us