{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Employee Onboarding - {{white_label_company_name}} Dashboard</title>
    <link rel="apple-touch-icon" sizes="180x180" href="{% if white_label_company.icon %}{{white_label_company.icon.url}} {% else %}{% static 'favicons/apple-touch-icon.png' %}{% endif %}">
    <link rel="icon" type="image/png" sizes="32x32" href="{% if white_label_company.icon %}{{white_label_company.icon.url}} {% else %}{% static 'favicons/favicon-32x32.png' %}{% endif %}">
    <link rel="icon" type="image/png" sizes="16x16" href="{% if white_label_company.icon %}{{white_label_company.icon.url}} {% else %}{% static 'favicons/favicon-16x16.png' %}{% endif %}">
    <link rel="stylesheet" href="{% static 'build/css/style.min.css' %}" />
</head>

<body>
    {% if form.errors %}
    <!-- form errors  -->
    <div class="oh-wrapper">
      <div class="oh-alert-container">

        {% for error in form.non_field_errors %}
        <div class="oh-alert oh-alert--animated oh-alert--danger">
          {{ error }}
        </div>
        {% endfor %}
      </div>
    </div>
    {% endif %}

    {% if messages %}
    <div class="oh-wrapper">
        {% for message in messages %}
        <div class="oh-alert-container">
            <div class="oh-alert oh-alert--animated {{message.tags}}">
                {{ message }}
            </div>
        </div>
        {% endfor %}
    </div>
    {% endif %}

    <div id="main">
        <main class="oh-onboarding">
            <div class="oh-onboarding-card">
                <div class="oh-onboarding-card__header">
                    <span class="oh-onboarding-card__company-name">Acme, Inc.</span>
                    <ul class="oh-onboarding-card__steps">
                        <li class="oh-onboarding-card__step">
                            <div class="oh-onboarding-card__count">1</div>
                            <span class="oh-onboarding-card__text">{% trans "Login" %}</span>
                        </li>
                        <li class="oh-onboarding-card__step">
                            <div class="oh-onboarding-card__count">2</div>
                            <span class="oh-onboarding-card__text">{% trans "Profile Setup" %}</span>
                        </li>
                        <li class="oh-onboarding-card__step ">
                            <div class="oh-onboarding-card__count">3</div>
                            <span class="oh-onboarding-card__text">{% trans "Personal Details" %}</span>
                        </li>
                        <li class="oh-onboarding-card__step oh-onboarding-card__step--active">
                            <div class="oh-onboarding-card__count">4</div>
                            <span class="oh-onboarding-card__text">{% trans "Bank Details" %}</span>
                        </li>
                    </ul>
                </div>
                <form method="Post">
                    {% csrf_token %}
                    <div class="oh-onboarding-card__address-group">
                        <h2 class="oh-onboarding-card__section-title">{% trans "Bank Details" %}</h2>
                        <div class="row">
                            <div class="col-sm-12 col-md-12 col-lg-6">
                                <div class="oh-input-group">
                                    <label for="" class="oh-label">{% trans "Bank Name" %}</label>
                                    {{form.bank_name}}
                                    {{form.bank_name.errors}}
                                </div>
                            </div>
                            <div class="col-sm-12 col-md-12 col-lg-6">
                                <div class="oh-input-group">
                                    <label for="" class="oh-label">{% trans "Account number" %}</label>
                                    {{form.account_number}}
                                    {{form.account_number.errors}}
                                </div>
                            </div>
                             <div class="col-sm-12 col-md-12 col-lg-12">
                                <div class="oh-input-group">
                                    <label for="" class="oh-label">{% trans "Branch" %}</label>
                                    {{form.branch}}
                                    {{form.branch.errors}}
                                </div>
                            </div>
                            <div class="col-sm-12 col-md-12 col-lg-12">
                                <div class="oh-input-group">
                                    <label for="" class="oh-label">{% trans "Address" %}</label>
                                    {{form.address}}
                                    {{form.address.errors}}
                                </div>
                            </div>
                            <div class="col-sm-12 col-md-12 col-lg-12 ">
                                <div class="oh-input-group">
                                  <label for="" class="oh-label">{% trans "Country *" %}</label>
                                  <select name="country" id="id_country" class="oh-select oh-select-2">

                                  </select>
                                  {{form.country.errors}}
                                </div>
                              </div>
                              <div class="col-sm-12 col-md-12 col-lg-12 ">
                                <div class="oh-input-group">
                                  <label for="" class="oh-label">{% trans "State *" %}</label>
                                  <select name="state" id="id_state" class="oh-select oh-select-2">

                                  </select>
                                  {{form.state.errors}}
                                </div>
                              </div>
                            <div class="col-sm-12 col-md-12 col-lg-12">
                                <div class="oh-input-group">
                                    <label for="" class="oh-label">{% trans "City" %}</label>
                                    {{form.city}}
                                    {{form.city.errors}}
                                </div>
                            </div>
                            <div class="col-sm-12 col-md-12 col-lg-12">
                                <div class="oh-input-group">
                                    <label for="" class="oh-label">{% trans "Bank Code" %} #1</label>
                                    {{form.any_other_code1}}
                                    {{form.any_other_code1.errors}}
                                </div>
                            </div>
                            <div class="col-sm-12 col-md-12 col-lg-12">
                                <div class="oh-input-group">
                                    <label for="" class="oh-label">{% trans "Bank Code" %} #2</label>
                                    {{form.any_other_code2}}
                                    {{form.any_other_code2.errors}}
                                </div>
                            </div>
                        </div>
                    </div>

                    <button href="#"
                        class="oh-btn oh-onboarding-card__button mt-4 oh-btn--secondary oh-btn--shadow w-100 mb-4"
                        role="button">
                        {% trans "Finish Onboarding" %}
                    </button>

                </form>

            </div>
        </main>
    </div>
    <link rel="stylesheet" type="text/css" href="{% static 'css/style.css' %}">
    <script src="{% static 'build/js/web.frontend.min.js' %}"></script>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script type="module" src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"></script>
    <script nomodule src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"></script>
    <script>
        {% include 'onboarding/static/country.js' %}
    </script>
    <script>
        $(document).ready(function() {
            $('input[required], select[required], textarea[required]').each(function() {
                var label = $(this).closest("div").find("label")

                if (label.length) {
                    label.append('<span> *</span>');
                }
            });
        });
    </script>
</body>

</html>
