{% extends "base.html" %}

{% block title %}Add New ITAT Record{% endblock %}

{% block extra_css %}
<!-- Child page CSS -->
<link rel="stylesheet" href="{{ url_for('static', filename='css/add_itat.css') }}">
{% endblock %}

{% block content %}
<div class="container">

    <h2 style="text-align:center;">New Income Tax Appellate Tribunal Form</h2>

    <form id="itat" method="POST" onsubmit="return showSuccessMessage()">

        <label>Year:</label>
        <select id="year" name="year" required></select>
        <div id="yearError" style="color:red; display:none; margin-bottom:10px;"></div>

        <label>MAT Tax Credit:</label>
        <input type="number" name="mat_tax_credit" step="0.01" required />

        <label>Surcharge:</label>
        <input type="number" name="surcharge" step="0.01" required />

        <label>Cess:</label>
        <input type="number" name="cess" step="0.01" required />

        <label>Total Credit:</label>
        <input type="number" name="total_credit" step="0.01" required />

        <button type="submit">Submit</button>
    </form>
</div>
{% endblock %}

{% block extra_js %}
<script src="{{ url_for('static', filename='js/toggle.js') }}"></script>
<script src="{{ url_for('static', filename='js/cit_calc.js') }}"></script>
<script src="{{ url_for('static', filename='js/year_dropdown.js') }}"></script>
{% endblock %}

<script>
    function showSuccessMessage() {
        alert("Form submitted successfully!");
        return true;
    }
</script>