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 >
2018-12-15 12:01:10 +00:00
{% 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 %}
2018-12-15 11:35:00 +00:00
{% 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 >
2018-12-15 12:01:10 +00:00
{% endif %}
{% if user.is_staff %}
2018-12-15 11:35:00 +00:00
< 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 %}
2019-03-15 18:06:05 +00:00
< div class = "form-group" >
< label for = "mac" > Device MAC< / label >
< input type = "text" class = "form-control" name = "mac" id = "mac" disabled = "disabled" value = "{{ device.mac }}" > < / input >
< / div >
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 >
2019-03-08 15:16:37 +00:00
{% if user.is_staff %}
< div class = "form-group" >
< label for = "ssid" > Broadcast SSID< / label >
< input type = "text" class = "form-control" name = "ssid" id = "ssid" { % if device . ssid % } value = "{{ device.ssid }}" { % endif % } placeholder = "SSID to send, if different from Serial" > < / input >
< / div >
< div class = "form-group" >
< label for = "key" > WPA2 Key< / label >
< input type = "text" class = "form-control" name = "key" id = "key" { % if device . key % } value = "{{ device.key }}" { % endif % } placeholder = "WPA2 key if using encryption" > < / input >
< / div >
{% endif %}
2018-11-26 07:23:33 +00:00
< 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 >
2019-01-09 16:08:39 +00:00
{% 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 >
2019-02-02 10:31:30 +00:00
< a class = "btn btn-danger" href = "/devices/" role = "button" > Cancel< / a >
2018-11-26 07:23:33 +00:00
< / form >
{% endblock %}