# HG changeset patch # User bsw # Date 1460905256 -7200 # Node ID 0f4925c2843a9194fb2920d189de9718f8ee6851 # Parent 775b0b040d8f3303b4ba18c17f841c00dd5b2abc Fixes on notification system diff -r 775b0b040d8f -r 0f4925c2843a app/main/member/settings_notification.lua --- a/app/main/member/settings_notification.lua Sun Apr 17 16:59:12 2016 +0200 +++ b/app/main/member/settings_notification.lua Sun Apr 17 17:00:56 2016 +0200 @@ -49,75 +49,77 @@ slot.put("
") - ui.container{ content = function() - ui.tag{ - tag = "input", - attr = { - id = "digest_on", - type = "radio", name = "digest", value = "true", - checked = not app.session.member.digest_dow and "checked" or nil - } - } - ui.tag{ - tag = "label", attr = { ['for'] = "digest_on" }, - content = _"Send me updates on issue phase changes and a regular digest" - } - - ui.tag{ content = _"Day:" } - slot.put(" ") - ui.field.select{ - container_attr = { style = "display: inline-block; width: 10em;" }, - name = "notification_dow", - foreign_records = { - { id = "daily", name = _"daily" }, - { id = "0", name = _"Sunday" }, - { id = "1", name = _"Monday" }, - { id = "2", name = _"Tuesday" }, - { id = "3", name = _"Wednesday" }, - { id = "4", name = _"Thursday" }, - { id = "5", name = _"Friday" }, - { id = "6", name = _"Saturday" } - }, - foreign_id = "id", - foreign_name = "name" - } + ui.container{ attr = { style = "margin-left: 3em;" }, content = function() - slot.put(" ") - - ui.tag{ content = _"Hour:" } - slot.put(" ") - local foreign_records = {} - for i = 0, 23 do - foreign_records[#foreign_records+1] = { - id = i, - name = string.format("%02d", i), + ui.container{ content = function() + ui.tag{ + tag = "input", + attr = { + id = "digest_on", + type = "radio", name = "digest", value = "true", + checked = not app.session.member.digest_dow and "checked" or nil + } + } + ui.tag{ + tag = "label", attr = { ['for'] = "digest_on" }, + content = _"Send me updates on issue phase changes and a regular digest" + } + + ui.tag{ content = _"Day:" } + slot.put(" ") + ui.field.select{ + container_attr = { style = "display: inline-block; width: 10em; vertical-align: middle;" }, + name = "notification_dow", + foreign_records = { + { id = "daily", name = _"daily" }, + { id = "0", name = _"Sunday" }, + { id = "1", name = _"Monday" }, + { id = "2", name = _"Tuesday" }, + { id = "3", name = _"Wednesday" }, + { id = "4", name = _"Thursday" }, + { id = "5", name = _"Friday" }, + { id = "6", name = _"Saturday" } + }, + foreign_id = "id", + foreign_name = "name" } - end - ui.field.select{ - container_attr = { style = "display: inline-block; width: 3em;" }, - name = "notification_hour", - foreign_records = foreign_records, - foreign_id = "id", - foreign_name = "name" - } + + slot.put(" ") + + ui.tag{ content = _"Hour:" } + slot.put(" ") + local foreign_records = {} + for i = 0, 23 do + foreign_records[#foreign_records+1] = { + id = i, + name = string.format("%02d", i), + } + end + ui.field.select{ + container_attr = { style = "display: inline-block; width: 3em; vertical-align: middle;" }, + name = "notification_hour", + foreign_records = foreign_records, + foreign_id = "id", + foreign_name = "name" + } + end } + + ui.container{ content = function() + ui.tag{ + tag = "input", + attr = { + id = "digest_off", + type = "radio", name = "digest", value = "false", + checked = not app.session.member.digest_dow and "checked" or nil + } + } + ui.tag{ + tag = "label", attr = { ['for'] = "digest_off" }, + content = _"Send me only updates on issue phase changes" + } + end } end } - ui.container{ content = function() - ui.tag{ - tag = "input", - attr = { - id = "digest_off", - type = "radio", name = "digest", value = "false", - checked = not app.session.member.digest_dow and "checked" or nil - } - } - ui.tag{ - tag = "label", attr = { ['for'] = "digest_off" }, - content = _"Send me only updates on issue phase changes" - } - end } - - ui.container{ content = function() ui.tag{