liquid_feedback_frontend
changeset 1466:f921269f7788
Fixed heading of admin newsletter edit view
author | bsw |
---|---|
date | Thu Oct 18 17:37:33 2018 +0200 (2018-10-18) |
parents | 54efe6c8ae9d |
children | 29fc1f7e7880 |
files | app/main/admin/newsletter_edit.lua |
line diff
1.1 --- a/app/main/admin/newsletter_edit.lua Thu Oct 18 17:36:35 2018 +0200 1.2 +++ b/app/main/admin/newsletter_edit.lua Thu Oct 18 17:37:33 2018 +0200 1.3 @@ -13,7 +13,7 @@ 1.4 ui.cell_main{ content = function() 1.5 ui.container{ attr = { class = "mdl-card mdl-card__fullwidth mdl-shadow--2dp" }, content = function() 1.6 ui.container{ attr = { class = "mdl-card__title mdl-card--border" }, content = function() 1.7 - ui.heading { attr = { class = "mdl-card__title-text" }, level = 2, content = _"Member list" } 1.8 + ui.heading { attr = { class = "mdl-card__title-text" }, level = 2, content = newsletter and (newsletter.subject) or _"New newsletter" } 1.9 end } 1.10 ui.container{ attr = { class = "mdl-card__content" }, content = function() 1.11 ui.form{ 1.12 @@ -31,37 +31,32 @@ 1.13 }, 1.14 content = function() 1.15 1.16 - ui.sectionHead( function() 1.17 - ui.heading { level = 1, content = newsletter and (newsletter.subject) or _"New newsletter" } 1.18 - end ) 1.19 - 1.20 - ui.sectionRow( function() 1.21 - local units = { 1.22 - { id = 0, name = _"All members" }, 1.23 - { id = "_", name = _"" }, 1.24 - } 1.25 - for i, unit in ipairs(Unit:get_flattened_tree()) do 1.26 - units[#units+1] = unit 1.27 - end 1.28 - ui.field.text{ label = _"Date", name = "published" } 1.29 - ui.field.select{ 1.30 - label = "Recipient", 1.31 - name = "unit_id", 1.32 - foreign_records = units, 1.33 - foreign_id = "id", 1.34 - foreign_name = "name", 1.35 - disabled_records = { ["_"] = true }, 1.36 - value = newsletter.unit_id 1.37 - } 1.38 - ui.field.boolean{ label = _"Override disable notifications?", name = "include_all_members" } 1.39 - slot.put("<br />") 1.40 - ui.field.text{ label = _"Subject", name = "subject" } 1.41 - ui.field.text{ label = _"Content", name = "content", multiline = true, attr = { rows = "20" } } 1.42 + local units = { 1.43 + { id = 0, name = _"All members" }, 1.44 + { id = "_", name = _"" }, 1.45 + } 1.46 + for i, unit in ipairs(Unit:get_flattened_tree()) do 1.47 + units[#units+1] = unit 1.48 + end 1.49 + ui.field.text{ label = _"Date", name = "published" } 1.50 + ui.field.select{ 1.51 + label = "Recipient", 1.52 + name = "unit_id", 1.53 + foreign_records = units, 1.54 + foreign_id = "id", 1.55 + foreign_name = "name", 1.56 + disabled_records = { ["_"] = true }, 1.57 + value = newsletter.unit_id 1.58 + } 1.59 + ui.field.boolean{ label = _"Override disable notifications?", name = "include_all_members" } 1.60 + slot.put("<br />") 1.61 + ui.field.text{ label = _"Subject", name = "subject" } 1.62 + ui.field.text{ label = _"Content", name = "content", multiline = true, attr = { rows = "20" } } 1.63 1.64 - ui.submit{ text = _"create newsletter" } 1.65 - slot.put(" ") 1.66 - ui.link { module = "admin", view = "index", content = _"cancel" } 1.67 - end ) 1.68 + ui.submit{ text = _"create newsletter" } 1.69 + slot.put(" ") 1.70 + ui.link { module = "admin", view = "index", content = _"cancel" } 1.71 + 1.72 end 1.73 } 1.74 end }