49 lines
2.0 KiB
HTML
49 lines
2.0 KiB
HTML
|
|
{% extends "base.html" %}
|
||
|
|
{% block title %}Brojevi/SIM — Gogo Admin{% endblock %}
|
||
|
|
{% block nav %}{% include "admin/_nav.html" %}{% endblock %}
|
||
|
|
{% block content %}
|
||
|
|
<h1>Brojevi i SIM kartice (GSM gateway)</h1>
|
||
|
|
<div class="card">
|
||
|
|
<table>
|
||
|
|
<tr><th>Broj</th><th>Gateway port</th><th>Operater</th><th>SIM status</th><th>Salon</th><th></th></tr>
|
||
|
|
{% for row in rows %}
|
||
|
|
<tr>
|
||
|
|
<form method="post" action="/admin/numbers/{{ row.n.id }}">
|
||
|
|
<td><code>{{ row.n.msisdn }}</code></td>
|
||
|
|
<td style="width:110px"><input type="number" name="gateway_port" value="{{ row.n.gateway_port if row.n.gateway_port is not none }}"></td>
|
||
|
|
<td style="width:140px">
|
||
|
|
<select name="operator">
|
||
|
|
<option value="">?</option>
|
||
|
|
{% for op, label in operators.items() %}
|
||
|
|
<option value="{{ op }}" {{ 'selected' if row.n.operator==op }}>{{ label }}</option>
|
||
|
|
{% endfor %}
|
||
|
|
</select>
|
||
|
|
</td>
|
||
|
|
<td style="width:140px">
|
||
|
|
<select name="sim_status">
|
||
|
|
{% for s in ['unassigned','active','blocked','testing'] %}
|
||
|
|
<option value="{{ s }}" {{ 'selected' if row.n.sim_status==s }}>{{ s }}</option>
|
||
|
|
{% endfor %}
|
||
|
|
</select>
|
||
|
|
</td>
|
||
|
|
<td>{{ row.tenant_name or '—' }}</td>
|
||
|
|
<td style="white-space:nowrap"><button class="small">Sačuvaj</button></form>
|
||
|
|
<form method="post" action="/admin/numbers/{{ row.n.id }}/delete" style="display:inline"
|
||
|
|
onsubmit="return confirm('Obrisati broj?')"><button class="small red">Obriši</button></form></td>
|
||
|
|
</tr>
|
||
|
|
{% endfor %}
|
||
|
|
<tr>
|
||
|
|
<form method="post" action="/admin/numbers">
|
||
|
|
<td><input type="text" name="msisdn" placeholder="+38765XXXXXX" required></td>
|
||
|
|
<td><input type="number" name="gateway_port" placeholder="1"></td>
|
||
|
|
<td><select name="operator"><option value="">?</option>
|
||
|
|
{% for op, label in operators.items() %}<option value="{{ op }}">{{ label }}</option>{% endfor %}
|
||
|
|
</select></td>
|
||
|
|
<td></td><td></td>
|
||
|
|
<td><button class="small green">Dodaj</button></td>
|
||
|
|
</form>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
{% endblock %}
|