@using bitforum.Helpers

@{
    ViewData["Title"] = "회사 정보";
    var config = ViewBag.Config as Dictionary<string, string>;
}

<div class="container">
    <h3>@ViewData["Title"]</h3>
    <hr />

    <partial name="_StatusMessage" />

    <form name="f_admin_write" id="fAdminWrite" method="post" asp-controller="Company" asp-action="Save" autocomplete="off">
        <div class="row mb-3">
            <label for="companyName" class="col-sm-2 col-form-label">상호 명</label>
            <div class="col-sm-10">
                <input type="text" name="company_name" id="companyName" class="form-control" value="@config.GetConfig("company_name")" />
            </div>
        </div>
        <div class="row mb-3">
            <label for="companyRegNo" class="col-sm-2 col-form-label">사업자 등록 번호</label>
            <div class="col-sm-10">
                <input type="text" name="company_reg_no" id="companyRegNo" class="form-control" value="@config.GetConfig("company_reg_no")" />
            </div>
        </div>
        <div class="row mb-3">
            <label for="companyOwner" class="col-sm-2 col-form-label">대표자 명</label>
            <div class="col-sm-10">
                <input type="text" name="company_owner" id="companyOwner" class="form-control" value="@config.GetConfig("company_owner")" />
            </div>
        </div>
        <div class="row mb-3">
            <label for="companyTel" class="col-sm-2 col-form-label">대표 전화번호</label>
            <div class="col-sm-10">
                <input type="text" name="company_tel" id="companyTel" class="form-control" value="@config.GetConfig("company_tel")" />
            </div>
        </div>
        <div class="row mb-3">
            <label for="companyFax" class="col-sm-2 col-form-label">FAX 번호</label>
            <div class="col-sm-10">
                <input type="text" name="company_fax" id="companyFax" class="form-control" value="@config.GetConfig("company_fax")" />
            </div>
        </div>
        <div class="row mb-3">
            <label for="companyRetailSaleNo" class="col-sm-2 col-form-label">통신판매업 신고번호</label>
            <div class="col-sm-10">
                <input type="text" name="company_retail_sale_no" id="companyRetailSaleNo" class="form-control" value="@config.GetConfig("company_retail_sale_no")" />
            </div>
        </div>
        <div class="row mb-3">
            <label for="companyAddedSaleNo" class="col-sm-2 col-form-label">부가통신 사업자번호</label>
            <div class="col-sm-10">
                <input type="text" name="company_added_sale_no" id="companyAddedSaleNo" class="form-control" value="@config.GetConfig("company_added_sale_no")" />
            </div>
        </div>
        <div class="row mb-3">
            <label for="companyZipCode" class="col-sm-2 col-form-label">사업장 주소</label>
            <div class="col-sm-10">
                <input type="text" name="company_zip_code" id="companyZipCode" class="form-control" value="@config.GetConfig("company_zip_code")" />
            </div>
        </div>
        <div class="row mb-3">
            <label for="companyHosting" class="col-sm-2 col-form-label">호스팅 서비스</label>
            <div class="col-sm-10">
                <input type="text" name="company_hosting" id="companyHosting" class="form-control" value="@config.GetConfig("company_hosting")" />
            </div>
        </div>
        <div class="row mb-3">
            <label for="companyAdminName" class="col-sm-2 col-form-label">정보관리책임자</label>
            <div class="col-sm-10">
                <input type="text" name="company_admin_name" id="companyAdminName" class="form-control" value="@config.GetConfig("company_admin_name")" />
            </div>
        </div>
        <div class="row mb-3">
            <label for="companyAdminEmail" class="col-sm-2 col-form-label">정보관리책임자 이메일</label>
            <div class="col-sm-10">
                <input type="text" name="company_admin_email" id="companyAdminEmail" class="form-control" value="@config.GetConfig("company_admin_email")" />
            </div>
        </div>
        <div class="row mb-3">
            <label for="companySiteUrl" class="col-sm-2 col-form-label">사이트 주소</label>
            <div class="col-sm-10">
                <input type="text" name="company_site_url" id="companySiteUrl" class="form-control" value="@config.GetConfig("company_site_url")" />
            </div>
        </div>
        <div class="row mb-3">
            <label for="siteName" class="col-sm-2 col-form-label">입금계좌</label>
            <div class="col-sm-10">
                <div class="row">
                    <label for="companyBankCode" class="col-auto col-form-label">은행</label>
                    <div class="col-sm">
                        <select name="company_bank_code" id="companyBankCode" class="form-select" asp-items="ViewBag.bankCodes" form="fAdminWrite"></select>
                    </div>
                    <label for="companyBankOwner" class="col-auto col-form-label">예금주</label>
                    <div class="col-sm">
                        <input type="text" name="company_bank_owner" id="companyBankOwner" class="form-control" value="@config.GetConfig("company_bank_owner")" />
                    </div>
                    <label for="companyBankNumber" class="col-auto col-form-label">계좌번호</label>
                    <div class="col-sm">
                        <input type="text" name="company_bank_number" id="companyBankNumber" class="form-control" value="@config.GetConfig("company_bank_number")" />
                    </div>
                </div>
            </div>
        </div>

        <hr/>
        <div class="row">
            <div class="col text-center p-3">
                <button type="submit" class="btn btn-success">저장하기</button>
            </div>
        </div>

        <br />
    </form>
</div>
