liquid_feedback_frontend

changeset 1680:6f28933dbc36

Fixed layout, do not show secret when set via link
author bsw
date Mon Sep 20 09:21:21 2021 +0200 (2021-09-20)
parents ac45e0fe1221
children b155969acc6c
files app/main/index/confirm_notify_email.lua
line diff
     1.1 --- a/app/main/index/confirm_notify_email.lua	Mon Sep 20 09:02:57 2021 +0200
     1.2 +++ b/app/main/index/confirm_notify_email.lua	Mon Sep 20 09:21:21 2021 +0200
     1.3 @@ -1,29 +1,49 @@
     1.4  ui.title(_"Email address confirmation")
     1.5  
     1.6 -ui.section(function() 
     1.7 -
     1.8 -  ui.sectionHead(function()
     1.9 -
    1.10 -    ui.form{
    1.11 -      attr = { class = "vertical" },
    1.12 -      module = "index",
    1.13 -      action = "confirm_notify_email",
    1.14 -      routing = {
    1.15 -        ok = {
    1.16 -          mode = "redirect",
    1.17 +ui.grid{ content = function()
    1.18 +  ui.cell_full{ content = function()
    1.19 +    ui.container { attr = { class = "mdl-card mdl-shadow--2dp mdl-card__fullwidth" }, content = function()
    1.20 +      ui.container{ attr = { class = "mdl-card__title mdl-card--border" }, content = function()
    1.21 +        ui.heading { attr = { class = "mdl-card__title-text" }, level = 2, content = _"Email address confirmation" }
    1.22 +      end }
    1.23 +      ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function()
    1.24 +        ui.form{
    1.25 +          attr = { class = "vertical" },
    1.26            module = "index",
    1.27 -          view = "index"
    1.28 +          action = "confirm_notify_email",
    1.29 +          routing = {
    1.30 +            ok = {
    1.31 +              mode = "redirect",
    1.32 +              module = "index",
    1.33 +              view = "index"
    1.34 +            }
    1.35 +          },
    1.36 +          content = function()
    1.37 +            local secret = param.get("secret")
    1.38 +            if secret then
    1.39 +              ui.field.hidden{
    1.40 +                label = _"Confirmation code",
    1.41 +                name = "secret",
    1.42 +                value = secret
    1.43 +              }
    1.44 +            else
    1.45 +              ui.field.text{
    1.46 +                label = _"Confirmation code",
    1.47 +                name = "secret"
    1.48 +              }
    1.49 +            end
    1.50 +            ui.tag{
    1.51 +              tag = "input",
    1.52 +              attr = {
    1.53 +                type = "submit",
    1.54 +                class = "mdl-button mdl-js-button mdl-button--raised mdl-button--colored",
    1.55 +                value = _'Confirm'
    1.56 +              }
    1.57 +            }
    1.58 +          end
    1.59          }
    1.60 -      },
    1.61 -      content = function()
    1.62 -        ui.field.text{
    1.63 -          label = _"Confirmation code",
    1.64 -          name = "secret",
    1.65 -          value = param.get("secret")
    1.66 -        }
    1.67 -        ui.submit{ text = _"Confirm" }
    1.68 -      end
    1.69 -    }
    1.70  
    1.71 +      end }
    1.72 +    end }
    1.73    end)
    1.74 -end)
    1.75 \ No newline at end of file
    1.76 +end)

Impressum / About Us