aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-11-19 10:20:14 +0100
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-11-19 10:20:14 +0100
commit6a14abf3b55a780f821dd5041c56c986db00465c (patch)
tree64f8e5e60a27b73e33554e9b89040e8b1bdcf5a0
parentf6d00dd08a3950e955e212e35201016414a942b5 (diff)
entry field changes column when entering the first time
-rw-r--r--timepollhead.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/timepollhead.rb b/timepollhead.rb
index f6a9c5e..d0af441 100644
--- a/timepollhead.rb
+++ b/timepollhead.rb
@@ -296,6 +296,11 @@ END
<div>
<input type='hidden' name='new_columnname' value='#{d.strftime("%Y-%m-%d")}' />
<input type='hidden' name='add_remove_column_month' value='#{d.strftime("%Y-%m")}' />
+END
+ if @data.include?(TimeString.new(d,nil))
+ ret += "<input type='hidden' name='columnid' value='#{TimeString.new(d,nil).to_s}' />"
+ end
+ ret += <<END
<input type="text" name='columntime' title='e.g.: 09:30, morning, afternoon' maxlength="7" style="width: 7ex" /><br />
<input type="submit" value="Add" style="width: 100%" />
</div>