liquid_feedback_frontend
view app/main/index/reset_password.lua @ 118:93f4e465b50d
add initiator support in delegation
if a delegation is issued from the initiative view, the initiators
from that one are added to the delegation target list. this makes it easier to delegate to the author without the need to add him to the contact list.
if a delegation is issued from the initiative view, the initiators
from that one are added to the delegation target list. this makes it easier to delegate to the author without the need to add him to the contact list.
author | Daniel Poelzleithner <poelzi@poelzi.org> |
---|---|
date | Mon Sep 20 20:32:04 2010 +0200 (2010-09-20) |
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