Browse Source

Closes #3580: Render text and URL fields as textareas in the custom link form

Jeremy Stretch 6 years ago
parent
commit
6068b1a275
2 changed files with 5 additions and 0 deletions
  1. 1 0
      CHANGELOG.md
  2. 4 0
      netbox/extras/admin.py

+ 1 - 0
CHANGELOG.md

@@ -12,6 +12,7 @@ v2.6.6 (FUTURE)
 * [#1941](https://github.com/netbox-community/netbox/issues/1941) - Add InfiniBand interface types
 * [#3259](https://github.com/netbox-community/netbox/issues/3259) - Add `rack` and `site` filters for cables
 * [#3563](https://github.com/netbox-community/netbox/issues/3563) - Enable editing of individual DeviceType components
+* [#3580](https://github.com/netbox-community/netbox/issues/3580) - Render text and URL fields as textareas in the custom link form
 
 ---
 

+ 4 - 0
netbox/extras/admin.py

@@ -86,6 +86,10 @@ class CustomLinkForm(forms.ModelForm):
     class Meta:
         model = CustomLink
         exclude = []
+        widgets = {
+            'text': forms.Textarea,
+            'url': forms.Textarea,
+        }
         help_texts = {
             'text': 'Jinja2 template code for the link text. Reference the object as <code>{{ obj }}</code>. Links '
                     'which render as empty text will not be displayed.',