<div class="modal fade" id="registerModal" tabindex="-1" role="dialog" aria-labelledby="registerModal"
    aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered" role="document">
        <div class="modal-content">
            <div class="modal-header border-bottom-0">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close" id="registerModalCloseBtn">
                    <span aria-hidden="true">×</span>
                </button>
            </div>

            <div class="modal-body">
                <div class="form-title text-center mb-4">
                    <h4>Sign Up</h4>
                </div>

                <!-- start register form  -->
                <form method="post" action="account/register/">
                    {% csrf_token %}
                    <div class="row">
                        <div class="col-md-6 mb-4">
                            <!-- First Name input -->
                            <div class="form-outline">
                                <label class="form-label" for="formFirstName1">First Name</label>
                                <input type="text" id="formFirstName1" name="first_name" class="form-control" />
                            </div>
                        </div>

                        <div class="col-md-6">

                            <!-- Last Name input -->
                            <div class="form-outline mb-4">
                                <label class="form-label" for="formLastName1">Last Name</label>
                                <input type="text" id="formLastName1" name="last_name" class="form-control" />
                            </div>
                        </div>
                    </div>


                    <!-- Email input -->
                    <div class="form-outline mb-4">
                        <label class="form-label" for="formEmail1">Email</label>
                        <input type="email" id="formEmail1" name="email" class="form-control" />
                    </div>

                    <!-- Password input -->
                    <div class="form-outline mb-4">
                        <label class="form-label" for="formPassword1">Password</label>
                        <input type="password" id="formPassword1" name="password" class="form-control" />
                    </div>

                    <div class="row mb-4">
                        <div class="col d-flex justify-content-center">
                            <!-- Checkbox -->
                            <div class="form-check">
                                <input class="form-check-input" type="checkbox" value="" id="form2Example31" checked />
                                <label class="form-check-label" for="form2Example31"> Remember me </label>
                            </div>
                        </div>

                        <div class="col">
                            <a href="#!">Forgot password?</a>
                        </div>
                    </div>

                    <!-- Submit button -->
                    <button type="submit" class="btn btn-primary btn-block mb-4">Sign Up</button>

                    <!-- Register buttons -->
                    <div class="text-center">
                        <p>Already have an account? <a href="#!" id="signinLink" data-toggle="modal"
                                data-target="#loginModal">Sign in</a></p>
                    </div>
                </form>

                <!-- register form end -->
            </div>

        </div>
    </div>
</div>
</div>


<script>
    document.getElementById('signinLink').addEventListener('click', function () {
        // Hide the Register modal
        $('#registerModal').modal('hide');
    });
</script>