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