mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-19 11:52:22 -06:00
Initial work on #20 - patch panels
This commit is contained in:
@@ -643,6 +643,9 @@ class ComponentForm(BootstrapMixin, forms.Form):
|
||||
self.parent = parent
|
||||
super(ComponentForm, self).__init__(*args, **kwargs)
|
||||
|
||||
def get_iterative_data(self, iteration):
|
||||
return {}
|
||||
|
||||
|
||||
class BulkEditForm(forms.Form):
|
||||
"""
|
||||
|
||||
@@ -711,10 +711,11 @@ class ComponentCreateView(View):
|
||||
data = deepcopy(request.POST)
|
||||
data[self.parent_field] = parent.pk
|
||||
|
||||
for name in form.cleaned_data['name_pattern']:
|
||||
for i, name in enumerate(form.cleaned_data['name_pattern']):
|
||||
|
||||
# Initialize the individual component form
|
||||
data['name'] = name
|
||||
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