mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 01:41:22 -06:00
* Fixes #18965: Script list run buttons respect scripts' commit_default * Cleanup script .Meta access in template
This commit is contained in:
parent
7d80a45bf8
commit
e1e514251e
@ -63,7 +63,7 @@
|
|||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td>{{ script.python_class.Meta.description|markdown|placeholder }}</td>
|
<td>{{ script.python_class.description|markdown|placeholder }}</td>
|
||||||
{% if last_job %}
|
{% if last_job %}
|
||||||
<td>
|
<td>
|
||||||
<a href="{% url 'extras:script_result' job_pk=last_job.pk %}">{{ last_job.created|isodatetime }}</a>
|
<a href="{% url 'extras:script_result' job_pk=last_job.pk %}">{{ last_job.created|isodatetime }}</a>
|
||||||
@ -79,6 +79,9 @@
|
|||||||
{% if request.user|can_run:script and script.is_executable %}
|
{% if request.user|can_run:script and script.is_executable %}
|
||||||
<div class="float-end d-print-none">
|
<div class="float-end d-print-none">
|
||||||
<form action="{% url 'extras:script' script.pk %}" method="post">
|
<form action="{% url 'extras:script' script.pk %}" method="post">
|
||||||
|
{% if script.python_class.commit_default %}
|
||||||
|
<input type="checkbox" name="_commit" hidden checked>
|
||||||
|
{% endif %}
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<button type="submit" name="_run" class="btn btn-primary btn-sm">
|
<button type="submit" name="_run" class="btn btn-primary btn-sm">
|
||||||
{% if last_job %}
|
{% if last_job %}
|
||||||
|
Loading…
Reference in New Issue
Block a user