liquid_feedback_frontend

view app/main/index/register.lua @ 19:00d1004545f1

Dynamic interface using XMLHttpRequests, and many other changes

Bugfixes:
- Only allow voting on admitted initiatives
- Repaired issue search
- Don't display delegations for closed issues on member page
- Don't show revoke link in initiative, when issue is already half_frozen
- Localization for voting JavaScript
- Display author of suggestions

Disclosure of voting data after voting is finished:
- Possibility to inspect every ballot including preferences
- Show number of voters preferring one initiative to another initiative

Interface behaviour changes:
- Reversed default order of drafts
- Default order of suggestions changed
- Show new drafts of initiatives only once per day in timeline

Accessibility:
- Barrier-free voting implemented
- POST links are now accessible without JavaScript
- Changed gray for unsatisfied supporters in bar graph to a lighter gray

Other interface improvements:
- Optical enhancements
- Dynamic interface using XMLHttpRequests
- Show usage terms in about section
- Show own membership in area listing
- Show uninformed supporters greyed out and marked with yellow question mark
- Warning box in non-admitted initiatives
- When voted, don't display voting notice and change label of voting link
- Show object counts in more tabulator heads
- Enlarged member statement input field

Miscellaneous:
- Code cleanup
- Added README file containing installation instructions
- Use new WebMCP function ui.filters{...} instead of own ui.filter and ui.order functions
author bsw/jbe
date Sat Feb 20 22:10:31 2010 +0100 (2010-02-20)
parents 0ee1e0c42d4c
children 26c8177ef348
line source
1 slot.put_into("title", _"Registration")
4 local code = param.get("code")
5 local notify_email = param.get("notify_email")
6 local name = param.get("name")
7 local login = param.get("login")
9 slot.put_into("title", " (")
10 ui.form{
11 attr = { class = "vertical" },
12 module = 'index',
13 action = 'register',
14 params = {
15 code = code,
16 notify_email = notify_email,
17 name = name,
18 login = login
19 },
20 content = function()
22 if not code then
23 slot.put_into("title", _"Step 1/5: Invite code")
24 ui.tag{
25 tag = "p",
26 content = _"Please enter the invite code you've received."
27 }
28 ui.field.text{
29 label = _'Invite code',
30 name = 'code',
31 value = param.get("invite")
32 }
34 elseif not notify_email then
35 slot.put_into("title", _"Step 2/5: Email address")
36 slot.select("actions", function()
37 ui.link{
38 content = function()
39 ui.image{ static = "icons/16/resultset_previous.png" }
40 slot.put(_"One step back")
41 end,
42 module = "index",
43 view = "register",
44 params = {
45 }
46 }
47 end)
48 ui.tag{
49 tag = "p",
50 content = _"Please enter your email address. This address will be used for automatic notifications (if you request them) and in case you've lost your password. This address will not be published. After registration you will receive an email with a confirmation link."
51 }
52 ui.field.text{
53 label = _'Email address',
54 name = 'notify_email',
55 value = param.get("notify_email")
56 }
58 elseif not name then
59 slot.put_into("title", _"Step 3/5: Username")
60 slot.select("actions", function()
61 ui.link{
62 content = function()
63 ui.image{ static = "icons/16/resultset_previous.png" }
64 slot.put(_"One step back")
65 end,
66 module = "index",
67 view = "register",
68 params = {
69 code = code
70 }
71 }
72 end)
73 ui.tag{
74 tag = "p",
75 content = _"Please choose a name, i.e. your real name or your nick name. This name will be shown to others to identify you."
76 }
77 ui.field.text{
78 label = _'Name',
79 name = 'name',
80 value = param.get("name")
81 }
83 elseif not login then
84 slot.put_into("title", _"Step 4/5: Login name")
85 slot.select("actions", function()
86 ui.link{
87 content = function()
88 ui.image{ static = "icons/16/resultset_previous.png" }
89 slot.put(_"One step back")
90 end,
91 module = "index",
92 view = "register",
93 params = {
94 code = code,
95 notify_email = notify_email
96 }
97 }
98 end)
99 ui.tag{
100 tag = "p",
101 content = _"Please choose a login name. This name will not be shown to others and is used only by you to login into the system. The login name is case sensitive."
102 }
103 ui.field.text{
104 label = _'Login name',
105 name = 'login',
106 value = param.get("login")
107 }
109 else
110 slot.put_into("title", _"Step 5/5: Terms of use and password")
111 slot.select("actions", function()
112 ui.link{
113 content = function()
114 ui.image{ static = "icons/16/resultset_previous.png" }
115 slot.put(_"One step back")
116 end,
117 module = "index",
118 view = "register",
119 params = {
120 code = code,
121 notify_email = notify_email,
122 name = name,
123 }
124 }
125 end)
126 ui.container{
127 attr = { class = "wiki use_terms" },
128 content = function()
129 slot.put(format.wiki_text(config.use_terms))
130 end
131 }
132 slot.put("<br />")
133 ui.field.text{
134 label = _'Email address',
135 value = param.get("notify_email"),
136 readonly = true
137 }
138 ui.field.text{
139 label = _'Name',
140 value = param.get("name"),
141 readonly = true
142 }
143 ui.field.text{
144 label = _'Login name',
145 value = param.get("login"),
146 readonly = true
147 }
149 ui.tag{
150 tag = "p",
151 content = _"I accept the terms of use by checking the following checkbox:"
152 }
153 ui.field.boolean{
154 label = _"Terms accepted",
155 name = "use_terms_accepted",
156 }
158 ui.tag{
159 tag = "p",
160 content = _"Please choose a password and enter it twice. The password is case sensitive."
161 }
162 ui.field.password{
163 label = _'Password',
164 name = 'password1',
165 }
166 ui.field.password{
167 label = _'Password (repeat)',
168 name = 'password2',
169 }
171 end
173 ui.submit{
174 text = _'Register'
175 }
177 slot.put_into("title", ")")
178 slot.select("actions", function()
179 ui.link{
180 content = function()
181 ui.image{ static = "icons/16/cancel.png" }
182 slot.put(_"Cancel registration")
183 end,
184 module = "index",
185 view = "index"
186 }
187 end)
189 end
190 }

Impressum / About Us