b3af506 frontend: rework chroots fields in build forms

8 files Authored by frostyx 3 years ago, Committed by praiskup 3 years ago,
    frontend: rework chroots fields in build forms
    
    Fix #1350
    
    Previously we generated our chroot checkboxes as separate fields within the
    form. Each of them having a different name, e.g.
    
        <input name="fedora-32-x86_64" type="checkbox" value="y">
        <input name="fedora-33-i386" type="checkbox" value="y">
        <input name="fedora-33-x86_64" type="checkbox" value="y">
    
    This is a recommended way of generating checkboxes in many Stack Overflow
    threads but it's not flexible enough. Not even getting all ticked checkboxes
    isn't easy because how to determine which form fields belong to the checkbox
    group ... it needs to be done the other way around by comparing if database
    values are actually in the form. This could probably be worked around by
    prefixing the field name but this whole thing is just ...
    
    The `MultiCheckboxField` solves the checkboxes generation perfectly. As a
    coincidence, it fixed #1350.
    
    I am also throwing away `chroots_sets` from build forms because I don't
    see any difference with or without them.
    
    Lastly, I am fixing some tests because since #1350 is fixed, we are now getting
    errors that the fedora-18-x86_64 chroot that we want to build in, is not enabled
    in the project.