← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1511913] [NEW] set field's required attribute with 'data-is-required': 'true', isn't effective

 

Public bug reported:

in file /dashboards/admin/networks/forms.py, code like this:
segmentation_id = forms.IntegerField(
        label=_("Segmentation ID"),
        widget=forms.TextInput(attrs={
            'class': 'switched',
            'data-switch-on': 'network_type', 
            'data-network_type-vlan': _('Segmentation ID'),
            'data-network_type-gre': _('Segmentation ID'),
            'data-network_type-vxlan': _('Segmentation ID')
        }))
then, in form, "Segmentation ID" is maked with '*',but modify the code like this:
    segmentation_id = forms.IntegerField(
        label=_("Segmentation ID"),
        required=False,
        widget=forms.TextInput(attrs={
            'class': 'switched',
            'data-is-required': 'true',
            'data-switch-on': 'network_type',
            'data-network_type-vlan': _('Segmentation ID'),
            'data-network_type-gre': _('Segmentation ID'),
            'data-network_type-vxlan': _('Segmentation ID')
        }))
in form,"Segmentation ID" isn't maked with '*'

** Affects: horizon
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1511913

Title:
  set field's required attribute with 'data-is-required': 'true',isn't
  effective

Status in OpenStack Dashboard (Horizon):
  New

Bug description:
  in file /dashboards/admin/networks/forms.py, code like this:
  segmentation_id = forms.IntegerField(
          label=_("Segmentation ID"),
          widget=forms.TextInput(attrs={
              'class': 'switched',
              'data-switch-on': 'network_type', 
              'data-network_type-vlan': _('Segmentation ID'),
              'data-network_type-gre': _('Segmentation ID'),
              'data-network_type-vxlan': _('Segmentation ID')
          }))
  then, in form, "Segmentation ID" is maked with '*',but modify the code like this:
      segmentation_id = forms.IntegerField(
          label=_("Segmentation ID"),
          required=False,
          widget=forms.TextInput(attrs={
              'class': 'switched',
              'data-is-required': 'true',
              'data-switch-on': 'network_type',
              'data-network_type-vlan': _('Segmentation ID'),
              'data-network_type-gre': _('Segmentation ID'),
              'data-network_type-vxlan': _('Segmentation ID')
          }))
  in form,"Segmentation ID" isn't maked with '*'

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1511913/+subscriptions


Follow ups