diff --git a/src/OAP/Oap.Theme/ResourceManagementOptionsConfiguration.cs b/src/OAP/Oap.Theme/ResourceManagementOptionsConfiguration.cs index 4bbc2f2..ab0c565 100644 --- a/src/OAP/Oap.Theme/ResourceManagementOptionsConfiguration.cs +++ b/src/OAP/Oap.Theme/ResourceManagementOptionsConfiguration.cs @@ -9,6 +9,11 @@ public class ResourceManagementOptionsConfiguration : IConfigureOptions +

@Model.Header.TitlePart.Title

- @await DisplayAsync(Model.Content.HtmlBodyPart) +
+ @await DisplayAsync(Model.Content.HtmlBodyPart) +
@await DisplayAsync(Model.Content.FlowPart)
\ No newline at end of file diff --git a/src/OAP/Oap.Theme/Views/Form.Wrapper.cshtml b/src/OAP/Oap.Theme/Views/Form.Wrapper.cshtml new file mode 100644 index 0000000..ae9f660 --- /dev/null +++ b/src/OAP/Oap.Theme/Views/Form.Wrapper.cshtml @@ -0,0 +1,36 @@ +@using Microsoft.AspNetCore.Html +@using OrchardCore.ContentManagement +@using OrchardCore.Forms.Models +@using OrchardCore.Mvc.Utilities +@using OrchardCore.Workflows + +@{ + var formPart = ((ContentItem)Model.ContentItem).As(); + string encType = formPart.Method == "POST" ? formPart.EncType : string.Empty; + var formContentTypeClassName = "form-" + ((string)Model.ContentItem.ContentType).HtmlClassify(); + + var elementId = ((ContentItem)Model.ContentItem).As()?.Id; + string formId = string.IsNullOrWhiteSpace(elementId) ? $"form_{Model.ContentItem.ContentItemId}" : elementId; +} + +
+ @if (formPart.EnableAntiForgeryToken) + { + @Html.AntiForgeryToken() + } + + @if (formPart.SaveFormLocation) + { + + } + + @await DisplayAsync((IHtmlContent)Model.Metadata.ChildContent) +
diff --git a/src/OAP/Oap.Theme/Views/FormElementLabelPart.cshtml b/src/OAP/Oap.Theme/Views/FormElementLabelPart.cshtml index 4cdc94d..c07929b 100644 --- a/src/OAP/Oap.Theme/Views/FormElementLabelPart.cshtml +++ b/src/OAP/Oap.Theme/Views/FormElementLabelPart.cshtml @@ -11,7 +11,7 @@ @if (Model.Value.Option == LabelOptions.Standard) { - + } else if (Model.Value.Option == LabelOptions.ScreenReaders) { diff --git a/src/OAP/Oap.Theme/Views/Input-HtmlBodyPart.cshtml b/src/OAP/Oap.Theme/Views/Input-HtmlBodyPart.cshtml index b562ff9..7331775 100644 --- a/src/OAP/Oap.Theme/Views/Input-HtmlBodyPart.cshtml +++ b/src/OAP/Oap.Theme/Views/Input-HtmlBodyPart.cshtml @@ -1,6 +1,6 @@ @model OrchardCore.Html.ViewModels.HtmlBodyPartViewModel -
+
@Html.Raw(Model.Html)
diff --git a/src/OAP/Oap.Theme/Views/Layout.cshtml b/src/OAP/Oap.Theme/Views/Layout.cshtml index 0dff5b6..ef14cd6 100644 --- a/src/OAP/Oap.Theme/Views/Layout.cshtml +++ b/src/OAP/Oap.Theme/Views/Layout.cshtml @@ -17,6 +17,7 @@ + diff --git a/src/OAP/Oap.Theme/Views/OapApplicationForm-ListPart.cshtml b/src/OAP/Oap.Theme/Views/OapApplicationForm-ListPart.cshtml index 6dcfae3..ab31c7b 100644 --- a/src/OAP/Oap.Theme/Views/OapApplicationForm-ListPart.cshtml +++ b/src/OAP/Oap.Theme/Views/OapApplicationForm-ListPart.cshtml @@ -2,14 +2,13 @@ @inject OrchardCore.ContentManagement.Display.IContentItemDisplayManager ContentItemDisplayManager
- @foreach (var step in Model.ContentItems) - { + @{ var stepContent = await ContentItemDisplayManager.BuildDisplayAsync( - step, + Model.ContentItems.First(), Model.Context.Updater, Model.Context.DisplayType, Model.Context.GroupId); - - @await DisplayAsync(stepContent) } + + @await DisplayAsync(stepContent)
\ No newline at end of file diff --git a/src/OAP/Oap.Theme/Views/Widget-Form.cshtml b/src/OAP/Oap.Theme/Views/Widget-Form.cshtml index a2df32b..caa6324 100644 --- a/src/OAP/Oap.Theme/Views/Widget-Form.cshtml +++ b/src/OAP/Oap.Theme/Views/Widget-Form.cshtml @@ -1,3 +1,3 @@ -
+
@await DisplayAsync(Model.Content)
\ No newline at end of file diff --git a/src/OAP/Oap.Theme/Views/Widget-Select.cshtml b/src/OAP/Oap.Theme/Views/Widget-Select.cshtml index 17d53ac..02d82af 100644 --- a/src/OAP/Oap.Theme/Views/Widget-Select.cshtml +++ b/src/OAP/Oap.Theme/Views/Widget-Select.cshtml @@ -1,4 +1,4 @@ -
+
@await DisplayAsync(Model.Content.FormElementLabelPart) @await DisplayAsync(Model.Content.Explanation) @await DisplayAsync(Model.Content.SelectPart) diff --git a/src/OAP/Oap.Theme/wwwroot/site.css b/src/OAP/Oap.Theme/wwwroot/site.css index 9c43077..0934e52 100644 --- a/src/OAP/Oap.Theme/wwwroot/site.css +++ b/src/OAP/Oap.Theme/wwwroot/site.css @@ -534,8 +534,7 @@ div.richtext ul li { list-style-type: disc; } div.richtext p { - margin-top: 1rem; - margin-bottom: 1rem; + margin-bottom: 0.5rem; } div.richtext .red { --tw-text-opacity: 1; @@ -579,8 +578,8 @@ span.field-validation-error { .mt-2 { margin-top: 0.5rem; } -.mt-6 { - margin-top: 1.5rem; +.mb-4 { + margin-bottom: 1rem; } .block { display: block; @@ -591,20 +590,14 @@ span.field-validation-error { .table { display: table; } -.grid { - display: grid; -} .hidden { display: none; } -.h-full { - height: 100%; -} .h-4 { height: 1rem; } -.min-h-full { - min-height: 100%; +.w-1\/3 { + width: 33.333333%; } .w-4 { width: 1rem; @@ -612,21 +605,12 @@ span.field-validation-error { .w-full { width: 100%; } -.w-1\/3 { - width: 33.333333%; -} .max-w-screen-md { max-width: 768px; } .cursor-pointer { cursor: pointer; } -.grid-cols-2 { - grid-template-columns: repeat(2, minmax(0, 1fr)); -} -.flex-row { - flex-direction: row; -} .flex-col { flex-direction: column; } @@ -636,22 +620,14 @@ span.field-validation-error { .justify-end { justify-content: flex-end; } -.gap-4 { - gap: 1rem; -} -.gap-6 { - gap: 1.5rem; -} -.gap-x-4 { - column-gap: 1rem; +.gap-2 { + gap: 0.5rem; } .gap-x-3 { column-gap: 0.75rem; } -.space-y-6 > :not([hidden]) ~ :not([hidden]) { - --tw-space-y-reverse: 0; - margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse))); - margin-bottom: calc(1.5rem * var(--tw-space-y-reverse)); +.gap-x-4 { + column-gap: 1rem; } .space-y-2 > :not([hidden]) ~ :not([hidden]) { --tw-space-y-reverse: 0; @@ -700,20 +676,17 @@ span.field-validation-error { padding-top: 0.25rem; padding-bottom: 0.25rem; } -.py-2 { - padding-top: 0.5rem; - padding-bottom: 0.5rem; -} .py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; } +.py-2 { + padding-top: 0.5rem; + padding-bottom: 0.5rem; +} .pb-1 { padding-bottom: 0.25rem; } -.pl-4 { - padding-left: 1rem; -} .text-center { text-align: center; } @@ -735,9 +708,6 @@ span.field-validation-error { .font-bold { font-weight: 700; } -.font-semibold { - font-weight: 600; -} .font-medium { font-weight: 500; } @@ -748,14 +718,14 @@ span.field-validation-error { --tw-text-opacity: 1; color: rgb(107 114 128 / var(--tw-text-opacity)); } -.text-gray-800 { - --tw-text-opacity: 1; - color: rgb(31 41 55 / var(--tw-text-opacity)); -} .text-gray-600 { --tw-text-opacity: 1; color: rgb(75 85 99 / var(--tw-text-opacity)); } +.text-gray-800 { + --tw-text-opacity: 1; + color: rgb(31 41 55 / var(--tw-text-opacity)); +} .text-gray-900 { --tw-text-opacity: 1; color: rgb(17 24 39 / var(--tw-text-opacity));