# -*- coding: utf-8 -*-
from django.contrib import admin
from cms.extensions import PageExtensionAdmin
from parler.admin import TranslatableAdmin
from aldryn_forms.models import FormSubmission
from aldryn_forms.admin.base import BaseFormSubmissionAdmin
from project.models import ImageExtension, SliderItemQualification, Notification
from project.views import CustomFormExportWizardView


@admin.register(ImageExtension)
class ImageExtensionAdmin(PageExtensionAdmin):
    pass


@admin.register(SliderItemQualification)
class SliderItemQualificationAdmin(TranslatableAdmin):
    pass


@admin.register(Notification)
class NotificationAdmin(TranslatableAdmin):
    pass


admin.site.unregister(FormSubmission)


@admin.register(FormSubmission)
class FormSubmissionAdmin(BaseFormSubmissionAdmin):

    def get_form_export_view(self):
        return CustomFormExportWizardView.as_view(admin=self, file_type='xls')


