# HG changeset patch # User bsw # Date 1643889981 -3600 # Node ID bee9e998fa4de15039242b1bd71806227572a38d # Parent ed156969a4475b7f3cd0452b85c68a764e2b5c11 Fixed new suggestion dialog layout and error redirect diff -r ed156969a447 -r bee9e998fa4d app/main/suggestion/new.lua --- a/app/main/suggestion/new.lua Thu Feb 03 12:56:15 2022 +0100 +++ b/app/main/suggestion/new.lua Thu Feb 03 13:06:21 2022 +0100 @@ -19,6 +19,12 @@ view = "show", id = initiative_id, params = { tab = "suggestions" } + }, + error = { + mode = "forward", + module = "suggestion", + view = "new", + params = { initiative_id = initiative_id } } }, attr = { class = "section vertical" }, @@ -31,8 +37,16 @@ value = _"You are currently not supporting this initiative directly. By adding suggestions to this initiative you will automatically become a potential supporter." } end - ui.field.text{ label = _"A short title (80 chars max)", name = "name" } - + + ui.container{ attr = { class = "mdl-textfield mdl-js-textfield mdl-textfield--floating-label mdl-card__fullwidth" }, content = function () + ui.field.text{ + attr = { id = "lf-initiative__name", class = "mdl-textfield__input" }, + label_attr = { class = "mdl-textfield__label", ["for"] = "lf-initiative__name" }, + label = _"A short title (80 chars max)", + name = "name" + } + end } + ui.field.text{ label = _"Describe how the proposal and/or the reasons of the initiative could be improved", name = "content", @@ -51,7 +65,9 @@ foreign_id = "id", foreign_name = "name" } - + + slot.put("
") + ui.submit{ attr = { class = "mdl-button mdl-js-button mdl-button--raised mdl-button--colored mdl-js-ripple-effect" }, text = _"publish suggestion"