Skip to content

Patterns based input mode elements do not have an id #196

@ewohnlich

Description

@ewohnlich

For example, the effective date (datetime-picker patter) or subjects(tags) field (select2 pattern). Without an id the associated labels do not match.

Can we give them an id just based on their name? widgets/patterns.py BaseWidget:

    def update(self):
        """Updating pattern_options in element `data-*` attribute."""
        self.el.attrib['id'] = self.name.replace('.', '-')
        if self.pattern_options:
            self.el.attrib["data-" + self._klass_prefix + self.pattern] = json.dumps(
                self.pattern_options
            )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions