liquid_feedback_frontend

view app/main/index/reset_password.lua @ 1304:0bae319805ff

Added tag v3.2.1 for changeset 0160d9a01d0a
author jbe
date Fri May 06 09:44:16 2016 +0200 (2016-05-06)
parents 701a5cf6b067
children 32cc544d5a5b
line source
1 execute.view{ module = "index", view = "_lang_chooser" }
3 ui.title(_"Reset password")
5 ui.section( function()
7 ui.sectionHead( function()
8 ui.heading{ level = 1, content = _"Reset password" }
9 end )
11 ui.sectionRow( function()
14 local secret = param.get("secret")
16 if not secret then
17 ui.tag{
18 tag = 'p',
19 content = _'Please enter your login name. You will receive an email with a link to reset your password.'
20 }
21 ui.form{
22 attr = { class = "vertical" },
23 module = "index",
24 action = "reset_password",
25 routing = {
26 ok = {
27 mode = "redirect",
28 module = "index",
29 view = "index"
30 }
31 },
32 content = function()
33 ui.field.text{
34 label = _"login name",
35 name = "login"
36 }
38 ui.container { attr = { class = "actions" }, content = function()
39 ui.tag{
40 tag = "input",
41 attr = {
42 type = "submit",
43 class = "btn btn-default",
44 value = _"Request password reset link"
45 },
46 content = ""
47 }
48 slot.put("<br /><br />")
49 ui.link{ module = "index", view = "send_login", text = _"Forgot login name?" }
50 slot.put("&nbsp;&nbsp;")
51 ui.link{
52 content = function()
53 slot.put(_"Cancel")
54 end,
55 module = "index",
56 view = "login"
57 }
58 end }
59 end
60 }
62 else
64 ui.form{
65 attr = { class = "vertical" },
66 module = "index",
67 action = "reset_password",
68 routing = {
69 ok = {
70 mode = "redirect",
71 module = "index",
72 view = "index"
73 }
74 },
75 content = function()
76 ui.tag{
77 tag = 'p',
78 content = _'Please enter the email reset code you have received:'
79 }
80 ui.field.text{
81 label = _"Reset code",
82 name = "secret",
83 value = secret
84 }
85 ui.tag{
86 tag = 'p',
87 content = _'Please enter your new password twice.'
88 }
89 ui.field.password{
90 label = "New password",
91 name = "password1"
92 }
93 ui.field.password{
94 label = "New password (repeat)",
95 name = "password2"
96 }
98 ui.container { attr = { class = "actions" }, content = function()
99 ui.tag{
100 tag = "input",
101 attr = {
102 type = "submit",
103 class = "btn btn-default",
104 value = _"Save new password"
105 },
106 content = ""
107 }
108 slot.put("<br />")
109 slot.put("<br />")
111 ui.link{
112 content = function()
113 slot.put(_"Cancel")
114 end,
115 module = "index",
116 view = "login"
117 }
118 end }
119 end
120 }
122 end
123 end )
124 end )

Impressum / About Us