liquid_feedback_frontend

view app/main/registration/register.lua @ 1320:cb5c83df949f

Allow external registration cancel target part2
author bsw
date Wed Aug 01 17:53:22 2018 +0200 (2018-08-01)
parents 00612e1ca36a
children b45fe5c83402
line source
1 ui.title(_"Self registration")
2 app.html_title.title = _"Self registration"
4 slot.put("<style>select.is-invalid { border-color: #c00; }</style>")
6 ui.container{ attr = { class = "mdl-grid" }, content = function()
7 ui.container{ attr = { class = "mdl-cell mdl-cell--12-col" }, content = function()
9 ui.form{
10 attr = { onsubmit = "document.getElementById('register_button').disabled = true;" },
11 module = "registration", action = "register",
12 routing = {
13 error = { mode = "forward", module = "registration", view = "register" }
14 },
15 content = function()
17 ui.container{ content = config.self_registration.info_top }
19 execute.view{ module = "registration", view = "_register_form" }
21 ui.container{
22 attr = { class = "use_terms" },
23 content = function()
24 slot.put(config.use_terms)
25 end
26 }
28 for i, checkbox in ipairs(config.use_terms_checkboxes) do
29 ui.tag{ tag = "label", attr = {
30 class = "mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect",
31 ["for"] = "use_terms_checkbox_" .. checkbox.name
32 },
33 content = function()
34 ui.tag{
35 tag = "input",
36 attr = {
37 type = "checkbox",
38 class = "mdl-checkbox__input",
39 id = "use_terms_checkbox_" .. checkbox.name,
40 name = "use_terms_checkbox_" .. checkbox.name,
41 value = "1",
42 style = "float: left;",
43 checked = param.get("use_terms_checkbox_" .. checkbox.name, atom.boolean) and "checked" or nil
44 }
45 }
46 ui.tag{
47 attr = { class = "mdl-checkbox__label" },
48 content = function() slot.put(checkbox.html) end
49 }
50 end
51 }
52 slot.put("<br /><br />")
53 end
55 ui.container{ content = function()
56 slot.put(config.self_registration.info_bottom)
57 end }
59 slot.put("<br />")
61 ui.tag{
62 tag = "input",
63 attr = {
64 id = "register_button",
65 type = "submit",
66 class = "mdl-button mdl-js-button mdl-button--raised mdl-button--colored",
67 value = _"Proceed with registration"
68 }
69 }
70 if config.self_registration.allow_bypass_checks then
71 slot.put(" &nbsp; ")
72 ui.tag{
73 tag = "input",
74 attr = {
75 name = "manual_verification",
76 id = "manual_verification_button",
77 type = "submit",
78 class = "mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--underlined",
79 value = _"Manual verification (w/o mobile)"
80 }
81 }
82 end
83 slot.put(" &nbsp; ")
84 if config.self_registration.cancel_link then
85 ui.link{
86 attr = { class = "mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--underlined" },
87 external = config.self_registration.cancel_link, text = _"Cancel"
88 }
89 else
90 ui.link{
91 attr = { class = "mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--underlined" },
92 module = "index", view = "login", text = _"Cancel", params = {
93 redirect_module = param.get("redirect_module"),
94 redirect_view = param.get("redirect_view"),
95 redirect_id = param.get("redirect_id"),
96 redirect_params = param.get("redirect_params")
97 }
98 }
99 end
100 end
101 }
103 end }
104 end }

Impressum / About Us