mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
replace deprecated ifequal/ifnotequal with if
This commit is contained in:
parent
e46bb99b3b
commit
6a0d04d300
14 changed files with 74 additions and 74 deletions
|
@ -48,22 +48,22 @@
|
|||
<dt class="col-6">{% trans "State" %}</dt>
|
||||
<dd class="col-6">
|
||||
<form action="" method="post" role="form" aria-label="Network start/stop/delete form">{% csrf_token %}
|
||||
{% ifequal state 0 %}
|
||||
{% if state == 0 %}
|
||||
<input type="submit" class="btn btn-sm btn-success" name="start" value="{% trans "Start" %}">
|
||||
<input type="submit" class="btn btn-sm btn-danger" name="delete" value="{% trans "Delete" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
|
||||
{% else %}
|
||||
<input type="submit" class="btn btn-sm btn-secondary" name="stop" value="{% trans "Stop" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
|
||||
{% endifequal %}
|
||||
{% endif %}
|
||||
</form>
|
||||
</dd>
|
||||
<dt class="col-6">{% trans "Autostart" %}</dt>
|
||||
<dd class="col-6">
|
||||
<form action="" method="post" role="form" aria-label="Network enable/disable autostart form">{% csrf_token %}
|
||||
{% ifequal autostart 0 %}
|
||||
{% if autostart == 0 %}
|
||||
<input type="submit" class="btn btn-sm btn-success" name="set_autostart" value="{% trans "Enable" %}">
|
||||
{% else %}
|
||||
<input type="submit" class="btn btn-sm btn-secondary" name="unset_autostart" onclick="return confirm('{% trans "Are you sure?" %}')" value="{% trans "Disable" %}">
|
||||
{% endifequal %}
|
||||
{% endif %}
|
||||
</form>
|
||||
</dd>
|
||||
</dl>
|
||||
|
@ -94,15 +94,15 @@
|
|||
<dl class="ml-3 row">
|
||||
<dt class="col-6">{% trans "IPv4 Forwarding" %}</dt>
|
||||
<dd class="col-6">
|
||||
{% ifequal net_forward.0 'nat' %}
|
||||
{% if net_forward.0 == 'nat' %}
|
||||
{% trans "NAT" %}
|
||||
{% endifequal %}
|
||||
{% ifequal net_forward.0 'route' %}
|
||||
{% endif %}
|
||||
{% if net_forward.0 == 'route' %}
|
||||
{% trans "ROUTE" %}
|
||||
{% endifequal %}
|
||||
{% ifequal net_forward.0 'bridge' %}
|
||||
{% endif %}
|
||||
{% if net_forward.0 == 'bridge' %}
|
||||
{% trans "BRIDGE" %}
|
||||
{% endifequal %}
|
||||
{% endif %}
|
||||
{% if not net_forward.0 %}
|
||||
{% trans "ISOLATE" %}
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue