<div class="control">
<div class="select is-fullwidth">
<select name="block" required>
- <option value="yes">
+ <option value="yes" {% if block %}selected{% end %}>
{{ _("This domain should be blocked, but isn't") }}
</option>
- <option value="no">
+ <option value="no" {% if not block %}selected{% end %}>
{{ _("This domain should not be blocked, but currently is") }}
</option>
</select>
# Fetch any pre-selected names
name = self.get_argument("name", None)
+ # Block or not?
+ block = self.get_argument_bool("block")
+
# Render the page
- self.render("dbl/reports/submit.html", lists=lists, list=list, name=name)
+ self.render("dbl/reports/submit.html",
+ lists=lists, list=list, name=name, block=block)
@tornado.web.authenticated
@base.ratelimit(minutes=60, requests=10)
name = self.get_argument("name"),
reported_by = self.current_user,
comment = self.get_argument("comment", ""),
- block = self.get_argument("block", "off") == "on",
+ block = self.get_argument_bool("block"),
)
# Render a result page