from django import forms
from .models import Proposal

class ProposalForm(forms.ModelForm):
    class Meta:
        model = Proposal
        fields = ['title', 'proposer_name', 'description', 'proposal_type', 'attachment']
        widgets = {
            'title': forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Judul Proposal'}),
            'proposer_name': forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Nama Anda/Tim/Lembaga'}),
            'description': forms.Textarea(attrs={'class': 'form-control', 'rows': 5, 'placeholder': 'Jelaskan secara singkat isi proposal Anda'}),
            'proposal_type': forms.Select(attrs={'class': 'form-select'}),
            'attachment': forms.FileInput(attrs={'class': 'form-control'}),
        }
        help_texts = {
            'attachment': 'File dalam format PDF atau Word (.docx).',
        }
