1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-11 04:36:48 +00:00

refactor(templates): the last inline styles that Bootstrap covers

- The VM list's power forms (style="display:inline") are d-inline.
- The fields scripts show and hide are d-none, and the scripts add and
  remove that class instead of calling jQuery's show() and hide(),
  which could not undo it: the custom memory boxes of the Resize tab,
  the ISO upload's error message and the clone dialog's metadata row.
- The please-wait dialog's full bar is w-100.
- The create-VM pages' own 56rem width (.create-vm) goes: pages stop
  at 960px now, about the same.
- static/css/font-awesome.min.css goes: no page loaded it, no element
  used its classes and its fonts were never in the repository.
This commit is contained in:
catborise 2026-10-27 20:16:49 +03:00
parent 1cb1f8ac6a
commit 3a4554bcbf
9 changed files with 18 additions and 27 deletions

View file

@ -9,12 +9,12 @@
{% bs_icon 'copy' %}
</a>
{% elif "poweron" in actions %}
<form action="{% url 'instances:poweron' instance.id %}" method="post" style="display:inline;" onsubmit="showPleaseWaitDialog()">
<form action="{% url 'instances:poweron' instance.id %}" method="post" class="d-inline" onsubmit="showPleaseWaitDialog()">
{% csrf_token %}
<button type="submit" class="btn btn-sm btn-secondary" title="{% trans "Power On" %}">{% bs_icon 'play-fill' %}</button>
</form>
{% elif "resume" in actions %}
<form action="{% url 'instances:resume' instance.id %}" method="post" style="display:inline;">
<form action="{% url 'instances:resume' instance.id %}" method="post" class="d-inline">
{% csrf_token %}
<button type="submit" class="btn btn-sm btn-secondary" title="{% trans "Resume" %}">{% bs_icon 'play-fill' %}</button>
</form>
@ -23,7 +23,7 @@
{% endif %}
{% if "suspend" in actions %}
<form action="{% url 'instances:suspend' instance.id %}" method="post" style="display:inline;">
<form action="{% url 'instances:suspend' instance.id %}" method="post" class="d-inline">
{% csrf_token %}
<button type="submit" class="btn btn-sm btn-secondary" title="{% trans "Suspend" %}">{% bs_icon 'pause-fill' %}</button>
</form>
@ -32,12 +32,12 @@
{% endif %}
{% if "poweroff" in actions %}
<form action="{% url 'instances:poweroff' instance.id %}" method="post" style="display:inline;">
<form action="{% url 'instances:poweroff' instance.id %}" method="post" class="d-inline">
{% csrf_token %}
<button type="submit" class="btn btn-sm btn-secondary" title="{% trans "Power Off" %}">{% bs_icon 'power' %}</button>
</form>
{% elif "force_off" in actions %}
<form action="{% url 'instances:force_off' instance.id %}" method="post" style="display:inline;">
<form action="{% url 'instances:force_off' instance.id %}" method="post" class="d-inline">
{% csrf_token %}
<button type="submit" class="btn btn-sm btn-secondary" title="{% trans "Force Off" %}"
data-confirm="{% blocktrans with name=instance.name %}Force off {{ name }}? It stops at once, as after a power cut; what the guest has not written to disk is lost.{% endblocktrans %}"
@ -48,7 +48,7 @@
{% endif %}
{% if "powercycle" in actions %}
<form action="{% url 'instances:powercycle' instance.id %}" method="post" style="display:inline;">
<form action="{% url 'instances:powercycle' instance.id %}" method="post" class="d-inline">
{% csrf_token %}
<button type="submit" class="btn btn-sm btn-secondary" title="{% trans "Power Cycle" %}"
data-confirm="{% blocktrans with name=instance.name %}Power cycle {{ name }}? It stops at once, as after a power cut, and starts again; what the guest has not written to disk is lost.{% endblocktrans %}"