2018-11-28 21:36:17 +00:00
|
|
|
{% extends "base.html" %}
|
2019-02-13 19:10:36 +00:00
|
|
|
{% load manager %}
|
2018-11-28 21:36:17 +00:00
|
|
|
{% block content %}
|
|
|
|
|
|
|
|
<form action="#" method="post">
|
|
|
|
{% csrf_token %}
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="serial">Serial Number</label>
|
|
|
|
<input type="text" class="form-control" required id="serial" name="serial" placeholder="Serial Number"></input>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="name">Device Name</label>
|
|
|
|
<input type="text" class="form-control" name="name" id="name" placeholder="Enter Device Name (Optional)"></input>
|
|
|
|
</div>
|
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" placeholder="MAC Address"></input>
|
|
|
|
</div>
|
2019-03-08 15:16:37 +00:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="ssid">Broadcast SSID</label>
|
|
|
|
<input type="text" class="form-control" name="ssid" id="ssid" 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" value="exp360wifi" placeholder="WPA2 key if using encryption"></input>
|
|
|
|
</div>
|
2018-11-28 21:36:17 +00:00
|
|
|
<div class="form-group">
|
|
|
|
<label for="organization">Organization</label>
|
2019-02-01 15:29:34 +00:00
|
|
|
<select required class="custom-select mr-sm-2" id="organization" name="organization">
|
2019-02-13 19:10:36 +00:00
|
|
|
{% userOrgas as orgas %}
|
|
|
|
{% for choice in orgas %}
|
2019-03-08 15:39:13 +00:00
|
|
|
<option {% if user.userstatus.orga == choice %}selected{% endif %} value="{{ choice.id }}">{{ choice.name }}</option>
|
2018-11-28 21:36:17 +00:00
|
|
|
{% endfor %}
|
|
|
|
</select>
|
2018-12-15 11:35:00 +00:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="model">Model</label>
|
2019-02-01 15:29:34 +00:00
|
|
|
<select required class="custom-select mr-sm-2" id="model" name="model">
|
2018-12-15 11:35:00 +00:00
|
|
|
{% for choice in models %}
|
|
|
|
<option value="{{ choice.id }}">{{ choice.name }}</option>
|
|
|
|
{% endfor %}
|
|
|
|
</select>
|
2018-11-28 21:36:17 +00:00
|
|
|
</div>
|
|
|
|
<button type="submit" class="btn btn-success">Create Device</button>
|
2019-02-02 10:31:30 +00:00
|
|
|
<a class="btn btn-danger" href="/devices/" role="button">Cancel</a>
|
2018-11-28 21:36:17 +00:00
|
|
|
</form>
|
|
|
|
|
|
|
|
{% endblock %}
|