liquid_feedback_frontend
changeset 1289:0722ce4a403a
Choose random default notification hour
author | bsw |
---|---|
date | Mon Apr 18 10:04:52 2016 +0200 (2016-04-18) |
parents | d6c598d81a2b |
children | 7f81a32c3e86 |
files | app/main/member/settings_notification.lua |
line diff
1.1 --- a/app/main/member/settings_notification.lua Mon Apr 18 10:00:09 2016 +0200 1.2 +++ b/app/main/member/settings_notification.lua Mon Apr 18 10:04:52 2016 +0200 1.3 @@ -103,6 +103,10 @@ 1.4 name = string.format("%02d:00 - %02d:59", i, i), 1.5 } 1.6 end 1.7 + local random_hour 1.8 + if app.session.member.disable_notifications then 1.9 + random_hour = multirand.integer(0,23) 1.10 + end 1.11 ui.field.select{ 1.12 container_attr = { style = "display: inline-block; vertical-align: middle;" }, 1.13 attr = { style = "width: 10em;" }, 1.14 @@ -110,7 +114,7 @@ 1.15 foreign_records = foreign_records, 1.16 foreign_id = "id", 1.17 foreign_name = "name", 1.18 - value = app.session.member.notification_hour 1.19 + value = random_hour or app.session.member.notification_hour 1.20 } 1.21 end } 1.22