diff --git a/docs/en/Community-Articles/2023-02-06-Converting-Create-Edit-Modal-To-Page/POST.md b/docs/en/Community-Articles/2023-02-06-Converting-Create-Edit-Modal-To-Page/POST.md new file mode 100644 index 0000000000..67d3071e7b --- /dev/null +++ b/docs/en/Community-Articles/2023-02-06-Converting-Create-Edit-Modal-To-Page/POST.md @@ -0,0 +1,80 @@ +# Converting Create/Edit Modal to Page + +In this document we will explain how to convert BookStore's `Books` create & edit modals to regular razor pages. + +## Index page + +Repalce `abp-button(NewBookButton)` buttom with ` @L["NewBook"].Value`. + +## Index js file + +Remove the related codes of `createModal` and `editModal`. + +Change the `Edit row action` with `location.href = "/Books/EditModal?id=" + data.record.id;` + + +## Create/Edit Book page + +Remove `Layout = null;` and add some custom style and javascript code to `CreateModal.cshtml` & `EditModal.cshtml`. + +```csharp +@section styles { + +} +@section scripts { + +} +``` + +Add a `div` element with `abp-view-modal` class to wrap the `abp-dynamic-form`, Set size of `abp-modal` to `ExtraLarge` and remove the `AbpModalButtons.Cancel` button from `abp-modal-footer`. + +### CreateModal +```csharp +