DomainExpiration/app/templates/edit_remote.html

49 lines
1.8 KiB
HTML

{% extends "base.html" %}
{% block title %}Edit Remote{% endblock %}
{% block content %}
<div class="container">
<h1>Edit Remote</h1>
<form method="post">
{% set category = remote.remote_category.name %}
{% if category in ['RDP', 'MGMT'] %}
<div class="form-group">
<label for="remote_name">Name:</label>
<input type="text" name="remote_name" class="form-control" value="{{ remote.name }}">
</div>
{% endif %}
{% if category in ['RDP', 'SSL-VPN', 'VPN'] %}
<div class="form-group">
<label for="ip_address">IP Address:</label>
<input type="text" name="ip_address" class="form-control" value="{{ remote.ip_address }}">
</div>
{% endif %}
{% if category in ['RDP', 'SSL-VPN'] %}
<div class="form-group">
<label for="port">Port:</label>
<input type="text" name="port" class="form-control" value="{{ remote.port }}">
</div>
{% endif %}
{% if category == 'VPN' %}
<div class="form-group">
<label for="psk">PSK:</label>
<input type="text" name="psk" class="form-control" value="{{ remote.psk }}">
</div>
{% endif %}
{% if category == 'MGMT' %}
<div class="form-group">
<label for="address">Address (URL):</label>
<input type="text" name="address" class="form-control" value="{{ remote.address }}">
</div>
{% endif %}
{% if category not in ['RDP', 'SSL-VPN', 'VPN', 'MGMT'] %}
<div class="form-group">
<label for="details">Details:</label>
<input type="text" name="details" class="form-control" value="{{ remote.details }}">
</div>
{% endif %}
<button type="submit" class="btn btn-success">Save Changes</button>
<a href="{{ url_for('clients.client_detail', client_id=client_id) }}" class="btn btn-secondary">Cancel</a>
</form>
</div>
{% endblock %}