bsw@75: slot.put_into("title", _"Display settings") bsw@75: bsw@75: slot.select("actions", function() bsw@75: ui.link{ bsw@75: content = function() bsw@75: ui.image{ static = "icons/16/cancel.png" } bsw@75: slot.put(_"Cancel") bsw@75: end, bsw@75: module = "member", bsw@75: view = "settings" bsw@75: } bsw@75: end) bsw@75: bsw@75: bsw@75: util.help("member.settings.display", _"Display settings") bsw@75: bsw@75: ui.form{ bsw@75: attr = { class = "vertical" }, bsw@75: module = "member", bsw@75: action = "update_display", bsw@75: routing = { bsw@75: ok = { bsw@75: mode = "redirect", bsw@75: module = "index", bsw@75: view = "index" bsw@75: } bsw@75: }, bsw@75: content = function() bsw@75: ui.field.select{ bsw@75: label = _"Number of initiatives to preview", bsw@75: foreign_records = { bsw@75: { id = 3, name = "3" }, bsw@75: { id = 4, name = "4" }, bsw@75: { id = 5, name = "5" }, bsw@75: { id = 6, name = "6" }, bsw@75: { id = 7, name = "7" }, bsw@75: { id = 8, name = "8" }, bsw@75: { id = 9, name = "9" }, bsw@75: { id = 10, name = "10" }, bsw@75: }, bsw@75: foreign_id = "id", bsw@75: foreign_name = "name", bsw@75: name = "initiatives_preview_limit", bsw@75: value = app.session.member:get_setting_value("initiatives_preview_limit") bsw@75: } bsw@75: ui.submit{ value = _"Change display settings" } bsw@75: end bsw@75: }