How to use the ramp-frontend.ramp_frontend.forms.MultiCheckboxField function in ramp-frontend

To help you get started, we’ve selected a few ramp-frontend examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github paris-saclay-cds / ramp-board / ramp-frontend / ramp_frontend / forms.py View on Github external
'closing_timestamp', [], format='%Y-%m-%d %H:%M:%S'
    )
    public_opening_timestamp = DateTimeField(
        'public_opening_timestamp', [], format='%Y-%m-%d %H:%M:%S'
    )


class MultiCheckboxField(SelectMultipleField):
    """A form containing multiple checkboxes."""
    widget = ListWidget(prefix_label=False)
    option_widget = CheckboxInput()


class ImportForm(FlaskForm):
    """The form allowing to select which model to view."""
    selected_f_names = MultiCheckboxField('selected_f_names')


class CreditForm(FlaskForm):
    """Credit form.

    The credit form is used to acknowledge other submission when making a
    RAMP submission after tracking the user activity.

    Attributes
    ----------
    note : str
        Some notes regarding the credit.
    self_credit : str
        The credit given to the current submission.
    name_credits : list
        The name for the credits.