liquid_feedback_frontend

changeset 1838:bee9e998fa4d

Fixed new suggestion dialog layout and error redirect
author bsw
date Thu Feb 03 13:06:21 2022 +0100 (2022-02-03)
parents ed156969a447
children 7d000a357704
files app/main/suggestion/new.lua
line diff
     1.1 --- a/app/main/suggestion/new.lua	Thu Feb 03 12:56:15 2022 +0100
     1.2 +++ b/app/main/suggestion/new.lua	Thu Feb 03 13:06:21 2022 +0100
     1.3 @@ -19,6 +19,12 @@
     1.4                view = "show",
     1.5                id = initiative_id,
     1.6                params = { tab = "suggestions" }
     1.7 +            },
     1.8 +            error = {
     1.9 +              mode = "forward",
    1.10 +              module = "suggestion",
    1.11 +              view = "new",
    1.12 +              params = { initiative_id = initiative_id }
    1.13              }
    1.14            },
    1.15            attr = { class = "section vertical" },
    1.16 @@ -31,8 +37,16 @@
    1.17                  value = _"You are currently not supporting this initiative directly. By adding suggestions to this initiative you will automatically become a potential supporter."
    1.18                }
    1.19              end
    1.20 -            ui.field.text{ label = _"A short title (80 chars max)", name = "name" }
    1.21 -            
    1.22 +
    1.23 +            ui.container{ attr = { class = "mdl-textfield mdl-js-textfield mdl-textfield--floating-label mdl-card__fullwidth" }, content = function ()
    1.24 +              ui.field.text{
    1.25 +                attr = { id = "lf-initiative__name", class = "mdl-textfield__input" },
    1.26 +                label_attr = { class = "mdl-textfield__label", ["for"] = "lf-initiative__name" },
    1.27 +                label = _"A short title (80 chars max)",
    1.28 +                name  = "name"
    1.29 +              }
    1.30 +            end }
    1.31 +
    1.32              ui.field.text{
    1.33                label = _"Describe how the proposal and/or the reasons of the initiative could be improved",
    1.34                name = "content",
    1.35 @@ -51,7 +65,9 @@
    1.36                foreign_id = "id",
    1.37                foreign_name = "name"
    1.38              }
    1.39 -            
    1.40 +
    1.41 +            slot.put("<br>")
    1.42 +
    1.43              ui.submit{ 
    1.44                attr = { class = "mdl-button mdl-js-button mdl-button--raised mdl-button--colored mdl-js-ripple-effect" },
    1.45                text = _"publish suggestion" 

Impressum / About Us