bsw/jbe@1309: ui.title(_"Self registration")
bsw/jbe@1309: app.html_title.title = _"Self registration"
bsw/jbe@1309:
bsw/jbe@1309: slot.put("")
bsw/jbe@1309:
bsw/jbe@1309: ui.container{ attr = { class = "mdl-grid" }, content = function()
bsw/jbe@1309: ui.container{ attr = { class = "mdl-cell mdl-cell--12-col" }, content = function()
bsw/jbe@1309:
bsw/jbe@1309: ui.form{
bsw@1344: attr = { onsubmit = "document.getElementById('register_button').disabled = true;", enctype = 'multipart/form-data' },
bsw/jbe@1309: module = "registration", action = "register",
bsw@1344:
bsw/jbe@1309: routing = {
bsw/jbe@1309: error = { mode = "forward", module = "registration", view = "register" }
bsw/jbe@1309: },
bsw/jbe@1309: content = function()
bsw/jbe@1309:
bsw@1490: if config.self_registration.info_top_html then
bsw@1490: slot.put(config.self_registration.info_top_html)
bsw@1490: else
bsw@1490: ui.container{ content = config.self_registration.info_top }
bsw@1490: end
bsw@1381: slot.put("
")
bsw/jbe@1309:
bsw/jbe@1309: execute.view{ module = "registration", view = "_register_form" }
bsw/jbe@1309:
bsw/jbe@1309: ui.container{
bsw/jbe@1309: attr = { class = "use_terms" },
bsw/jbe@1309: content = function()
bsw/jbe@1309: slot.put(config.use_terms)
bsw/jbe@1309: end
bsw/jbe@1309: }
bsw/jbe@1309:
bsw/jbe@1309: for i, checkbox in ipairs(config.use_terms_checkboxes) do
bsw/jbe@1309: ui.tag{ tag = "label", attr = {
bsw/jbe@1309: class = "mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect",
bsw/jbe@1309: ["for"] = "use_terms_checkbox_" .. checkbox.name
bsw/jbe@1309: },
bsw/jbe@1309: content = function()
bsw/jbe@1309: ui.tag{
bsw/jbe@1309: tag = "input",
bsw/jbe@1309: attr = {
bsw/jbe@1309: type = "checkbox",
bsw/jbe@1309: class = "mdl-checkbox__input",
bsw/jbe@1309: id = "use_terms_checkbox_" .. checkbox.name,
bsw/jbe@1309: name = "use_terms_checkbox_" .. checkbox.name,
bsw/jbe@1309: value = "1",
bsw/jbe@1309: style = "float: left;",
bsw/jbe@1309: checked = param.get("use_terms_checkbox_" .. checkbox.name, atom.boolean) and "checked" or nil
bsw/jbe@1309: }
bsw/jbe@1309: }
bsw/jbe@1309: ui.tag{
bsw/jbe@1309: attr = { class = "mdl-checkbox__label" },
bsw/jbe@1309: content = function() slot.put(checkbox.html) end
bsw/jbe@1309: }
bsw/jbe@1309: end
bsw/jbe@1309: }
bsw/jbe@1309: slot.put("
")
bsw/jbe@1309: end
bsw/jbe@1309:
bsw/jbe@1309: ui.container{ content = function()
bsw/jbe@1309: slot.put(config.self_registration.info_bottom)
bsw/jbe@1309: end }
bsw/jbe@1309:
bsw/jbe@1309: slot.put("
")
bsw/jbe@1309:
bsw@1490: local text = _"Proceed with registration"
bsw@1490: if config.self_registration.manual_invitation then
bsw@1490: text = _"Register now"
bsw@1490: end
bsw/jbe@1309: ui.tag{
bsw/jbe@1309: tag = "input",
bsw/jbe@1309: attr = {
bsw/jbe@1309: id = "register_button",
bsw/jbe@1309: type = "submit",
bsw/jbe@1309: class = "mdl-button mdl-js-button mdl-button--raised mdl-button--colored",
bsw@1490: value = text
bsw/jbe@1309: }
bsw/jbe@1309: }
bsw@1312: if config.self_registration.allow_bypass_checks then
bsw@1312: slot.put(" ")
bsw@1312: ui.tag{
bsw@1312: tag = "input",
bsw@1312: attr = {
bsw@1312: name = "manual_verification",
bsw@1312: id = "manual_verification_button",
bsw@1312: type = "submit",
bsw@1312: class = "mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--underlined",
bsw@1312: value = _"Manual verification (w/o mobile)"
bsw@1312: }
bsw/jbe@1309: }
bsw@1312: end
bsw/jbe@1309: slot.put(" ")
bsw@1319: if config.self_registration.cancel_link then
bsw@1319: ui.link{
bsw@1319: attr = { class = "mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--underlined" },
bsw@1319: external = config.self_registration.cancel_link, text = _"Cancel"
bsw@1320: }
bsw@1320: else
bsw@1320: ui.link{
bsw@1320: attr = { class = "mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--underlined" },
bsw@1320: module = "index", view = "login", text = _"Cancel", params = {
bsw@1320: redirect_module = param.get("redirect_module"),
bsw@1320: redirect_view = param.get("redirect_view"),
bsw@1320: redirect_id = param.get("redirect_id"),
bsw@1320: redirect_params = param.get("redirect_params")
bsw@1319: }
bsw@1320: }
bsw@1320: end
bsw/jbe@1309: end
bsw/jbe@1309: }
bsw/jbe@1309:
bsw/jbe@1309: end }
bsw/jbe@1309: end }