Jeremy Stretch 6 лет назад
Родитель
Сommit
0d57cb0033
2 измененных файлов с 4 добавлено и 2 удалено
  1. 3 2
      docs/additional-features/custom-scripts.md
  2. 1 0
      docs/release-notes/version-2.7.md

+ 3 - 2
docs/additional-features/custom-scripts.md

@@ -177,10 +177,11 @@ An IPv4 or IPv6 network with a mask. Returns a `netaddr.IPNetwork` object. Two a
 
 All variables support the following default options:
 
-* `label` - The name of the form field
-* `description` - A brief description of the field
 * `default` - The field's default value
+* `description` - A brief description of the field
+* `label` - The name of the form field
 * `required` - Indicates whether the field is mandatory (default: true)
+* `widget` - The class of form widget to use (see the [Django documentation](https://docs.djangoproject.com/en/stable/ref/forms/widgets/))
 
 ## Example
 

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

@@ -2,6 +2,7 @@
 
 ## Enhancements
 
+* [#3766](https://github.com/netbox-community/netbox/issues/3766) - Allow custom script authors to specify the form widget for each variable
 * [#3799](https://github.com/netbox-community/netbox/issues/3799) - Greatly improve performance when ordering device components
 * [#3986](https://github.com/netbox-community/netbox/issues/3986) - Include position numbers in SVG image when rendering rack elevation
 * [#4100](https://github.com/netbox-community/netbox/issues/4100) - Add device filter to component list views