{% extends 'custom_admin_base.html' %}
{% load staticfiles %}
{% block content %}
    {% include 'custom_admin_user_sub.html' %}
    <form method="post" action="{% url 'company:companyModify' %}" class="FormWrap" enctype="multipart/form-data"> {% csrf_token %}
        <div class="addSmartBI"><img src="{% static 'base/image/smartBI.png' %}"></div>
        {% if success %}
        <p>{{ success }}</p>
        {% endif %}
        <label for="id_name">상호:</label><input value="{{ modifiedCompany.name }}" id="id_name" maxlength="100" name="name" type="text" />
        <label for="id_corporate_number">사업자등록번호:</label><input value="{{ modifiedCompany.corporate_number }}" id="id_corporate_number" maxlength="40" name="corporate_number" type="text" />
        <label for="id_ceo">대표:</label><input value="{{ modifiedCompany.ceo }}" id="id_ceo" maxlength="40" name="ceo" type="text" />
        <label for="id_conditions">업태:</label><input value="{{ modifiedCompany.conditions }}" id="id_conditions" maxlength="40" name="conditions" type="text" />
        <label for="id_type">업종:</label><input value="{{ modifiedCompany.type }}" id="id_type" maxlength="40" name="type" type="text" />
        <label for="id_person">담당자:</label><input value="{{ modifiedCompany.person }}" id="id_person" maxlength="40" name="person" type="text" />
        <label for="id_post_code">우편번호:</label><input value="{{ modifiedCompany.post_code }}" id="id_post_code" class="postcodify_postcode5" maxlength="40" name="post_code" type="text" />
        <label for="id_address">주소:</label><input value="{{ modifiedCompany.address }}" id="id_address" class="postcodify_address" maxlength="100" name="address" type="text" />
        <label for="id_detail_address">상세주소:</label><input value="{{ modifiedCompany.detail_address }}" id="id_detail_address" maxlength="100" name="detail_address" type="text" />
        <label for="id_tel">대표전화:</label><input value="{{ modifiedCompany.tel }}" id="id_tel" maxlength="80" name="tel" type="text" />
        <label for="id_bank">은행명:</label><input value="{{ modifiedCompany.bank }}" id="id_bank" maxlength="20" name="bank" type="text" />
        <label for="id_account">계좌번호:</label><input value="{{ modifiedCompany.account }}" id="id_account" maxlength="40" name="account" type="text" />
        <label for="id_hp_address">홈페이지주소:</label><input value="{{ modifiedCompany.hp_address }}" id="id_hp_address" maxlength="40" name="hp_address" type="text" />
        <label for="id_stamp">도장이미지:</label><td><input id="id_stamp" name="stamp" class="stampInput" type="file" />
        <input type="hidden" name="company-pk" value="{{ modifiedCompany.pk }}">
        <div class="addCompanyStamp">
            {% if modifiedCompany.stamp == None or modifiedCompany.stamp == '' %}
            <span>도장 이미지가 없습니다</span>
            {% else %}
            <img src="{{ modifiedCompany.stamp.url }}">
            {% endif %}
        </div>
        <div class="Btn">
            <button id="postcodify_search_button" class="benderAddressBtn" type="button">주소 검색</button>
            <button class="cancelBtn" type="button" onclick="as.returnCompanyList()">목록</button>
            <button class="SaveBtn" type="button" onclick="as.deleteCompany({{ modifiedCompany.pk }})">삭제</button>
            <button class="SaveBtn" type="submit">수정</button>
        </div>
    </form>
{% endblock content %}
{% block extrascript %}
    <script src="//d1p7wdleee1q2z.cloudfront.net/post/search.min.js"></script>
    <script>
        $(function() { $("#postcodify_search_button").postcodifyPopUp(); });
    </script>
{% endblock extrascript %}