{% extends 'list-crud.html' %}
{% load static %}

{% block filter %}
<form id="filterForm" method="get" style="display: inline;">
    <input type="hidden" name="filter" id="filterInput" value="{{ request.GET.filter|default:'active' }}">
    <button type="button" class="btn btn-primary" id="activeBtn">Active</button>
    <button type="button" class="btn btn-primary" id="allBtn">All</button>
</form>
{% endblock filter %}

{% block table_header %}
        <th style="display: none;">Select</th>
        <th>Company</th>
        <th>Line name</th>
        <th>Short name</th>
        <th>Description</th>
{% endblock table_header %}

{% block table_data %}
    <td>{{ object.company }}</td>
    <td>{{ object.name }}</td>
    <td>{{ object.short_name }}</td>
    <td>{{ object.description }}</td>
{% endblock %}

{% block buttons %}
{#    <a href="{% url 'employee_line_create' %}" class="btn btn-primary">Create line</a>#}
{#    <a href="#" id="editBtn" data-url="{% url 'employee_line_update' pk=0 %}" class="btn btn-primary" disabled>Edit Preinfo</a>#}
{#    <button id="deleteButton" class="btn btn-danger">Delete Preinfo</button>#}
    
    <button class="btn btn-primary" type="button" onclick="window.location.href='{% url 'employee_line_create' %}'">Create line</button>
    <button class="btn btn-primary" type="button" id="editBtn" data-url="{% url 'employee_line_update' pk=0 %}" data-requires-selection disabled>Edit line</button>
    <button class="btn btn-primary" type="button" id="deleteBtn" data-url="{% url 'employee_line_active' pk=0 %}" data-requires-selection disabled>Delete line</button>           
    
{% endblock buttons %}

{% block create_modal_header %}
    <h2>Create line</h2>
{% endblock %}

{% block modal_header %}
    <h2>edit line</h2>
{% endblock modal_header %}
