from django import forms

from ..models import DokumentLink


class DokumentLinkForm(forms.ModelForm):
    """Form für das Erstellen und Bearbeiten von Dokumentverknüpfungen"""

    class Meta:
        model = DokumentLink
        fields = "__all__"
        widgets = {
            "paperless_id": forms.NumberInput(attrs={"class": "form-control"}),
            "content_type": forms.Select(attrs={"class": "form-select"}),
            "object_id": forms.TextInput(attrs={"class": "form-control"}),
            "verknuepft_am": forms.DateTimeInput(
                attrs={"class": "form-control", "type": "datetime-local"}
            ),
        }
