def display(self) -> None: html.text_input(self._varprefix + "name") html.br() html.begin_radio_group(horizontal=True) html.radiobutton(self._varprefix + "match", "exact", True, label=_("exact match")) html.radiobutton(self._varprefix + "match", "regex", False, label=_("regular expression, substring match")) html.end_radio_group() html.br() html.open_span(class_="min_max_row") html.write_text(_("Min. Version: ")) html.text_input(self._varprefix + "version_from", size=9) html.write_text(" ") html.write_text(_("Max. Vers.: ")) html.text_input(self._varprefix + "version_to", size=9) html.close_span() html.br() html.checkbox( self._varprefix + "negate", False, label=_("Negate: find hosts <b>not</b> having this package"))
def display(self) -> None: html.begin_radio_group(horizontal=True) for value, text in [("1", _("up")), ("2", _("down")), ("-1", _("(ignore)"))]: html.radiobutton(self.ident, value, value == "-1", text + " ") html.end_radio_group()
def display(self): # type: () -> None html.begin_radio_group(horizontal=True) for value, text in [("no", _("used")), ("yes", _("free")), ("", _("(ignore)"))]: html.radiobutton(self.ident, value, value == "", text + " ") html.end_radio_group()
def display(self): current = html.request.var(self.varname) html.begin_radio_group(horizontal=True) for value, text in [("1", _("yes")), ("0", _("no")), ("-1", _("(ignore)"))]: checked = current == value or (current in [None, ""] and int(value) == self.deflt) html.radiobutton(self.varname, value, checked, text + u" ") html.end_radio_group()
def display_filter_radiobuttons(*, varname: str, options: List[Tuple[str, str]], default: str, value: FilterHTTPVariables) -> None: pick = value.get(varname, default) html.begin_radio_group(horizontal=True) for state, text in options: html.radiobutton(varname, state, pick == state, text + " ") html.end_radio_group()