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

<head>
    <title>Info Request | sdjo web site</title>
    <link rel="stylesheet" href="{% static 'blog/bootstrap/bootstrap.min.css' %}" type="text/css">
    <script src="https://kit.fontawesome.com/77d81e5d17.js" crossorigin="anonymous"></script>
</head>

<body class="pt-5">
    {% include 'common/navbar.html' %}
    <section>
        <div class="row">
            <div class="mt-5 col-12 text-center">NKS ObjectStorage Information</div>
        </div>
        <br>
        <div class="row">
            
            <div class="col-lg-4"></div>
            <div class="col-lg-4">
                <form method="post" action="{% url 'nhncloud:infoObjectStorageList' %}">{% csrf_token %}
                    <input type="hidden" class="form-control" name="objStrgAccount" id="objStrgAccount" value="{{ user.nhn_obstg_sc }}">
                    <div class="mb-3">
                        <div class="row">
                            <div class="col-md-4 form-group">
                                <label for="region">Region</label>
                            </div>
                            <div class="col-md-8">
                                <select class="form-control" name="region" id="region" onchange="selectRegion(this.value);">
                                    <option value="select...">select...</option>
                                    <option value="kr1">판교</option>
                                    <option value="kr2">평촌</option>
                                </select>                                
                            </div>
                        </div>        
                    </div>
                    <div class="mb-3">
                        <div class="row">
                            <div class="col-md-4">
                                <label for="tenantId">Tenant ID</label>
                            </div>
                            <div class="col-md-8">
                                <input type="password" class="form-control" name="tenantId" id="tenantId">
                            </div>
                        </div>
                    </div>
                    <div class="mb-3">
                        <div class="row">
                            <div class="col-md-4">
                                <label for="usrEmail">User Email</label>
                            </div>
                            <div class="col-md-8">
                                <input type="text" class="form-control" name="usrEmail" id="usrEmail" value="{{ user.nhn_id }}">
                            </div>
                        </div>
                    </div>
                    <div class="mb-3">
                        <div class="row">
                            <div class="col-md-4">
                                <label for="apiPw">API Password</label>
                            </div>
                            <div class="col-md-8">
                                <input type="password" class="form-control" name="apiPw" id="apiPw">
                            </div>
                        </div>
                    </div>
                    <button type="submit" class="btn btn-info float-right">Request</button>
                </form>
            </div>
            <div class="col-lg-4"></div>
        </div>
    </section>
    <div class="fixed-bottom">
        {% include 'blog/footer.html' %}
    </div>
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"
        integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
        crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"
        integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct"
        crossorigin="anonymous"></script>
    <script>
        function selectRegion(){
            let selectRegionValue = document.getElementById('region').value;
            console.log(selectRegionValue);
            document.getElementById('tenantId').value = "{{ user.nhn_obstg_tntid }}";
        }
    </script>
    <script>
        function createClickMsg(){
            alert('Object Storage 리스트가 조회됩니다.');
        }
    </script>
</body>

</html>