# HG changeset patch # User bsw # Date 1632122481 -7200 # Node ID 6f28933dbc3689d0f53dc5e1a9da8d7003dbe143 # Parent ac45e0fe122130bc07d227f29fe945139344779c Fixed layout, do not show secret when set via link diff -r ac45e0fe1221 -r 6f28933dbc36 app/main/index/confirm_notify_email.lua --- a/app/main/index/confirm_notify_email.lua Mon Sep 20 09:02:57 2021 +0200 +++ b/app/main/index/confirm_notify_email.lua Mon Sep 20 09:21:21 2021 +0200 @@ -1,29 +1,49 @@ ui.title(_"Email address confirmation") -ui.section(function() - - ui.sectionHead(function() - - ui.form{ - attr = { class = "vertical" }, - module = "index", - action = "confirm_notify_email", - routing = { - ok = { - mode = "redirect", +ui.grid{ content = function() + ui.cell_full{ content = function() + ui.container { attr = { class = "mdl-card mdl-shadow--2dp mdl-card__fullwidth" }, content = function() + ui.container{ attr = { class = "mdl-card__title mdl-card--border" }, content = function() + ui.heading { attr = { class = "mdl-card__title-text" }, level = 2, content = _"Email address confirmation" } + end } + ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function() + ui.form{ + attr = { class = "vertical" }, module = "index", - view = "index" + action = "confirm_notify_email", + routing = { + ok = { + mode = "redirect", + module = "index", + view = "index" + } + }, + content = function() + local secret = param.get("secret") + if secret then + ui.field.hidden{ + label = _"Confirmation code", + name = "secret", + value = secret + } + else + ui.field.text{ + label = _"Confirmation code", + name = "secret" + } + end + ui.tag{ + tag = "input", + attr = { + type = "submit", + class = "mdl-button mdl-js-button mdl-button--raised mdl-button--colored", + value = _'Confirm' + } + } + end } - }, - content = function() - ui.field.text{ - label = _"Confirmation code", - name = "secret", - value = param.get("secret") - } - ui.submit{ text = _"Confirm" } - end - } + end } + end } end) -end) \ No newline at end of file +end)