mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 09:51:22 -06:00
Fixes #7169: Fix CSV import file upload
This commit is contained in:
parent
94300b221e
commit
0d7986e082
@ -5,6 +5,7 @@
|
|||||||
* [#7131](https://github.com/netbox-community/netbox/issues/7131) - Fix issue where Site fields were hidden when editing a VLAN group
|
* [#7131](https://github.com/netbox-community/netbox/issues/7131) - Fix issue where Site fields were hidden when editing a VLAN group
|
||||||
* [#7148](https://github.com/netbox-community/netbox/issues/7148) - Fix issue where static query parameters with multiple values were not queried properly
|
* [#7148](https://github.com/netbox-community/netbox/issues/7148) - Fix issue where static query parameters with multiple values were not queried properly
|
||||||
* [#7153](https://github.com/netbox-community/netbox/issues/7153) - Allow clearing of assigned device type images
|
* [#7153](https://github.com/netbox-community/netbox/issues/7153) - Allow clearing of assigned device type images
|
||||||
|
* [#7169](https://github.com/netbox-community/netbox/issues/7169) - Fix CSV import file upload
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -21,8 +21,7 @@ from extras.signals import clear_webhooks
|
|||||||
from utilities.error_handlers import handle_protectederror
|
from utilities.error_handlers import handle_protectederror
|
||||||
from utilities.exceptions import AbortTransaction, PermissionsViolation
|
from utilities.exceptions import AbortTransaction, PermissionsViolation
|
||||||
from utilities.forms import (
|
from utilities.forms import (
|
||||||
BootstrapMixin, BulkRenameForm, ConfirmationForm, CSVDataField, CSVFileField, ImportForm, TableConfigForm,
|
BootstrapMixin, BulkRenameForm, ConfirmationForm, CSVDataField, CSVFileField, ImportForm, restrict_form_fields,
|
||||||
restrict_form_fields,
|
|
||||||
)
|
)
|
||||||
from utilities.permissions import get_permission_for_model
|
from utilities.permissions import get_permission_for_model
|
||||||
from utilities.tables import paginate_table
|
from utilities.tables import paginate_table
|
||||||
|
@ -17,17 +17,32 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col col-md-12 col-lg-10 offset-lg-1">
|
<div class="col col-md-12 col-lg-10 offset-lg-1">
|
||||||
<form action="" method="post" class="form">
|
<ul class="nav nav-pills px-3" role="tablist">
|
||||||
{% csrf_token %}
|
<li class="nav-item" role="presentation">
|
||||||
{% render_form form %}
|
<button class="nav-link active" role="tab" type="button" data-bs-target="#csv" data-bs-toggle="tab">CSV Data</button>
|
||||||
<div class="form-group">
|
</li>
|
||||||
<div class="col col-md-12 text-end">
|
<li class="nav-item" role="presentation">
|
||||||
{% if return_url %}
|
<button class="nav-link" role="tab" type="button" data-bs-target="#csv-file" data-bs-toggle="tab">CSV File Upload</button>
|
||||||
<a href="{{ return_url }}" class="btn btn-outline-danger">Cancel</a>
|
</li>
|
||||||
{% endif %}
|
</ul>
|
||||||
<button type="submit" class="btn btn-primary">Submit</button>
|
<form action="" method="post" enctype="multipart/form-data" class="form">
|
||||||
</div>
|
{% csrf_token %}
|
||||||
|
<div class="tab-content border-0">
|
||||||
|
<div role="tabpanel" class="tab-pane active" id="csv">
|
||||||
|
{% render_field form.csv %}
|
||||||
</div>
|
</div>
|
||||||
|
<div role="tabpanel" class="tab-pane" id="csv-file">
|
||||||
|
{% render_field form.csv_file %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col col-md-12 text-end">
|
||||||
|
{% if return_url %}
|
||||||
|
<a href="{{ return_url }}" class="btn btn-outline-danger">Cancel</a>
|
||||||
|
{% endif %}
|
||||||
|
<button type="submit" class="btn btn-primary">Submit</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{% if fields %}
|
{% if fields %}
|
||||||
<div class="row my-3">
|
<div class="row my-3">
|
||||||
|
Loading…
Reference in New Issue
Block a user