94 lines
3.8 KiB
HTML
94 lines
3.8 KiB
HTML
{% extends 'base.html' %}
|
|
|
|
{% block title %}{% if object %}Редактиране{% else %}Добавяне{% endif %} на Ключова Дума{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="form-container">
|
|
<h2>{% if object %}Редактиране{% else %}Добавяне{% endif %} на Ключова Дума</h2>
|
|
|
|
<form method="post">
|
|
{% csrf_token %}
|
|
|
|
<div class="form-group">
|
|
<label for="{{ form.name.id_for_label }}">Име *</label>
|
|
{{ form.name }}
|
|
{% if form.name.errors %}
|
|
<div class="error-message">{{ form.name.errors }}</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="{{ form.keyword.id_for_label }}">Ключова Дума/Патърн *</label>
|
|
{{ form.keyword }}
|
|
{% if form.keyword.errors %}
|
|
<div class="error-message">{{ form.keyword.errors }}</div>
|
|
{% endif %}
|
|
<small class="form-text">Текст, фраза или regex патърн за търсене</small>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="{{ form.description.id_for_label }}">Описание</label>
|
|
{{ form.description }}
|
|
{% if form.description.errors %}
|
|
<div class="error-message">{{ form.description.errors }}</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<div class="form-group">
|
|
<label for="{{ form.keyword_type.id_for_label }}">Тип *</label>
|
|
{{ form.keyword_type }}
|
|
{% if form.keyword_type.errors %}
|
|
<div class="error-message">{{ form.keyword_type.errors }}</div>
|
|
{% endif %}
|
|
<small class="form-text">exact, regex, phrase, domain, email, phone</small>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="{{ form.confidence_score.id_for_label }}">Увереност (0-100) *</label>
|
|
{{ form.confidence_score }}
|
|
{% if form.confidence_score.errors %}
|
|
<div class="error-message">{{ form.confidence_score.errors }}</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<div class="form-group">
|
|
<label for="{{ form.is_active.id_for_label }}">
|
|
{{ form.is_active }} Активна
|
|
</label>
|
|
{% if form.is_active.errors %}
|
|
<div class="error-message">{{ form.is_active.errors }}</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="{{ form.case_sensitive.id_for_label }}">
|
|
{{ form.case_sensitive }} Case Sensitive
|
|
</label>
|
|
{% if form.case_sensitive.errors %}
|
|
<div class="error-message">{{ form.case_sensitive.errors }}</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="{{ form.auto_approve.id_for_label }}">
|
|
{{ form.auto_approve }} Auto Approve
|
|
</label>
|
|
{% if form.auto_approve.errors %}
|
|
<div class="error-message">{{ form.auto_approve.errors }}</div>
|
|
{% endif %}
|
|
<small class="form-text">Автоматично одобряване при увереност ≥ 80%</small>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-actions">
|
|
<button type="submit" class="btn btn-primary">Запази</button>
|
|
<a href="{% url 'osint:admin_dashboard' %}" class="btn btn-secondary">Отказ</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
{% endblock %}
|
|
|