diff options
author | www-data <www-data@nebulus> | 2009-10-24 20:23:19 +0200 |
---|---|---|
committer | www-data <www-data@nebulus> | 2009-10-24 20:23:19 +0200 |
commit | 5d87ce8b9d1054b6a3e23bb26255bc9eca31ba2d (patch) | |
tree | 014b8d1121cf9f963c9d51253ebb912e367eb287 /index.cgi | |
parent | c129cac09529ee809158e4f05c7d03df1c6ebafb (diff) |
Poll foo created
Diffstat (limited to 'index.cgi')
-rwxr-xr-x | index.cgi | 30 |
1 files changed, 20 insertions, 10 deletions
@@ -51,6 +51,14 @@ HEAD if $cgi.include?("create_poll") SITE=$cgi["create_poll"].gsub(/^\//,"") unless File.exist?(SITE) + case $cgi["poll_type"] + when "normal" + Poll.new SITE + when "time" + TimePoll.new SITE + else + exit + end Dir.mkdir(SITE) Dir.chdir(SITE) VCS.init @@ -65,12 +73,6 @@ if $cgi.include?("create_poll") File.open(f,"w").close VCS.add(f) } - case $cgi["poll_type"] - when "create normal poll" - Poll.new SITE - when "create event schedule" - TimePoll.new SITE - end Dir.chdir("..") createnotice = <<SUCCESS <div class='success'> @@ -88,15 +90,23 @@ $htmlout += <<CREATE <form method='post' action='.'> <table> <tr> - <td><label title="#{poll_name_tip = "the name equals the link under which you receive the poll"}" for="poll_name">Name:</label></td> - <td><input title="#{poll_name_tip}" id="poll_name" size='16' type='text' name='create_poll' /></td> + <td class='create_poll'><label title="#{poll_name_tip = "the name equals the link under which you receive the poll"}" for="poll_name">Name:</label></td> + <td class='create_poll'><input title="#{poll_name_tip}" id="poll_name" size='16' type='text' name='create_poll' /></td> +</tr> +<tr> <td>Type:</td> <td class='create_poll'> - <input type='submit' value='create event schedule' name='poll_type' /> + <input id='chooseTime' type='radio' value='time' name='poll_type' /> + <label for='chooseTime'>Event Schedule Poll (e.g. schedule a meeting)</label> <br /> - <input type='submit' value='create normal poll' name='poll_type' /> + <input id='chooseNormal' type='radio' value='normal' name='poll_type' /> + <label for='chooseNormal'>Normal Poll (e.g. vote for what is the best coffee)</label> </td> </tr> +<tr> + <td></td> + <td class='create_poll'><input type='submit' value='create' /></td> +</tr> </table> </form> #{createnotice} |