liquid_feedback_frontend
view app/main/registration/register.lua @ 1436:7ab60da388fe
Show absolute initiative quorum
| author | bsw |
|---|---|
| date | Tue Oct 16 14:36:07 2018 +0200 (2018-10-16) |
| parents | 574eaf2ff457 |
| children | 63ce1a5c05c1 |
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 ui.container{ content = config.self_registration.info_top }
19 slot.put("<br />")
21 execute.view{ module = "registration", view = "_register_form" }
23 ui.container{
24 attr = { class = "use_terms" },
25 content = function()
26 slot.put(config.use_terms)
27 end
28 }
30 for i, checkbox in ipairs(config.use_terms_checkboxes) do
31 ui.tag{ tag = "label", attr = {
32 class = "mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect",
33 ["for"] = "use_terms_checkbox_" .. checkbox.name
34 },
35 content = function()
36 ui.tag{
37 tag = "input",
38 attr = {
39 type = "checkbox",
40 class = "mdl-checkbox__input",
41 id = "use_terms_checkbox_" .. checkbox.name,
42 name = "use_terms_checkbox_" .. checkbox.name,
43 value = "1",
44 style = "float: left;",
45 checked = param.get("use_terms_checkbox_" .. checkbox.name, atom.boolean) and "checked" or nil
46 }
47 }
48 ui.tag{
49 attr = { class = "mdl-checkbox__label" },
50 content = function() slot.put(checkbox.html) end
51 }
52 end
53 }
54 slot.put("<br /><br />")
55 end
57 ui.container{ content = function()
58 slot.put(config.self_registration.info_bottom)
59 end }
61 slot.put("<br />")
63 ui.tag{
64 tag = "input",
65 attr = {
66 id = "register_button",
67 type = "submit",
68 class = "mdl-button mdl-js-button mdl-button--raised mdl-button--colored",
69 value = _"Proceed with registration"
70 }
71 }
72 if config.self_registration.allow_bypass_checks then
73 slot.put(" ")
74 ui.tag{
75 tag = "input",
76 attr = {
77 name = "manual_verification",
78 id = "manual_verification_button",
79 type = "submit",
80 class = "mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--underlined",
81 value = _"Manual verification (w/o mobile)"
82 }
83 }
84 end
85 slot.put(" ")
86 if config.self_registration.cancel_link then
87 ui.link{
88 attr = { class = "mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--underlined" },
89 external = config.self_registration.cancel_link, text = _"Cancel"
90 }
91 else
92 ui.link{
93 attr = { class = "mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--underlined" },
94 module = "index", view = "login", text = _"Cancel", params = {
95 redirect_module = param.get("redirect_module"),
96 redirect_view = param.get("redirect_view"),
97 redirect_id = param.get("redirect_id"),
98 redirect_params = param.get("redirect_params")
99 }
100 }
101 end
102 end
103 }
105 end }
106 end }
