74 lines
4.0 KiB
HTML
74 lines
4.0 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}{% if application %}Anwendung bearbeiten{% else %}Neue Anwendung{% endif %} - mGuard VPN{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="row justify-content-center">
|
|
<div class="col-md-6">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h4 class="mb-0">
|
|
<i class="bi bi-app-indicator"></i>
|
|
{% if application %}Anwendung bearbeiten{% else %}Neue Anwendung{% endif %}
|
|
</h4>
|
|
</div>
|
|
<div class="card-body">
|
|
<form method="post" action="{% if application %}/applications/{{ application.id }}/edit{% else %}/applications/new{% endif %}">
|
|
<div class="mb-3">
|
|
<label for="name" class="form-label">Name *</label>
|
|
<input type="text" class="form-control" id="name" name="name"
|
|
value="{{ application.name if application else '' }}" required
|
|
placeholder="z.B. CoDeSys Runtime">
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-6 mb-3">
|
|
<label for="default_port" class="form-label">Standard-Port *</label>
|
|
<input type="number" class="form-control" id="default_port" name="default_port"
|
|
value="{{ application.default_port if application else '' }}" required
|
|
min="1" max="65535" placeholder="11740">
|
|
</div>
|
|
<div class="col-6 mb-3">
|
|
<label for="protocol" class="form-label">Protokoll</label>
|
|
<select class="form-select" id="protocol" name="protocol">
|
|
<option value="tcp" {% if not application or application.protocol.value == 'tcp' %}selected{% endif %}>TCP</option>
|
|
<option value="udp" {% if application and application.protocol.value == 'udp' %}selected{% endif %}>UDP</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<label for="description" class="form-label">Beschreibung</label>
|
|
<input type="text" class="form-control" id="description" name="description"
|
|
value="{{ application.description if application and application.description else '' }}"
|
|
placeholder="z.B. CoDeSys Runtime/Gateway Service">
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<label for="icon" class="form-label">Icon (Bootstrap Icon Name)</label>
|
|
<div class="input-group">
|
|
<span class="input-group-text"><i class="bi bi-{{ application.icon if application and application.icon else 'app' }}"></i></span>
|
|
<input type="text" class="form-control" id="icon" name="icon"
|
|
value="{{ application.icon if application and application.icon else '' }}"
|
|
placeholder="z.B. hdd-network, terminal, globe">
|
|
</div>
|
|
<div class="form-text">
|
|
<a href="https://icons.getbootstrap.com/" target="_blank">Bootstrap Icons</a> - nur den Namen ohne "bi-"
|
|
</div>
|
|
</div>
|
|
|
|
<div class="d-flex justify-content-between">
|
|
<a href="/applications" class="btn btn-secondary">
|
|
<i class="bi bi-arrow-left"></i> Abbrechen
|
|
</a>
|
|
<button type="submit" class="btn btn-primary">
|
|
<i class="bi bi-check-lg"></i> Speichern
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|