liquid_feedback_frontend

view app/main/index/reset_password.lua @ 9:0ee1e0c42d4c

Version beta5

Minor security fix: Added missing security filter for admin section. Reading of member listing including login names was possible for all users. Write access has not been possible though.

Changing of name and login is possible while a history of these changes is written and accessible by all users.

Statistics shown in area list

Trimming of user input also converts multiple whitespaces to single space character.
author bsw
date Mon Jan 04 12:00:00 2010 +0100 (2010-01-04)
parents 8d91bccab0bf
children 58647c8a0339
line source
1 slot.put_into("title", _"Reset password")
3 slot.select("actions", function()
4 ui.link{
5 content = function()
6 ui.image{ static = "icons/16/cancel.png" }
7 slot.put(_"Cancel password reset")
8 end,
9 module = "index",
10 view = "index"
11 }
12 end)
15 local secret = param.get("secret")
17 if not secret then
18 ui.tag{
19 tag = 'p',
20 content = _'Please enter your login name. You will receive an email with a link to reset your password.'
21 }
22 ui.form{
23 attr = { class = "vertical" },
24 module = "index",
25 action = "reset_password",
26 routing = {
27 ok = {
28 mode = "redirect",
29 module = "index",
30 view = "index"
31 }
32 },
33 content = function()
34 ui.field.text{
35 label = "Login",
36 name = "login"
37 }
38 ui.submit{ text = _"Request password reset link" }
39 end
40 }
42 else
44 ui.form{
45 attr = { class = "vertical" },
46 module = "index",
47 action = "reset_password",
48 routing = {
49 ok = {
50 mode = "redirect",
51 module = "index",
52 view = "index"
53 }
54 },
55 content = function()
56 ui.tag{
57 tag = 'p',
58 content = _'Please enter the email reset code you have received:'
59 }
60 ui.field.text{
61 label = _"Reset code",
62 name = "secret",
63 value = secret
64 }
65 ui.tag{
66 tag = 'p',
67 content = _'Please enter your new password twice.'
68 }
69 ui.field.password{
70 label = "New password",
71 name = "password1"
72 }
73 ui.field.password{
74 label = "New password (repeat)",
75 name = "password2"
76 }
77 ui.submit{ text = _"Set new password" }
78 end
79 }
81 end

Impressum / About Us