liquid_feedback_frontend
annotate app/main/member/_action/update.lua @ 167:1fdf1e607494
fix vote count display in corner cases
if number of voters are 0 or votes are 0 don't show percentes they are useless or -nan :-)
if number of voters are 0 or votes are 0 don't show percentes they are useless or -nan :-)
| author | Daniel Poelzleithner <poelzi@poelzi.org> |
|---|---|
| date | Sat Oct 09 21:34:25 2010 +0200 (2010-10-09) |
| parents | 733f65c0c0a0 |
| children | c587d8762e62 |
| rev | line source |
|---|---|
| bsw@2 | 1 param.update(app.session.member, |
| bsw@2 | 2 "organizational_unit", |
| bsw@2 | 3 "internal_posts", |
| bsw@2 | 4 "realname", |
| bsw@2 | 5 "birthday", |
| bsw@2 | 6 "address", |
| bsw@2 | 7 "email", |
| bsw@2 | 8 "xmpp_address", |
| bsw@2 | 9 "website", |
| bsw@2 | 10 "phone", |
| bsw@2 | 11 "mobile_phone", |
| bsw@2 | 12 "profession", |
| bsw@2 | 13 "external_memberships", |
| bsw@2 | 14 "external_posts", |
| bsw@2 | 15 "statement" |
| bsw@2 | 16 ) |
| bsw/jbe@0 | 17 |
| bsw@75 | 18 if tostring(app.session.member.birthday) == "invalid_date" then |
| bsw@75 | 19 app.session.member.birthday = nil |
| bsw@75 | 20 slot.put_into("error", _"Date format is not valid. Please use following format: YYYY-MM-DD") |
| bsw@75 | 21 return false |
| bsw@75 | 22 end |
| bsw@75 | 23 |
| bsw/jbe@0 | 24 app.session.member:save() |
| bsw/jbe@0 | 25 |
| bsw/jbe@0 | 26 |
| bsw/jbe@0 | 27 slot.put_into("notice", _"Your page has been updated") |