Page MenuHome

Blender ID: allow agreeing to privacy policy at first registration step
AcceptedPublic

Authored by Sybren A. Stüvel (sybren) on Tue, Nov 5, 2:43 PM.

Details

Summary

With this patch it's possible for people to agree to the privacy policy as soon as they sign up for a Blender ID account.

Needs some layout/CSS work, as it looks like this now:

Diff Detail

Repository
rBID Blender ID

Event Timeline

After a little bit of research, turns out the "form-control" class is making it look that big and misaligned.

Could we tweak this function in forms.py to not affect checkbox fields?

class BootstrapModelFormMixin:
    """Adds the Bootstrap CSS class 'form-control' to all form fields."""

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        kwargs.setdefault('label_suffix', '')

        for field_name, field in self.fields.items():
            field.widget.attrs['class'] = 'form-control'

That's the quickest workaround for the time being. Another solution would be to make it (or use a library like CrispyForms?) use the proper Bootstrap syntax.

Could we tweak this function in forms.py to not affect checkbox fields?

I'm fairly sure we could.

That's the quickest workaround for the time being.

I don't want a quick workaround. We should have a proper way to do Django forms with Bootstrap. Implement it once, never think about it again, because from that moment on things just work properly.

Pablo Vazquez (pablovazquez) accepted this revision.EditedThu, Nov 7, 1:17 PM

Okay then I will let you guys handle it.

Master is now updated to the latest Blender Web Assets so as long as the forms use the Bootstrap 4 syntax we should be good to go.

This revision is now accepted and ready to land.Thu, Nov 7, 1:17 PM