annotate app/main/index/email_unconfirmed.lua @ 562:051d0244c60f
Added tag v2.beta9 for changeset 12e504938643
author |
bsw |
date |
Tue Jun 19 21:33:11 2012 +0200 (2012-06-19) |
parents |
18e8de7a2b6a |
children |
418b590fa9ed |
rev |
line source |
bsw@558
|
1 if app.session.member.notify_email_unconfirmed then
|
bsw@558
|
2
|
bsw@558
|
3 local current = Member:new_selector()
|
bsw@558
|
4 :add_where{ "id = ?", app.session.member_id }
|
bsw@558
|
5 :add_where("notify_email_unconfirmed NOTNULL")
|
bsw@558
|
6 :add_where("notify_email_secret_expiry > now()")
|
bsw@558
|
7 :optional_object_mode()
|
bsw@558
|
8 :exec()
|
bsw@558
|
9
|
bsw@558
|
10 slot.select("title", function()
|
bsw@558
|
11 ui.tag{ content = _"Notification address unconfirmed" }
|
bsw@558
|
12 end )
|
bsw@558
|
13
|
bsw@558
|
14 if current then
|
bsw@558
|
15 ui.tag{
|
bsw@558
|
16 tag = "div",
|
bsw@558
|
17 content = _("You didn't confirm your email address '#{email}'. You have received an email with an activation link.", { email = app.session.member.notify_email_unconfirmed })
|
bsw@558
|
18 }
|
bsw@558
|
19 else
|
bsw@558
|
20 ui.tag{
|
bsw@558
|
21 tag = "div",
|
bsw@558
|
22 content = _("You didn't confirm your email address '#{email}' within 7 days.", { email = app.session.member.notify_email_unconfirmed })
|
bsw@558
|
23 }
|
bsw@558
|
24 end
|
bsw@558
|
25 slot.put("<br />")
|
bsw@558
|
26
|
bsw@558
|
27 ui.link{
|
bsw@558
|
28 text = _"Change email address",
|
bsw@558
|
29 module = "member",
|
bsw@558
|
30 view = "settings_email",
|
bsw@558
|
31 }
|
bsw@558
|
32 slot.put("<br />")
|
bsw@558
|
33 slot.put("<br />")
|
bsw@558
|
34
|
bsw@558
|
35 ui.link{
|
bsw@558
|
36 text = _("Resend activation email to '#{email}'", { email = app.session.member.notify_email_unconfirmed }),
|
bsw@558
|
37 module = "member",
|
bsw@558
|
38 action = "update_email",
|
bsw@558
|
39 params = {
|
bsw@558
|
40 resend = true
|
bsw@558
|
41 },
|
bsw@558
|
42 routing = {
|
bsw@558
|
43 default = {
|
bsw@558
|
44 mode = "redirect",
|
bsw@558
|
45 module = "index",
|
bsw@558
|
46 view = "index"
|
bsw@558
|
47 }
|
bsw@558
|
48 }
|
bsw@558
|
49 }
|
bsw@558
|
50
|
bsw@558
|
51 end
|