liquid_feedback_frontend

view app/main/registration/register.lua @ 1858:3d1f0464a3ea

Handle missing ldap.member.allowed function
author bsw
date Tue Sep 20 17:35:29 2022 +0200 (20 months ago)
parents 63ce1a5c05c1
children
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;", enctype = 'multipart/form-data' },
11 module = "registration", action = "register",
13 routing = {
14 error = { mode = "forward", module = "registration", view = "register" }
15 },
16 content = function()
18 if config.self_registration.info_top_html then
19 slot.put(config.self_registration.info_top_html)
20 else
21 ui.container{ content = config.self_registration.info_top }
22 end
23 slot.put("<br />")
25 execute.view{ module = "registration", view = "_register_form" }
27 ui.container{
28 attr = { class = "use_terms" },
29 content = function()
30 slot.put(config.use_terms)
31 end
32 }
34 for i, checkbox in ipairs(config.use_terms_checkboxes) do
35 ui.tag{ tag = "label", attr = {
36 class = "mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect",
37 ["for"] = "use_terms_checkbox_" .. checkbox.name
38 },
39 content = function()
40 ui.tag{
41 tag = "input",
42 attr = {
43 type = "checkbox",
44 class = "mdl-checkbox__input",
45 id = "use_terms_checkbox_" .. checkbox.name,
46 name = "use_terms_checkbox_" .. checkbox.name,
47 value = "1",
48 style = "float: left;",
49 checked = param.get("use_terms_checkbox_" .. checkbox.name, atom.boolean) and "checked" or nil
50 }
51 }
52 ui.tag{
53 attr = { class = "mdl-checkbox__label" },
54 content = function() slot.put(checkbox.html) end
55 }
56 end
57 }
58 slot.put("<br /><br />")
59 end
61 ui.container{ content = function()
62 slot.put(config.self_registration.info_bottom)
63 end }
65 slot.put("<br />")
67 local text = _"Proceed with registration"
68 if config.self_registration.manual_invitation then
69 text = _"Register now"
70 end
71 ui.tag{
72 tag = "input",
73 attr = {
74 id = "register_button",
75 type = "submit",
76 class = "mdl-button mdl-js-button mdl-button--raised mdl-button--colored",
77 value = text
78 }
79 }
80 if config.self_registration.allow_bypass_checks then
81 slot.put(" &nbsp; ")
82 ui.tag{
83 tag = "input",
84 attr = {
85 name = "manual_verification",
86 id = "manual_verification_button",
87 type = "submit",
88 class = "mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--underlined",
89 value = _"Manual verification (w/o mobile)"
90 }
91 }
92 end
93 slot.put(" &nbsp; ")
94 if config.self_registration.cancel_link then
95 ui.link{
96 attr = { class = "mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--underlined" },
97 external = config.self_registration.cancel_link, text = _"Cancel"
98 }
99 else
100 ui.link{
101 attr = { class = "mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--underlined" },
102 module = "index", view = "login", text = _"Cancel", params = {
103 redirect_module = param.get("redirect_module"),
104 redirect_view = param.get("redirect_view"),
105 redirect_id = param.get("redirect_id"),
106 redirect_params = param.get("redirect_params")
107 }
108 }
109 end
110 end
111 }
113 end }
114 end }

Impressum / About Us