Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .form-label to the labels for proper rendering #14806

Merged
merged 7 commits into from
Dec 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@
<h5>@T["Link"]</h5>

<div class="mb-3" asp-validation-class-for="LinkText">
<label asp-for="LinkText">@T["Link Text"]</label>
<label asp-for="LinkText" class="form-label">@T["Link Text"]</label>
<input asp-for="LinkText" class="form-control" />
<span asp-validation-for="LinkText"></span>
<span class="hint">@T["The Link Text as it will be shown in the tree."]</span>
</div>

<div class="mb-3">
<label asp-for="LinkUrl">@T["Link Url"]</label>
<label asp-for="LinkUrl" class="form-label">@T["Link Url"]</label>
<input asp-for="LinkUrl" class="form-control" />
<span class="hint">@T["The url of the link. A link will be shown only if it or one of their children have a url. The url will be relative to the root of the admin site"]</span>
</div>

<div class="mb-3">
<label asp-for="IconClass">@T["Icon"]</label>
<label asp-for="IconClass" class="form-label">@T["Icon"]</label>

<div class="input-group mb-3">
<div class="btn-toolbar" role="toolbar" aria-label="Icon Selector Toolbar">
Expand Down Expand Up @@ -80,7 +80,7 @@
<script asp-name="admin-menu-permission-picker" asp-src="~/OrchardCore.AdminMenu/Scripts/admin-menu-permission-picker.min.js" debug-src="~/OrchardCore.AdminMenu/Scripts/admin-menu-permission-picker.js" at="Foot" depends-on="vuejs, vue-multiselect"></script>
<style asp-name="admin-menu-permission-picker" asp-src="~/OrchardCore.AdminMenu/Styles/admin-menu-permission-picker.min.css" debug-src="~/OrchardCore.AdminMenu/Styles/admin-menu-permission-picker.css" depends-on="vue-multiselect"></style>

<label asp-for="SelectedPermissionNames">@T["Permissions"]</label>
<label asp-for="SelectedPermissionNames" class="form-label">@T["Permissions"]</label>

<div id="PermissionPicker" class="vue-multiselect" data-selected-items="@selectedItems" data-all-items="@allItems" v-cloak>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
<h5>@T["Placeholder"]</h5>

<div class="mb-3" asp-validation-class-for="LinkText">
<label asp-for="LinkText">@T["Link Text"]</label>
<label asp-for="LinkText" class="form-label">@T["Link Text"]</label>
<input asp-for="LinkText" class="form-control" />
<span asp-validation-for="LinkText"></span>
<span class="hint">@T["The text of the menu item as it will be shown in the tree."]</span>
</div>

<div class="mb-3">
<label asp-for="IconClass">@T["Icon"]</label>
<label asp-for="IconClass" class="form-label">@T["Icon"]</label>

<div class="input-group mb-3">
<div class="btn-toolbar" role="toolbar" aria-label="Icon Selector Toolbar">
Expand Down Expand Up @@ -70,7 +70,7 @@
<script asp-name="admin-menu-permission-picker" asp-src="~/OrchardCore.AdminMenu/Scripts/admin-menu-permission-picker.min.js" debug-src="~/OrchardCore.AdminMenu/Scripts/admin-menu-permission-picker.js" at="Foot" depends-on="vuejs, vue-multiselect"></script>
<style asp-name="admin-menu-permission-picker" asp-src="~/OrchardCore.AdminMenu/Styles/admin-menu-permission-picker.min.css" debug-src="~/OrchardCore.AdminMenu/Styles/admin-menu-permission-picker.css" depends-on="vue-multiselect"></style>

<label asp-for="SelectedPermissionNames">@T["Permissions"]</label>
<label asp-for="SelectedPermissionNames" class="form-label">@T["Permissions"]</label>

<div id="PermissionPicker" class="vue-multiselect" data-editor-type="PermissionPicker" data-selected-items="@selectedItems" data-all-items="@allItems" data-multiple="true">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<form asp-action="Create" method="post" class="no-multisubmit">
<div class="mb-3" asp-validation-class-for="Name">
<label asp-for="Name">@T["Name"]</label>
<label asp-for="Name" class="form-label">@T["Name"]</label>
<input asp-for="Name" class="form-control" autofocus />
<span asp-validation-for="Name" class="text-danger"></span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div asp-validation-summary="ModelOnly"></div>
<form asp-action="Edit" method="post" class="no-multisubmit">
<div class="mb-3" asp-validation-class-for="Name">
<label asp-for="Name">@T["Name"]</label>
<label asp-for="Name" class="form-label">@T["Name"]</label>
<input asp-for="Name" class="form-control" autofocus />
<span asp-validation-for="Name" class="text-danger"></span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<input type="checkbox" class="form-check-input" id="select-all">
<label class="form-check-label" for="select-all" id="select-all-label" title="@T["Select All"]"></label>
<label id="items" for="select-all">@T.Plural(Model.AdminMenu.Count, "1 item", "{0} items")<span class="text-muted" title="@T["Items {0} to {1}", startIndex, endIndex]">@T.Plural((int)Model.Pager.TotalItemCount, " / {0} item in total", " / {0} items in total")</span></label>
<label id="selected-items" class="text-muted" for="select-all"></label>
<label id="selected-items" class="text-muted form-label" for="select-all"></label>
</div>
</div>
<div class="col col-md-auto text-end">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
<input type="hidden" asp-for="AdminNodeType" />

<div class="mb-3">
<label asp-for="Priority">@T["Selection Priority"]</label>
<label asp-for="Priority" class="form-label">@T["Selection Priority"]</label>
<input asp-for="Priority" class="form-control col-md-2">
<span class="hint">@T["The priority of this link to be displayed as active instead of another one when both are pointing to the same url. The link with the highest value has the active status in the navigation."]</span>
</div>

<div class="mb-3">
<label asp-for="Position">@T["Position Order"]</label>
<label asp-for="Position" class="form-label">@T["Position Order"]</label>
<input asp-for="Position" class="form-control col-md-2">
<span class="hint">@T["The position order of this link in the admin menu."]</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<div class="mb-3 row">
<div class="col-sm-6">
<label asp-for="Options">@T["Options"]</label>
<label asp-for="Options" class="form-label">@T["Options"]</label>
<select asp-for="Options" class="form-select">
<option value="@AliasPartOptions.Editable" selected="@(Model.Options == AliasPartOptions.Editable)">@T["Alias is editable"]</option>
<option value="@AliasPartOptions.GeneratedDisabled" selected="@(Model.Options == AliasPartOptions.GeneratedDisabled)">@T["Alias is generated and input is disabled"]</option>
Expand All @@ -21,7 +21,7 @@
</div>
<div class="mb-3 row">
<div class="col-large col-12 col-sm-12 col-md-12 col-lg-12 col-xl-9">
<label asp-for="Pattern">@T["Pattern"]</label>
<label asp-for="Pattern" class="form-label">@T["Pattern"]</label>
<textarea asp-for="Pattern" rows="5" class="form-control"></textarea>
<span class="hint">@T["The pattern used to render the alias of this content type."]</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<section>
<div class="mb-3">
<label class="" for="Categories">@T["Events to record"]</label>
<label asp-for="Categories" class="form-label">@T["Events to record"]</label>
<table class="table table-hover">
<thead>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
</div>

<div class="mb-3" asp-validation-class-for="RetentionDays">
<label asp-for="RetentionDays">@T["Retention period"]</label>
<label asp-for="RetentionDays" class="form-label">@T["Retention period"]</label>
<input asp-for="RetentionDays" type="number" class="form-control" />
<span class="hint">@T["The number of days an event is retained."]</span>
</div>

<div class="mb-3" asp-validation-class-for="LastRunUtc">
<label asp-for="LastRunUtc">@T["Last run"]</label>
<label asp-for="LastRunUtc" class="form-label">@T["Last run"]</label>
<div class="form-control">@(Model.LastRunUtc.HasValue ? await DisplayAsync(await New.DateTime(Utc: Model.LastRunUtc.Value, Format: "g")) : T["Never"])</div>
<span class="hint">@T["The last time the trimming task was run."]</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<div class="mb-3 row">
<div class="col-large col-12 col-sm-12 col-md-12 col-lg-12 col-xl-9">
<label asp-for="Pattern">@T["Pattern"]</label>
<label asp-for="Pattern" class="form-label">@T["Pattern"]</label>
<textarea asp-for="Pattern" rows="5" class="form-control"></textarea>
<span class="hint">@T["The pattern used to render the custom url of this content type. With Liquid support."]</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<div class="mb-3">
<div class="w-sm-75 w-lg-75 w-xl-50">
<label asp-for="Hint">@T["Hint"]</label>
<label asp-for="Hint" class="form-label">@T["Hint"]</label>
<textarea asp-for="Hint" rows="2" class="form-control"></textarea>
</div>
<span class="hint">@T["The hint text to display for this field on the editor."]</span>
</div>

<div class="mb-3">
<div class="w-sm-75 w-lg-75 w-xl-50">
<label asp-for="Label">@T["Label"]</label>
<label asp-for="Label" class="form-label">@T["Label"]</label>
<input asp-for="Label" class="form-control" />
</div>
<span class="hint">@T["The text associated to the checkbox."]</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,23 @@
</div>

<div class="mb-3">
<label asp-for="Source">@T["Contained Content Types"]</label>
<label asp-for="Source" class="form-label">@T["Contained Content Types"]</label>
<div class="w-sm-50" id="@Html.IdFor(x => x.Source)">
<div class="form-check">
<input class="form-check-input" type="radio" asp-for="Source" id="SourceAll" value="@ContentPickerSettingType.AllTypes" checked="@(Model.Source == ContentPickerSettingType.AllTypes)">
<label for="SourceAll">
<label for="SourceAll" class="form-label">
@T["Display All Content Types"]
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" asp-for="Source" id="SourceContentTypes" value="@ContentPickerSettingType.ContentTypes" checked="@(Model.Source == ContentPickerSettingType.ContentTypes)">
<label for="SourceContentTypes">
<label for="SourceContentTypes" class="form-label">
@T["Content Types"]
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" asp-for="Source" id="SourceStereotypes" value="@ContentPickerSettingType.Stereotypes" checked="@(Model.Source == ContentPickerSettingType.Stereotypes)">
<label for="SourceStereotypes">
<label for="SourceStereotypes" class="form-label">
@T["Stereotype"] <span class="hint">@T["All content types of these Stereotypes"]</span>
</label>
</div>
Expand All @@ -52,29 +52,29 @@

<div class="mb-3" id="StereotypesContainer">
<div class="w-sm-50" id="@Html.IdFor(x => x.Source)">
<label asp-for="Stereotypes">@T["Stereotypes"]</label>
<label asp-for="Stereotypes" class="form-label">@T["Stereotypes"]</label>
<input asp-for="Stereotypes" class="form-control medium" />
<span class="hint">@T["The Stereotypes of the content types that this field can contain. You may define multiple Stereotypes using the comma (,) as a separator"]</span>
</div>
</div>

<div class="mb-3" id="ContentTypesContainer">
<label asp-for="DisplayedContentTypes">@T["Content Types"]</label>
<label asp-for="DisplayedContentTypes" class="form-label">@T["Content Types"]</label>
<span class="hint">@T["The content types to display. Choose at least one."]</span>
@await Component.InvokeAsync("SelectContentTypes", new { selectedContentTypes = Model.DisplayedContentTypes, htmlName = Html.NameFor(m => m.DisplayedContentTypes) })
</div>

<div class="mb-3">
<div class="w-md-75 w-xl-50 pe-md-3">
<label asp-for="Hint">@T["Hint"]</label>
<label asp-for="Hint" class="form-label">@T["Hint"]</label>
<textarea asp-for="Hint" rows="2" class="form-control"></textarea>
</div>
<span class="hint">@T["The hint text to display for this field on the editor."]</span>
</div>

<div class="mb-3">
<div class="-md-75 w-xl-50 pr-md-3">
<label asp-for="TitlePattern">@T["Title Pattern"]</label>
<label asp-for="TitlePattern" class="form-label">@T["Title Pattern"]</label>
<textarea asp-for="TitlePattern" rows="5" class="form-control"></textarea>
</div>
<span class="hint">@T["The pattern used to render the title in content picker. With Liquid support."]</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<div class="mb-3">
<div class="w-md-75 w-xl-50 pe-md-3">
<label asp-for="Hint">@T["Hint"]</label>
<label asp-for="Hint" class="form-label">@T["Hint"]</label>
<textarea asp-for="Hint" rows="2" class="form-control"></textarea>
</div>
<span class="hint">@T["The hint text to display for this field on the editor."]</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<div class="mb-3">
<div class="w-md-75 w-xl-50 pe-md-3">
<label asp-for="Hint">@T["Hint"]</label>
<label asp-for="Hint" class="form-label">@T["Hint"]</label>
<textarea asp-for="Hint" rows="2" class="form-control"></textarea>
</div>
<span class="hint">@T["The hint text to display for this field on the editor."]</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<div id="@Html.IdFor(m => m)" class="field-editor field-editor-monaco">
<div class="mb-3">
<label asp-for="Options">@T["Enter the editor options, language is always set to `html` when saved."]</label>
<label asp-for="Options" class="form-label">@T["Enter the editor options, language is always set to `html` when saved."]</label>
<div id="@Html.IdFor(m => m)_editor" style="min-height: 200px;" class="form-control"></div>
<span class="hint"><a href="https://microsoft.github.io/monaco-editor/typedoc/interfaces/editor.IStandaloneEditorConstructionOptions.html" target="_blank">@T["Documentation for options"]</a></span>
<textarea asp-for="Options" hidden>@Html.Raw(Model.Options)</textarea>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<div class="mb-3">
<div class="w-lg-75 w-xl-50">
<label asp-for="Hint">@T["Hint"]</label>
<label asp-for="Hint" class="form-label">@T["Hint"]</label>
<textarea asp-for="Hint" rows="2" class="form-control"></textarea>
</div>
<span class="hint">@T["The hint text to display for this field on the editor."]</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</div>
<div class="mb-3 row">
<div class="col-large col-12 col-sm-12 col-md-12 col-lg-12 col-xl-9">
<label asp-for="Options">@T["Enter the editor options"]</label>
<label asp-for="Options" class="form-label">@T["Enter the editor options"]</label>
<span class="hint"><a href="https://alex-d.github.io/Trumbowyg/documentation/#button-pane" target="_blank">@T["Documentation for options"]</a></span>
<textarea asp-for="Options" class="form-control" autofocus="autofocus"></textarea>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</div>
<div class="mb-3">
<div class="w-100 w-lg-75 w-xl-50">
<label asp-for="LinkTextMode">@T["Text"]</label>
<label asp-for="LinkTextMode" class="form-label">@T["Text"]</label>
<select asp-for="LinkTextMode" class="form-select">
<option value="@LinkTextMode.Optional" selected="@(Model.LinkTextMode == LinkTextMode.Optional)">@T["Text is optional"]</option>
<option value="@LinkTextMode.Required" selected="@(Model.LinkTextMode == LinkTextMode.Required)">@T["Text is required"]</option>
Expand All @@ -21,37 +21,37 @@
</div>
<div class="row">
<div class="mb-3 col-md-6">
<label asp-for="Hint">@T["Hint for the url"]</label>
<label asp-for="Hint" class="form-label">@T["Hint for the url"]</label>
<input asp-for="Hint" type="text" class="form-control" />
<span class="hint">@T["The hint text to display for the url on the editor."]</span>
</div>
<div class="mb-3 col-md-6">
<label asp-for="HintLinkText">@T["Hint for the text"]</label>
<label asp-for="HintLinkText" class="form-label">@T["Hint for the text"]</label>
<input asp-for="HintLinkText" type="text" class="form-control" />
<span class="hint">@T["The hint text to display for the text of the link on the editor."]</span>
</div>
</div>
<div class="row">
<div class="mb-3 col-md-6">
<label asp-for="UrlPlaceholder">@T["Watermark for the url"]</label>
<label asp-for="UrlPlaceholder" class="form-label">@T["Watermark for the url"]</label>
<input asp-for="UrlPlaceholder" type="text" class="form-control" />
<span class="hint">@T["A hint (placeholder) to display when the input of the url is empty."]</span>
</div>
<div class="mb-3 col-md-6">
<label asp-for="TextPlaceholder">@T["Watermark for the text"]</label>
<label asp-for="TextPlaceholder" class="form-label">@T["Watermark for the text"]</label>
<input asp-for="TextPlaceholder" type="text" class="form-control" />
<span class="hint">@T["A hint (placeholder) to display when the input of the text is empty."]</span>
</div>
</div>
<div class="row">
<div class="mb-3 col-md-6">
<label asp-for="DefaultUrl">@T["Default value of the url"]</label>
<label asp-for="DefaultUrl" class="form-label">@T["Default value of the url"]</label>
<input asp-for="DefaultUrl" type="text" class="form-control" />
<span class="hint">@T["A valid url proposed when creating a content item."]</span>
<span asp-validation-for="DefaultUrl" class="text-danger"></span>
</div>
<div class="mb-3 col-md-6">
<label asp-for="DefaultText">@T["Default value of the text"]</label>
<label asp-for="DefaultText" class="form-label">@T["Default value of the text"]</label>
<input asp-for="DefaultText" type="text" class="form-control" />
<span class="hint">@T["The default link text proposed when creating a content item."]</span>
<span asp-validation-for="DefaultText" class="text-danger"></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
</div>

<div class="mb-3">
<label asp-for="DisplayedContentTypes">@T["Content Types"]</label>
<label asp-for="DisplayedContentTypes" class="form-label">@T["Content Types"]</label>
<span class="hint">@T["The content types to display. Choose at least one."]</span>
@await Component.InvokeAsync("SelectContentTypes", new { selectedContentTypes = Model.DisplayedContentTypes, htmlName = Html.NameFor(m => m.DisplayedContentTypes) })
</div>

<div class="mb-3">
<div class="w-md-75 w-xl-50 pe-md-3">
<label asp-for="Hint">@T["Hint"]</label>
<label asp-for="Hint" class="form-label">@T["Hint"]</label>
<textarea asp-for="Hint" rows="2" class="form-control"></textarea>
</div>
<span class="hint">@T["The hint text to display for this field on the editor."]</span>
Expand Down
Loading