mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
add bootstrap classes to VC membership form
This commit is contained in:
@ -4599,6 +4599,10 @@ class DeviceVCMembershipForm(forms.ModelForm):
|
|||||||
# Require VC position (only required when the Device is a VirtualChassis member)
|
# Require VC position (only required when the Device is a VirtualChassis member)
|
||||||
self.fields['vc_position'].required = True
|
self.fields['vc_position'].required = True
|
||||||
|
|
||||||
|
# Add bootstrap classes to form elements.
|
||||||
|
self.fields['vc_position'].widget.attrs = {'class': 'form-control'}
|
||||||
|
self.fields['vc_priority'].widget.attrs = {'class': 'form-control'}
|
||||||
|
|
||||||
# Validation of vc_position is optional. This is only required when adding a new member to an existing
|
# Validation of vc_position is optional. This is only required when adding a new member to an existing
|
||||||
# VirtualChassis. Otherwise, vc_position validation is handled by BaseVCMemberFormSet.
|
# VirtualChassis. Otherwise, vc_position validation is handled by BaseVCMemberFormSet.
|
||||||
self.validate_vc_position = validate_vc_position
|
self.validate_vc_position = validate_vc_position
|
||||||
|
Reference in New Issue
Block a user