88 Zeilen
5.0 KiB
HTML
88 Zeilen
5.0 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Lizenz bearbeiten{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="container py-5">
|
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
|
<h2>Lizenz bearbeiten</h2>
|
|
<div>
|
|
<a href="{{ url_for('customers.customers_licenses', show_fake=request.args.get('show_fake')) }}" class="btn btn-secondary">📋 Zurück zur Übersicht</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<form method="post" action="{{ url_for('licenses.edit_license', license_id=license.id) }}" accept-charset="UTF-8">
|
|
{% if request.args.get('show_fake') == 'true' %}
|
|
<input type="hidden" name="show_fake" value="true">
|
|
{% endif %}
|
|
<div class="row g-3">
|
|
<div class="col-md-6">
|
|
<label class="form-label">Kunde</label>
|
|
<input type="text" class="form-control" value="{{ license.customer_name }}" disabled>
|
|
<small class="text-muted">Kunde kann nicht geändert werden</small>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label class="form-label">E-Mail</label>
|
|
<input type="email" class="form-control" value="-" disabled>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label for="licenseKey" class="form-label">Lizenzschlüssel</label>
|
|
<input type="text" class="form-control" id="licenseKey" name="license_key" value="{{ license.license_key }}" required>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label for="licenseType" class="form-label">Lizenztyp</label>
|
|
<select class="form-select" id="licenseType" name="license_type" required>
|
|
<option value="full" {% if license.license_type == 'full' %}selected{% endif %}>Vollversion</option>
|
|
<option value="test" {% if license.license_type == 'test' %}selected{% endif %}>Testversion</option>
|
|
</select>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<label for="validFrom" class="form-label">Gültig von</label>
|
|
<input type="date" class="form-control" id="validFrom" name="valid_from" value="{{ license.valid_from.strftime('%Y-%m-%d') }}" required>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<label for="validUntil" class="form-label">Gültig bis</label>
|
|
<input type="date" class="form-control" id="validUntil" name="valid_until" value="{{ license.valid_until.strftime('%Y-%m-%d') }}" required>
|
|
</div>
|
|
<div class="col-md-4 d-flex align-items-end">
|
|
<div class="form-check">
|
|
<input class="form-check-input" type="checkbox" id="isActive" name="is_active" {% if license.is_active %}checked{% endif %}>
|
|
<label class="form-check-label" for="isActive">
|
|
Lizenz ist aktiv
|
|
</label>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label for="deviceLimit" class="form-label">Gerätelimit</label>
|
|
<select class="form-select" id="deviceLimit" name="device_limit" required>
|
|
{% for i in range(1, 11) %}
|
|
<option value="{{ i }}" {% if license.get('device_limit', 3) == i %}selected{% endif %}>{{ i }} {% if i == 1 %}Gerät{% else %}Geräte{% endif %}</option>
|
|
{% endfor %}
|
|
</select>
|
|
<small class="form-text text-muted">Maximale Anzahl gleichzeitig aktiver Geräte</small>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="alert {% if license.is_fake %}alert-warning{% else %}alert-success{% endif %} mt-3" role="alert">
|
|
<i class="fas fa-info-circle"></i>
|
|
<strong>Status:</strong>
|
|
{% if license.is_fake %}
|
|
TEST-Lizenz (wird von der Software ignoriert)
|
|
{% else %}
|
|
PRODUKTIV-Lizenz
|
|
{% endif %}
|
|
<br>
|
|
<small class="text-muted">Der Status wird vom Kunden geerbt und kann nicht direkt geändert werden.</small>
|
|
</div>
|
|
|
|
<div class="mt-4">
|
|
<button type="submit" class="btn btn-primary">💾 Änderungen speichern</button>
|
|
<a href="{{ url_for('customers.customers_licenses', show_fake=request.args.get('show_fake')) }}" class="btn btn-secondary">Abbrechen</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %} |