haproxy-wi/app/templates/ajax/new_telegram.html

33 lines
1.3 KiB
HTML

{% for telegram in telegrams %}
<tr style="width: 50%;" id="telegram-table-{{telegram.id}}" class="newgroup">
<td class="padding10 first-collumn">
<input type="text" id="telegram-token-{{telegram.id}}" class="form-control" value="{{telegram.token}}" size="30">
<input type="hidden" id="telegramgroup-{{telegram.id}}" name="telegramgroup-{{telegram.id}}">
</td>
<td>
<input type="text" id="telegram-chanel-{{telegram.id}}" class="form-control" value="{{telegram.chanel_name}}" size="30">
</td>
{% if page != "servers.py" %}
<td>
<select id="sshgroup-{{telegram.id}}" name="sshgroup-{{telegram.id}}">
{% for group in groups %}
{% if telegram.groups == group.group_id %}
<option value="{{ group.group_id }}" selected>{{ group.name }}</option>
{% else %}
<option value="{{ group.group_id }}">{{ group.name }}</option>
{% endif %}
{% endfor %}
</select>
</td>
{% endif %}
<td>
<button title="Send a test message" onclick="checkTelegram({{telegram.id}})">Test</button>
</td>
<td>
<a class="add" onclick="cloneTelegram({{telegram.id}})" id="clone-{{telegram.id}}" title="Clone {{telegram.chanel_name}}" style="cursor: pointer;"></a>
</td>
<td>
<a class="delete" onclick="confirmDeleteTelegram({{telegram.id}})" style="cursor: pointer;"></a>
</td>
</tr>
{% endfor %}