from django import forms
from .models import ProcurementProposal, Department

class ProcurementProposalForm(forms.ModelForm):
    class Meta:
        model = ProcurementProposal
        fields = ['proposal_number', 'title', 'description', 'estimated_cost', 'department']
        widgets = {
            'proposal_number': forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'e.g., M7-2026-001'}),
            'title': forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Proposal Title'}),
            'description': forms.Textarea(attrs={'class': 'form-control', 'rows': 4, 'placeholder': 'Detailed description...'}),
            'estimated_cost': forms.NumberInput(attrs={'class': 'form-control', 'placeholder': 'Amount in AFN'}),
            'department': forms.Select(attrs={'class': 'form-select'}),
        }
