Пример #1
0
    def _add_form_options(self, form_config):
        """
        Add the main options provided to the end user UI

        :param dict form_config: The current form configuration
        :returns: The dict with a new 'options' key
        """
        options = {
            'tvas': json_tvas(self.request),
            "workunits": json_workunits(self.request),
            "products": json_products(self.request),
            "mentions": json_mentions(self.request),
        }
        if hasattr(self, '_more_form_options'):
            options = self._more_form_options(options)

        form_config['options'] = options
        return form_config
Пример #2
0
    def _add_form_options(self, form_config):
        """
        Add the main options provided to the end user UI

        :param dict form_config: The current form configuration
        :returns: The dict with a new 'options' key
        """
        options = {
            'tvas': json_tvas(self.request),
            "workunits": json_workunits(self.request),
            "products": json_products(self.request),
            "mentions": json_mentions(self.request),
            "business_types": json_business_types(self.request),
        }
        if hasattr(self, '_more_form_options'):
            options = self._more_form_options(options)

        form_config['options'] = options
        return form_config