1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Tweak form display (cosmetic)

This commit is contained in:
Jeremy Stretch
2019-08-14 09:40:23 -04:00
parent dab30f50d3
commit 30e14db881
2 changed files with 5 additions and 2 deletions

View File

@ -49,7 +49,10 @@ class ScriptVariable:
""" """
Render the variable as a Django form field. 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): class StringVar(ScriptVariable):

View File

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