Procházet zdrojové kódy

Merge branch 'develop' of https://github.com/netbox-community/netbox into develop

Daniel Sheppard před 6 roky
rodič
revize
0601619f50
2 změnil soubory, kde provedl 3 přidání a 1 odebrání
  1. 1 0
      CHANGELOG.md
  2. 2 1
      netbox/extras/scripts.py

+ 1 - 0
CHANGELOG.md

@@ -10,6 +10,7 @@ v2.6.4 (FUTURE)
 ## Bug Fixes
 
 * [#3489](https://github.com/netbox-community/netbox/issues/3489) - Prevent exception triggered by webhook upon object deletion
+* [#3501](https://github.com/netbox-community/netbox/issues/3501) - Fix rendering of checkboxes on custom script forms
 
 v2.6.3 (2019-09-04)
 

+ 2 - 1
netbox/extras/scripts.py

@@ -61,7 +61,8 @@ class ScriptVariable:
         Render the variable as a Django form field.
         """
         form_field = self.form_field(**self.field_attrs)
-        form_field.widget.attrs['class'] = 'form-control'
+        if not isinstance(form_field.widget, forms.CheckboxInput):
+            form_field.widget.attrs['class'] = 'form-control'
 
         return form_field