Changes on new server
[bpt/portal.git] / poll.mlt
index 3abe588..ad8e152 100644 (file)
--- a/poll.mlt
+++ b/poll.mlt
@@ -72,9 +72,9 @@ elseif $"cmd" = "add" then
        val votes = Web.stoi ($"votes");
        if title = "" then
                %><h3><b>Your poll must have a title.</b></h3><%
-       elseif not (Poll.dateGeNow starts) then
+       elseif not pollAdmin and not (Poll.dateGeNow starts) then
                %><h3><b>That start date is in the past!</b></h3><%
-       elseif not (Poll.dateLe (starts, ends)) then
+       elseif not pollAdmin and not (Poll.dateLe (starts, ends)) then
                %><h3><b>The end date comes before the start date!</b></h3><%
        elseif votes <= 0 then
                %><h3><b>You must specify a positive number of votes per person.</b></h3><%
@@ -114,9 +114,9 @@ elseif $"mod" <> "" then
        val votes = Web.stoi ($"votes");
        if title = "" then
                %><h3><b>Your poll must have a title.</b></h3><%
-       elseif not (Poll.dateGeNow starts) then
+       elseif not pollAdmin and not (Poll.dateGeNow starts) then
                %><h3><b>That start date is in the past!</b></h3><%
-       elseif not (Poll.dateLe (starts, ends)) then
+       elseif not pollAdmin and not (Poll.dateLe (starts, ends)) then
                %><h3><b>The end date comes before the start date!</b></h3><%
        elseif votes <= 0 then
                %><h3><b>You must specify a positive number of votes per person.</b></h3><%