vpnmanager/templates/manager/edit.html

69 lines
2.9 KiB
HTML
Raw Normal View History

2018-11-26 07:23:33 +00:00
{% extends "base.html" %}
{% block content %}
<form action="#" method="post">
{% csrf_token %}
<div class="form-group">
<label for="serial">Serial Number</label>
<input type="text" class="form-control" id="serial" disabled="disabled" value="{{ device.serial }}"></input>
</div>
{% if user.is_staff %}
<div class="form-group">
<label for="model">Device Model</label>
<input type="text" class="form-control" id="model" disabled="disabled" value="{{ device.model }}"></input>
</div>
{% endif %}
{% if user.is_superuser %}
<div class="form-group">
<label for="secret">Device Secret</label>
<input type="text" class="form-control" id="secret" disabled="disabled" value="{{ device.secret }}"></input>
2019-01-05 15:08:19 +00:00
</div>
{% endif %}
{% if user.is_staff %}
<div class="form-group">
<label for="password">Root Password</label>
<input type="text" class="form-control" id="password" disabled="disabled" value="{{ device.password }}"></input>
</div>
{% endif %}
2018-11-26 07:23:33 +00:00
<div class="form-group">
<label for="name">Device Name</label>
2018-12-26 01:24:36 +00:00
<input type="text" class="form-control" name="name" id="name" placeholder="Enter Device Name (Optional)" {% if device.name %} value="{{ device.name }}" {% endif %}></input>
2018-11-26 07:23:33 +00:00
</div>
<div class="form-group">
<label for="subnet">Assigned Network</label>
<select class="custom-select mr-sm-2" id="subnet" name="subnet">
{% for choice in subnets %}
2019-01-05 15:08:19 +00:00
<option {% if choice.intip == device.network.intip %} selected {% endif %} value="{{ choice.intip }}">{{ choice.intip}}{% if choice.name %} ({{ choice.name }}){% endif %}</option>
2018-11-26 07:23:33 +00:00
{% endfor %}
</select>
2018-11-28 15:38:35 +00:00
<small id="subnetHelp" class="form-text text-muted">A network change will require a reboot of the device to be applied.</small>
</div>
{% if device.model.wwan %}
<div class="form-group">
<label for="wifi">Assigned WiFis</label>
<select multiple class="custom-select mr-sm-2" id="wifi" name="wifi">
{% for choice in wifis %}
<option {% if choice in curfis %} selected {% endif %} value="{{ choice.id }}">{{ choice }}</option>
{% endfor %}
</select>
<small id="subnetHelp" class="form-text text-muted">This feature is not yet available on all devices.</small>
</div>
{% endif %}
2018-12-28 09:43:57 +00:00
2018-11-28 15:38:35 +00:00
<div class="form-group form-check">
<input class="form-check-input" type="checkbox" value="True" {% if device.reboot %} checked {% endif %} id="reboot" name="reboot">
<label class="form-check-label" for="reboot">Reboot device immediately </label>
2018-11-26 07:23:33 +00:00
</div>
2018-12-26 01:24:36 +00:00
{% if user.is_staff %}
<div class="form-group form-check">
<input class="form-check-input" type="checkbox" value="True" {% if device.update %} checked {% endif %} id="update" name="update">
<label class="form-check-label" for="update">Install Firmware Update</label>
</div>
{% endif %}
2018-11-26 19:55:09 +00:00
<button type="submit" class="btn btn-success">Apply Changes</button>
<a class="btn btn-danger" href="/" role="button">Cancel</a>
2018-11-26 07:23:33 +00:00
</form>
{% endblock %}