mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Remove obsolete ComponentForm
This commit is contained in:
@@ -727,15 +727,6 @@ class ConfirmationForm(BootstrapMixin, ReturnURLForm):
|
||||
confirm = forms.BooleanField(required=True, widget=forms.HiddenInput(), initial=True)
|
||||
|
||||
|
||||
# TODO: Remove ComponentForm
|
||||
class ComponentForm(BootstrapMixin, forms.Form):
|
||||
"""
|
||||
Allow inclusion of the parent Device/VirtualMachine as context for limiting field choices.
|
||||
"""
|
||||
def get_iterative_data(self, iteration):
|
||||
return {}
|
||||
|
||||
|
||||
class BulkEditForm(forms.Form):
|
||||
"""
|
||||
Base form for editing multiple objects in bulk
|
||||
|
@@ -854,7 +854,8 @@ class ComponentCreateView(GetReturnURLMixin, View):
|
||||
|
||||
# Initialize the individual component form
|
||||
data['name'] = name
|
||||
data.update(form.get_iterative_data(i))
|
||||
if hasattr(form, 'get_iterative_data'):
|
||||
data.update(form.get_iterative_data(i))
|
||||
component_form = self.model_form(data)
|
||||
|
||||
if component_form.is_valid():
|
||||
|
Reference in New Issue
Block a user