@model PantheonRA.BackOffice.Models.DeviceCreateViewModel

@{
    ViewBag.Title = Loc.Settings;
    Html.RenderPartial("_Breadcrumb", new PantheonRA.BackOffice.Models.BreadcrumbViewModel
    {
        Links = new List<Tuple<string, string>> {
            new Tuple<string, string>(Loc.AdministrationPanel, Url.Action("Index", "Company")),
            new Tuple<string, string>(Loc.DeviceDetails, Url.Action("Details", "Devices", new{ deviceId = Model.DeviceCreateData.Id})),
            new Tuple<string, string>(Loc.ChangeCompanyUnit, string.Empty),
        }
    });
}

<div class="wrapper wrapper-content  animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>@Loc.DeviceData</h5>
                </div>
                <div class="ibox-content">
                    <div class="row m-b-sm m-t-sm">
                        <div class="col-md-12">

                            <h2>@Loc.ChangeCompanyUnit</h2>
                            <div class="hr-line-dashed"></div>

                            @using (Html.BeginForm())
                            {
                                @Html.HiddenFor(model => model.DeviceCreateData.Id)
                                @Html.HiddenFor(model => model.DeviceCreateData.Name)
                                @Html.HiddenFor(model => model.DeviceCreateData.Code)
                                <div class="row">
                                    <div class="col-md-12">
                                        <div class="alert alert-danger">
                                            <p><b>@Loc.Warning!</b></p>
                                            <p>@Loc.YouWillNotBeAbleToChangeCompanyUnit</p>
                                        </div>
                                        <div class="form-group">
                                            @Html.LabelFor(model => model.DeviceCreateData.SelectedCompanyUnitId, Loc.CompanyUnit)
                                            @Html.DropDownListFor(model => model.DeviceCreateData.SelectedCompanyUnitId, Model.CompanyUnits, new { @id = "SelectedCompanyUnitId", @class = "form-control" })
                                            @Html.ValidationMessageFor(model => model.DeviceCreateData.SelectedCompanyUnitId)
                                        </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("Details", "Devices", new{ deviceId = Model.DeviceCreateData.Id})" class="btn btn-default btn-block btn-outline">@Loc.Cancel</a>
                                            </div>
                                            <div class="col-xs-1 col-xs-offset-1">

                                            </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{

}

@section pageScripts{
    <script type="text/javascript">
        $(document).ready(function () {
            $('.input-validation-error').parents('.form-group').addClass('has-error');
            $('.field-validation-error').addClass('text-danger');
        });
    </script>
}