aboutsummaryrefslogtreecommitdiff
path: root/poll.rb
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2008-10-28 09:14:57 +0100
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2008-10-28 09:14:57 +0100
commitce11c3fc933090ab1eb17290ee223cb441a53cc5 (patch)
tree42bbe90276a71310f75b7e8e73fb043acabeb58f /poll.rb
parentfa7ae7f353d15f90d7a5faaf758a0f0c9267bbc0 (diff)
validated output
Diffstat (limited to 'poll.rb')
-rwxr-xr-xpoll.rb28
1 files changed, 17 insertions, 11 deletions
diff --git a/poll.rb b/poll.rb
index 6f90c8e..e60ff23 100755
--- a/poll.rb
+++ b/poll.rb
@@ -67,8 +67,9 @@ END
ret += "</tr>\n"
}
+ # PARTICIPATE
ret += "<tr id='add_participant'>\n"
- ret += "<td class='name'><input size='16' type='text' name='add_participant' /></td>\n"
+ ret += "<td class='name'><input size='16' type='text' name='add_participant' title='To change a line, add a new person with the same name!' /></td>\n"
@head.sort.each{|columntitle,columndescription|
ret += "<td class='checkboxes'>
<table><tr>
@@ -87,6 +88,7 @@ END
ret += "</tr>\n"
+ # SUMMARY
ret += "<tr><td class='name'>total</td>\n"
@head.sort.each{|columntitle,columndescription|
yes = 0
@@ -132,16 +134,20 @@ END
ret += "<fieldset><legend>Comments</legend>"
@comment.each_with_index{|c,i|
time,name,comment = c
- ret += "<form method='post' action='.'>\n"
- ret += "<div>"
- ret += "<fieldset><legend>#{name} said on #{time.strftime("%d.%m, %H:%M")} "
- ret += "<input type='hidden' name='delete_comment' value='#{i}' />"
- ret += "<input class='delete_comment_button' type='submit' value='delete' style='position: absolute; margin-left: 20px;' />"
- ret += "</legend>"
- ret += comment
- ret += "</fieldset>"
- ret += "</div>"
- ret += "</form>"
+ ret += <<COMMENT
+<form method='post' action='.'>
+<div>
+ <fieldset>
+ <legend>#{name} said on #{time.strftime("%d.%m, %H:%M")}
+ <input type='hidden' name='delete_comment' value='#{i}' />
+ &nbsp;
+ <input class='delete_comment_button' type='submit' value='delete' />
+ </legend>
+ #{comment}
+ </fieldset>
+</div>
+</form>
+COMMENT
}
ret += "</fieldset>"
end