Просмотр исходного кода

Fixes #12146: Do not display object selector for disabled fields

jeremystretch 2 лет назад
Родитель
Сommit
f245f07fd9

+ 1 - 0
docs/release-notes/version-3.5.md

@@ -77,6 +77,7 @@ Two new webhook trigger events have been introduced: `job_start` and `job_end`.
 * [#12109](https://github.com/netbox-community/netbox/issues/12109) - Fix migration error when replicating more than 100 job results
 * [#12112](https://github.com/netbox-community/netbox/issues/12112) - Do not link data source URL for local paths
 * [#12115](https://github.com/netbox-community/netbox/issues/12115) - Fix rendering config templates from a data file
+* [#12146](https://github.com/netbox-community/netbox/issues/12146) - Do not display object selector for disabled fields
 
 ### Other Changes
 

+ 1 - 1
netbox/utilities/templates/widgets/apiselect.html

@@ -1,4 +1,4 @@
-{% if widget.attrs.selector %}
+{% if widget.attrs.selector and not widget.attrs.disabled %}
   <div class="d-flex">
     {% include 'django/forms/widgets/select.html' %}
     <button