refactor web interface
This commit is contained in:
@ -1,16 +1,35 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}{% if file %}Edytuj Hosts File{% else %}Nowy Hosts File{% endif %} - /etc/hosts Manager{% endblock %}
|
||||
{% block content %}
|
||||
<h2>{% if file %}Edytuj Hosts File{% else %}Nowy Hosts File{% endif %}</h2>
|
||||
<form method="post">
|
||||
<div class="form-group">
|
||||
<label for="title">Tytuł</label>
|
||||
<input type="text" class="form-control" id="title" name="title" value="{% if file %}{{ file.title }}{% endif %}" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="content">Treść</label>
|
||||
<textarea class="form-control" id="content" name="content" rows="10" required>{% if file %}{{ file.content }}{% endif %}</textarea>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">{% if file %}Zapisz zmiany{% else %}Utwórz{% endif %}</button>
|
||||
</form>
|
||||
{% block extra_css %}
|
||||
{{ super() }}
|
||||
<style>
|
||||
.tooltip-inner {
|
||||
max-width: 300px;
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<h2>{% if file %}Edytuj Hosts File{% else %}Nowy Hosts File{% endif %}</h2>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form method="POST">
|
||||
<div class="mb-3">
|
||||
<label for="title" class="form-label">Tytuł</label>
|
||||
<input type="text" class="form-control" id="title" name="title" value="{% if file %}{{ file.title }}{% endif %}" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="content" class="form-label">Treść</label>
|
||||
<textarea class="form-control" id="content" name="content" rows="10" required>{% if file %}{{ file.content }}{% endif %}</textarea>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">{% if file %}Zapisz zmiany{% else %}Utwórz{% endif %}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-3 text-center">
|
||||
<a href="{{ url_for('list_hosts_files') }}" class="btn btn-secondary">Lista Hosts Files</a>
|
||||
<a href="{{ url_for('dashboard') }}" class="btn btn-secondary">Przejdź do pulpitu</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user