@inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
@using Dynamicweb
@using Dynamicweb.Frontend

@{
    string currentPageUrl = SearchEngineFriendlyURLs.GetFriendlyUrl($"/default.aspx?ID={Pageview?.Page?.ID ?? 0}");
}

<form name="ordersubmit" id="ordersubmit" method="post" action="@(currentPageUrl)" autocomplete="off">
    <p class="text-muted">@Translate("Enter a new name for the card")</p>
    <div class="form-floating mb-4">
        <input type="text" class="form-control" name="EcomOrderSavedCardName" id="SavedCardName" placeholder="@Translate("Card name")" required/>
        <label for="SavedCardName">@Translate("Card name")</label>
    </div>
    <input type="hidden" name="EcomOrderSavedCardCreate" value="true" />
    <input type="hidden" name="CartCmd" value="CreateNew" />
    <input type="hidden" name="SetActive" value="true" />
    <input type="hidden" name="redirect" value="false" />
    <input type="hidden" name="@GetString("CartV2.NextStepButtonName")">
    <div class="d-flex justify-content-end gap-2">
        <button type="button" class="btn btn-outline-secondary btn-sm" data-dw-button="" data-bs-dismiss="modal">@Translate("Cancel")</button>
        <button type="submit" class="btn btn-primary btn-sm" data-dw-button>@Translate("Save and continue")</button>
    </div>
</form>