Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

2.3 KB
Raw Blame
@model DeleteAccountModel
@inject IPageHeadBuilder pagebuilder
@{
    Layout = "_TwoColumns";

    //title
    pagebuilder.AddTitleParts(Loc["Title.Account"]);
}

@section left
{
    @await Component.InvokeAsync("CustomerNavigation", new { selectedTabId = AccountNavigationEnum.DeleteAccount })
}

@*a plain element to mount on: the view's outermost node is a Vue component*@
<div class="form-page-island" vue-island="deleteaccount">
<validation-observer v-slot="{ handleSubmit }">
    <form asp-route="CustomerDeleteAccount" method="post" autocomplete="off" ref="form" v-on:submit.prevent="handleSubmit(formSubmit)">
        <section class="page account-page change-password-page ps-lg-3 pt-3 pt-lg-0">
            <h1 class="h2 generalTitle">@Loc["Account.DeleteAccount"]</h1>
            <div asp-validation-summary="All" class="message-error"></div>
            <div class="alert alert-danger" role="alert">
                @Loc["Account.DeleteAccount.DangerAlert"]
            </div>
            <fieldset>
                <div class="form-fields">
                    <fieldset class="form-group">
                        <validation-provider tag="div" rules="required" name="Password" v-slot="{ errors, classes }">
                            <label asp-for="Password" class="col-form-label">@Loc["Account.DeleteAccount.Fields.Password"]:</label>
                            <input asp-for="Password" v-model="deleteaccount.Password" v-bind:class="[classes , 'form-control']" autofocus="autofocus" autocomplete="off" data-val-required=@Loc["Account.DeleteAccount.Fields.Password.Required"]/>
                            <span class="field-validation-error">{{ errors[0] }}</span>
                            <span asp-validation-for="Password"></span>
                        </validation-provider>
                    </fieldset>
                </div>
            </fieldset>
            <div class="text-xs-center">
                <input type="submit" class="btn btn-danger change-password-button" value="@Loc["Account.DeleteAccount.Button"]" onclick="return confirm('@Loc["Admin.Common.AreYouSure"]'); "/>
            </div>
        </section>
    </form>
</validation-observer>
</div>
<script type="application/json" data-grand-vm="state">@Json.Serialize(new { name = "deleteaccount", data = new { Password = "" } })</script>