Jeremy Stretch 6 лет назад
Родитель
Сommit
30e14db881
2 измененных файлов с 5 добавлено и 2 удалено
  1. 4 1
      netbox/extras/scripts.py
  2. 1 1
      netbox/templates/extras/script.html

+ 4 - 1
netbox/extras/scripts.py

@@ -49,7 +49,10 @@ class ScriptVariable:
         """
         Render the variable as a Django form field.
         """
-        return self.form_field(**self.field_attrs)
+        form_field = self.form_field(**self.field_attrs)
+        form_field.widget.attrs['class'] = 'form-control'
+
+        return form_field
 
 
 class StringVar(ScriptVariable):

+ 1 - 1
netbox/templates/extras/script.html

@@ -63,7 +63,7 @@
                             You do not have permission to run scripts.
                         </div>
                     {% endif %}
-                    <form action="" method="post">
+                    <form action="" method="post" class="form form-horizontal">
                     {% csrf_token %}
                         {% if form %}
                             {% render_form form %}