from wagtail.admin.viewsets.chooser import ChooserViewSet


class EventOrganizerChooserViewSet(ChooserViewSet):
    model = "events.EventOrganizer"
    icon = "group"
    per_page = 30
    page_title = "Choose organizers"
    choose_one_text = "Choose an organizer"
    choose_another_text = "Choose another organizer"
    edit_item_text = "Edit this organizer"
    form_fields = ["name", "association", "external_url"]


event_organizer_chooser_viewset = EventOrganizerChooserViewSet("event_organizer_chooser")
