If the user clicks the checkbox, the text " noreply" will be appended to
the email address line in the pending comment written out to disk.
Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>
return
name = i.name.strip()
email = i.email.strip()
+ wantsreply = True
+ if 'wantsreply' in i:
+ wantsreply = False
website = i.website.strip()
if website != "" and not website.startswith("http"):
website = "http://" + website
break
f = open(fname, "a+")
f.write(name + "\n")
- f.write(email + "\n")
+ if wantsreply:
+ f.write(email + "\n")
+ else:
+ f.write(email + " noreply\n")
f.write(website + "\n")
f.write(timestamp + "\n")
f.write(comment + "\n")
<p><input name="website" type="text" size="30" aria-required="false" />Website (optional)</p>
<p><input name="bottest" type="text" size="30" aria-required="true" />Antispam: enter a four digit number</p>
<p><textarea name="comment" cols="45" rows="8" aria-required="true"></textarea></p>
+ <p><input name="wantsreply" type="checkbox" value="No" />Don't email me updates to comments</p>
<input name="submit" type="submit" id="submit" value="Post Comment" />
</form>
</div>