1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Closes #5024: List available options for choice fields within CSV import forms

This commit is contained in:
Jeremy Stretch
2020-08-20 15:44:30 -04:00
parent 8d351178ac
commit 8f88d2afab
2 changed files with 22 additions and 0 deletions

View File

@ -2,6 +2,10 @@
## v2.9-beta3 (FUTURE)
### Enhancements
* [#5024](https://github.com/netbox-community/netbox/issues/5024) - List available options for choice fields within CSV import forms
### Bug Fixes
* [#4990](https://github.com/netbox-community/netbox/issues/4990) - Restore change logging during custom script execution

View File

@ -66,6 +66,24 @@
{% endif %}
</td>
<td>
{% if field.choice_values %}
<button type="button" class="btn btn-primary btn-xs pull-right" data-toggle="modal" data-target="#{{ name }}_choices">
<i class="fa fa-question"></i>
</button>
<div class="modal fade" id="{{ name }}_choices" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title"><code>{{ name }}</code> Choices</h4>
</div>
<div class="modal-body">
<ul>{% for value, label in field.choices %}{% if value %}<li>{{ value }}</li>{% endif %}{% endfor %}</ul>
</div>
</div>
</div>
</div>
{% endif %}
{% if field.help_text %}
{{ field.help_text }}<br />
{% elif field.label %}