@model PantheonRA.BackOffice.Models.EditCompanySettingsModel
@{
    ViewBag.Title = Loc.EditCompanySettings;
}

<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-lg-10">
        <a class="navbar-minimalize btn btn-primary " href="#"><i class="fa fa-bars"></i> </a>
        <h2>@ViewBag.Title</h2>
        <span class="breadcrumb-divider">&bull;</span>
        <ol class="breadcrumb">
            <li><a href="@Url.Action("Index", "Company")">Home</a></li>
            <li>@Loc.AdministrationPanel</li>
            <li class="active"><strong>@ViewBag.Title</strong></li>
        </ol>
    </div>
    <div class="col-lg-2">
    </div>
</div>

<div class="wrapper wrapper-content  animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox">
                <div class="ibox-content">
                    <div class="row m-b-sm m-t-sm">
                        <div class="col-md-12">
                            <h2>@Html.Raw(String.Format(Loc.PleaseFillTheFormBelow, "<b>" + Loc.CompanySettingsGenitiv.ToLower() + "</b>"))</h2>
                            
                            <div class="hr-line-dashed"></div>
                            @using (Html.BeginForm())
                            {
                                <div class="row">
                                    @*<div class="col-xs-12">
                                        <div class="alert alert-warning">
                                            <div>
                                                <p><b>@Loc.Warning</b></p>
                                                <p id="taxPayerInfoDescription">@(Model.IsTaxPayer ? Loc.TaxPayerInfoDescription : Loc.TaxPayerNotInfoDescription)</p>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <div class="form-group no-label-control">
                                                <div>
                                                    @Html.CheckBoxFor(model => model.IsTaxPayer, new { @id = "IsTaxPayer", @class = "form-control js-switch" })
                                                    @Html.LabelFor(model => model.IsTaxPayer, Loc.TaxPayer + "?")
                                                </div>
                                            </div>
                                        </div>
                                    </div>*@
                                    <div class="col-md-12">
                                        <div class="hr-line-dashed"></div>
                                        <div class="row buttons-row">
                                            <div class="col-xs-4">
                                                <a href="@Url.Action("Index", "Company")" class="btn btn-default btn-block btn-outline">@Loc.Cancel</a>
                                            </div>
                                            <div class="col-xs-6">
                                                <button id="saveImportedItems2" class="btn btn-primary btn-block" type="submit">
                                                    <div class="text-center" id="insertingProductsLoader2" style="display: none;">
                                                        <div class="sk-spinner sk-spinner-three-bounce">
                                                            <div class="sk-bounce1"></div>
                                                            <div class="sk-bounce1"></div>
                                                            <div class="sk-bounce2"></div>
                                                        </div>
                                                    </div>
                                                    <span>@Loc.Save</span>
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            }
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

@section pageCss{
    <link href="~/Content/plugins/switchery/switchery.css" rel="stylesheet" />
}

@section pageScripts{
    <script src="~/Scripts/plugins/switchery/switchery.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch'));
            elems.forEach(function (html) {
                var switchery = new Switchery(html);
            });


            var changeCheckbox = document.querySelector('#IsTaxPayer');
            changeCheckbox.onchange = function () {
                if (changeCheckbox.checked) {
                    $("#taxPayerInfoDescription").text('@Loc.TaxPayerInfoDescription');
                }
                else {
                    $("#taxPayerInfoDescription").text('@Loc.TaxPayerNotInfoDescription');
                }
            }
        });
    </script>
}