add contact pages and blocks

This commit is contained in:
2024-06-24 05:11:55 +02:00
parent 944506cc2f
commit 15e4e70806
30 changed files with 1448 additions and 51 deletions

15
dnscms/contacts/views.py Normal file
View File

@ -0,0 +1,15 @@
from wagtail.admin.viewsets.chooser import ChooserViewSet
class ContactEntityChooserViewSet(ChooserViewSet):
model = "contacts.ContactEntity"
icon = "mail"
per_page = 30
page_title = "Choose contact points"
choose_one_text = "Choose a contact point"
choose_another_text = "Choose another contact point"
edit_item_text = "Edit this contact point"
form_fields = ["name", "contact_type", "title", "email", "phone_number", "image"]
contact_entity_chooser_viewset = ContactEntityChooserViewSet("contact_entity_chooser")