class SalesVolumeBeforeBrexitForm(fields.BindNestedFormMixin, forms.Form):
    sales_volume_unit = fields.RadioNested(
        label='Select a metric',
        choices=SALES_VOLUME_UNIT_CHOICES,
        nested_form_class=OtherMetricNameForm,
        nested_form_choice=OTHER,
    )
    quarter_three_2019_sales_volume = forms.IntegerField(label=Q3_2019_LABEL)
    quarter_two_2019_sales_volume = forms.IntegerField(label=Q2_2019_LABEL)
    quarter_one_2019_sales_volume = forms.IntegerField(label=Q1_2019_LABEL)
    quarter_four_2018_sales_volume = forms.IntegerField(label=Q4_2018_label)
class SalesRevenueBeforeBrexitForm(forms.Form):
    quarter_three_2019_sales_revenue = forms.IntegerField(
        label=Q3_2019_LABEL,
        container_css_classes='form-group prefix-pound',
    )
    quarter_two_2019_sales_revenue = forms.IntegerField(
        label=Q2_2019_LABEL,
        container_css_classes='form-group prefix-pound',
    )
    quarter_one_2019_sales_revenue = forms.IntegerField(
        label=Q1_2019_LABEL,
        container_css_classes='form-group prefix-pound',
    )
    quarter_four_2018_sales_revenue = forms.IntegerField(
        label=Q4_2018_label,
        container_css_classes='form-group prefix-pound',
    )
Esempio n. 3
0
class DemoNestedForm(forms.BindNestedFormMixin, forms.Form):
    OTHER = 'OTHER'
    nested_field = forms.RadioNested(
        label='Select a metric',
        help_text='Select "Other"',
        choices=[('KG', 'Kilograms'), ('HANDS', 'Hands'), (OTHER, 'other')],
        nested_form_class=DemoNestedFormDetails,
        nested_form_choice=OTHER,
    )
    something_else = forms.IntegerField()
class MarketSizeDetailsForm(forms.Form):
    market_size_year = forms.ChoiceField(
        label='Financial year',
        help_text='Give the most recent data you can.',
        choices=(
            ('', 'Please select'),
            ('2019', '2019'),
            ('2018', '2018'),
            ('2017', '2017'),
        ),
    )
    market_size = forms.IntegerField(
        label='Market value',
        container_css_classes='form-group prefix-pound',
    )
class ProductionPercentageForm(forms.Form):
    production_cost_percentage = forms.IntegerField(
        label='Percentage of total production costs',
        container_css_classes='form-group suffix-percentage',
    )