liquid_feedback_frontend
diff app/main/registration/register.lua @ 1309:32cc544d5a5b
Cumulative patch for upcoming frontend version 4
| author | bsw/jbe |
|---|---|
| date | Sun Jul 15 14:07:29 2018 +0200 (2018-07-15) |
| parents | |
| children | a9406a081d6d |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/app/main/registration/register.lua Sun Jul 15 14:07:29 2018 +0200 1.3 @@ -0,0 +1,95 @@ 1.4 +ui.title(_"Self registration") 1.5 +app.html_title.title = _"Self registration" 1.6 + 1.7 +slot.put("<style>select.is-invalid { border-color: #c00; }</style>") 1.8 + 1.9 +ui.container{ attr = { class = "mdl-grid" }, content = function() 1.10 + ui.container{ attr = { class = "mdl-cell mdl-cell--12-col" }, content = function() 1.11 + 1.12 + ui.form{ 1.13 + attr = { onsubmit = "document.getElementById('register_button').disabled = true;" }, 1.14 + module = "registration", action = "register", 1.15 + routing = { 1.16 + error = { mode = "forward", module = "registration", view = "register" } 1.17 + }, 1.18 + content = function() 1.19 + 1.20 + ui.container{ content = config.self_registration.info_top } 1.21 + 1.22 + execute.view{ module = "registration", view = "_register_form" } 1.23 + 1.24 + ui.container{ 1.25 + attr = { class = "use_terms" }, 1.26 + content = function() 1.27 + slot.put(config.use_terms) 1.28 + end 1.29 + } 1.30 + 1.31 + for i, checkbox in ipairs(config.use_terms_checkboxes) do 1.32 + ui.tag{ tag = "label", attr = { 1.33 + class = "mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect", 1.34 + ["for"] = "use_terms_checkbox_" .. checkbox.name 1.35 + }, 1.36 + content = function() 1.37 + ui.tag{ 1.38 + tag = "input", 1.39 + attr = { 1.40 + type = "checkbox", 1.41 + class = "mdl-checkbox__input", 1.42 + id = "use_terms_checkbox_" .. checkbox.name, 1.43 + name = "use_terms_checkbox_" .. checkbox.name, 1.44 + value = "1", 1.45 + style = "float: left;", 1.46 + checked = param.get("use_terms_checkbox_" .. checkbox.name, atom.boolean) and "checked" or nil 1.47 + } 1.48 + } 1.49 + ui.tag{ 1.50 + attr = { class = "mdl-checkbox__label" }, 1.51 + content = function() slot.put(checkbox.html) end 1.52 + } 1.53 + end 1.54 + } 1.55 + slot.put("<br /><br />") 1.56 + end 1.57 + 1.58 + ui.container{ content = function() 1.59 + slot.put(config.self_registration.info_bottom) 1.60 + end } 1.61 + 1.62 + slot.put("<br />") 1.63 + 1.64 + ui.tag{ 1.65 + tag = "input", 1.66 + attr = { 1.67 + id = "register_button", 1.68 + type = "submit", 1.69 + class = "mdl-button mdl-js-button mdl-button--raised mdl-button--colored", 1.70 + value = _"Proceed with registration" 1.71 + } 1.72 + } 1.73 + slot.put(" ") 1.74 + ui.tag{ 1.75 + tag = "input", 1.76 + attr = { 1.77 + name = "manual_verification", 1.78 + id = "manual_verification_button", 1.79 + type = "submit", 1.80 + class = "mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--underlined", 1.81 + value = _"Manual verification (w/o mobile)" 1.82 + } 1.83 + } 1.84 + slot.put(" ") 1.85 + ui.link{ 1.86 + attr = { class = "mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--underlined" }, 1.87 + module = "index", view = "login", text = _"Cancel", params = { 1.88 + redirect_module = param.get("redirect_module"), 1.89 + redirect_view = param.get("redirect_view"), 1.90 + redirect_id = param.get("redirect_id"), 1.91 + redirect_params = param.get("redirect_params") 1.92 + } 1.93 + } 1.94 + end 1.95 + } 1.96 + 1.97 + end } 1.98 +end }