@model VendorInfoModel
@{
    Layout = "_ColumnsTwo";

    //title
    NopHtml.AddTitleParts(T("PageTitle.VendorInfo").Text);
    //page class
    NopHtml.AppendPageCssClassParts("html-account-page");
    NopHtml.AppendPageCssClassParts("html-vendorinfo-page");
}
@section left
{
    @await Component.InvokeAsync(typeof(CustomerNavigationViewComponent), new { selectedTabId = CustomerNavigationEnum.VendorInfo })
}
<form asp-route="CustomerVendorInfo" method="post" enctype="multipart/form-data">
    <div asp-validation-summary="ModelOnly" class="message-error"></div>
    <div class="page account-page vendorinfo-page">
        <div class="page-title panel-heading">
            <h1>@T("Account.MyAccount") - @T("Account.VendorInfo")</h1>
        </div>
        <div class="page-body">
            @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.VendorInfoTop, additionalData = Model })
            <div class="form-horizontal">
                <div class="form-group">
                    <label class="control-label col-sm-2 col-md-2" asp-for="Name" asp-postfix=":"></label>
                    <div class="visible-xs form-title-rquired"><nop-required /></div>
                    <div class="col-sm-6 col-md-6">
                        <input class="form-control" asp-for="Name" />
                    </div>
                    <div class="col-sm-4 col-md-4">
                        <div class="visible-lg visible-md visible-sm form-title-rquired"><nop-required /></div>
                        <span asp-validation-for="Name"></span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-sm-2 col-md-2" asp-for="Email" asp-postfix=":"></label>
                    <div class="visible-xs form-title-rquired"><nop-required /></div>
                    <div class="col-sm-6 col-md-6">
                        <input class="form-control" asp-for="Email" />
                    </div>
                    <div class="col-sm-4 col-md-4">
                        <div class="visible-lg visible-md visible-sm form-title-rquired"><nop-required /></div>
                        <span asp-validation-for="Email"></span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-sm-2 col-md-2" asp-for="Description" asp-postfix=":"></label>
                    <div class="col-sm-6 col-md-6">
                        <textarea class="form-control" asp-for="Description"></textarea>
                    </div>
                    <div class="col-sm-4 col-md-4">
                        <span asp-validation-for="Description"></span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label col-sm-2 col-md-2" asp-for="PictureUrl" asp-postfix=":"></label>
                    <div class="col-sm-6 col-md-6">
                        <label class="btn btn-default">
                            <input name="uploadedFile" type="file" accept="image/*" />
                        </label>
                        @if (!string.IsNullOrEmpty(Model.PictureUrl))
                        {
                            <div class="vendor-picture">
                                <img src="@(Model.PictureUrl)" alt="picture" />
                                <button type="submit" name="remove-picture" class="btn btn-primary remove-picture-button">@T("Account.VendorInfo.Picture.Remove")</button>
                            </div>
                        }
                    </div>
                </div>
            </div>
            @if (Model.VendorAttributes.Count > 0)
            {
                <div class="fieldset">
                    <div class="form-fields form-horizontal">
                        @await Html.PartialAsync("_VendorAttributes", Model.VendorAttributes)
                    </div>
                </div>
            }
            <div class="form-group row">
                <div class="buttons col-sm-offset-2 col-md-offset-2 col-md-5">
                    <button type="submit" name="save-info-button" class="btn btn-primary save-vendorinfo-button">@T("Common.Save")</button>
                </div>
            </div>
        </div>
    </div>
</form>
@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.VendorInfoBottom, additionalData = Model })