class CreateVendorFormStep6(BaseVendorForm, forms.Form): CURRENCY_CHOICES = [( currency, f'{get_currency_name(currency, locale=Locale.parse(settings.LANGUAGE_CODE, sep="-"))} - {currency}' ) for currency in get_active_currencies()] branch_address = AddressField() ib_account_routing_number = forms.CharField(required=False) ib_account_number = forms.CharField(required=False) ib_account_currency = forms.ChoiceField(choices=sorted(CURRENCY_CHOICES, key=itemgetter(1)), required=False, initial='USD') ib_branch_address = AddressField() nid_type = forms.CharField(required=False) nid_number = forms.CharField(required=False) other_info = forms.CharField(required=False, widget=forms.Textarea) def __init__(self, *args, **kwargs): super(CreateVendorFormStep6, self).__init__(*args, **kwargs) self.fields = self.apply_form_settings(self.fields)
class ProjectEditForm(forms.ModelForm): contact_address = AddressField() class Meta: fields = [ 'title', 'contact_legal_name', 'contact_email', 'contact_address', 'contact_phone', 'value', 'proposed_start', 'proposed_end', ] model = Project widgets = { 'title': forms.TextInput, 'contact_legal_name': forms.TextInput, 'contact_email': forms.TextInput, 'contact_phone': forms.TextInput, 'proposed_end': forms.DateInput, 'proposed_start': forms.DateInput, }