Пример #1
0
    def hasInput(self):
        """Is there any input for the widget.

        We need to defer the call to the other widget when either there are no
        terms in the vocabulary or the other radio button was selected.
        """
        if not self._shouldRenderSuggestions():
            return self.other_selection_widget.hasInput()
        else:
            has_input = LaunchpadRadioWidget.hasInput(self)
            if has_input:
                if self._getFormInput() == "other":
                    return self.other_selection_widget.hasInput()
            return has_input
Пример #2
0
    def hasInput(self):
        """Is there any input for the widget.

        We need to defer the call to the other widget when either there are no
        terms in the vocabulary or the other radio button was selected.
        """
        if not self._shouldRenderSuggestions():
            return self.other_selection_widget.hasInput()
        else:
            has_input = LaunchpadRadioWidget.hasInput(self)
            if has_input:
                if self._getFormInput() == "other":
                    return self.other_selection_widget.hasInput()
            return has_input