mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-23 21:57:47 -06:00
Fixes form rendering when scheduling_enabled is disabled (#13123)
* fixes form rendering when scheduling_enabled is disabled #13096 * Remove requires_input property from BaseScript; render form consistently --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
committed by
GitHub
parent
bc7678c716
commit
cab7b76220
@@ -15,9 +15,9 @@
|
||||
<form action="" method="post" enctype="multipart/form-data" class="form form-object-edit">
|
||||
{% csrf_token %}
|
||||
<div class="field-group my-4">
|
||||
{% if form.requires_input %}
|
||||
{# Render grouped fields according to declared fieldsets #}
|
||||
{% for group, fields in script.get_fieldsets %}
|
||||
{# Render grouped fields according to declared fieldsets #}
|
||||
{% for group, fields in script.get_fieldsets %}
|
||||
{% if fields %}
|
||||
<div class="field-group mb-5">
|
||||
<div class="row mb-2">
|
||||
<h5 class="offset-sm-3">{{ group }}</h5>
|
||||
@@ -28,14 +28,8 @@
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div class="alert alert-info">
|
||||
<i class="mdi mdi-information"></i>
|
||||
This script does not require any input to run.
|
||||
</div>
|
||||
{% render_form form %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="float-end">
|
||||
<a href="{% url 'extras:script_list' %}" class="btn btn-outline-danger">Cancel</a>
|
||||
|
||||
Reference in New Issue
Block a user