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

Use form-select class for select element instead of form-control #11816

Merged
merged 3 commits into from
Jun 7, 2022
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 @@ -15,7 +15,7 @@
<div class="mb-3">
<label asp-for="Values">@Model.PartFieldDefinition.DisplayName()</label>
<div class="row col-md-6 col-lg-4">
<select class="form-control content-preview-select" asp-for="Values" asp-items="options" multiple
<select class="form-select content-preview-select" asp-for="Values" asp-items="options" multiple
style="min-height: 200px"></select>
</div>
@if (!String.IsNullOrEmpty(settings.Hint))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div class="row">
<div class="col-md-6 col-lg-4">
<label asp-for="Value">@name</label>
<select asp-for="Value" class="form-control content-preview-select">
<select asp-for="Value" class="form-select content-preview-select">
@if (!settings.Required)
{
<option value="">@T["None"]</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
@if (listSettings.Editor == EditorOption.Dropdown)
{
<label asp-for="Text">@Model.PartFieldDefinition.DisplayName()</label>
<select class="form-control content-preview-select" asp-for="Text" asp-items="options"></select>
<select class="form-select content-preview-select" asp-for="Text" asp-items="options"></select>
}

@if (!String.IsNullOrEmpty(settings.Hint))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<div class="mb-3 field-display field-display-header">
<label asp-for="Level">@T["Select the header level to use"]</label>
<select asp-for="Level" class="form-control col-sm-3">
<select asp-for="Level" class="form-select col-sm-3">
<option value="h1">@T["H1"]</option>
<option value="h2">@T["H2"]</option>
<option value="h3">@T["H3"]</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
<div class="card-body">
<div class="mb-3" asp-validation-class-for="ChangeFrequency">
<label asp-for="ChangeFrequency">@T["Change Frequency"] </label>
<select asp-for="ChangeFrequency" class="form-control w-25" asp-items="Html.GetEnumSelectList<ChangeFrequency>()"></select>
<select asp-for="ChangeFrequency" class="form-select w-25" asp-items="Html.GetEnumSelectList<ChangeFrequency>()"></select>
<span class="hint">@T["The default frequency with which these content types are likely to change."]</span>
</div>
<div class="mb-3" asp-validation-class-for="Priority">
<label asp-for="Priority">@T["Priority"] </label>
<select asp-for="Priority" class="form-control w-25">
<select asp-for="Priority" class="form-select w-25">
<option value="0">@T["0.0"]</option>
<option value="1">@T["0.1"]</option>
<option value="2">@T["0.2"]</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<div class="mb-3" asp-validation-class-for="DeliveryMethod">
<label asp-for="DeliveryMethod">@T["Delivery method"]</label>
<select asp-for="DeliveryMethod" class="form-control">
<select asp-for="DeliveryMethod" class="form-select">
<option value="@SmtpDeliveryMethod.Network" selected="@(SmtpDeliveryMethod.Network == Model.DeliveryMethod)" data-bs-target="#@Html.Id("NetworkOptions")">
@T["Network"]
</option>
Expand Down Expand Up @@ -79,7 +79,7 @@

<div id="@Html.Id("SelectEncryptionMethod")" class="mb-3" asp-validation-class-for="EncryptionMethod">
<label asp-for="EncryptionMethod">@T["Encryption method to use"]</label>
<select asp-for="EncryptionMethod" class="form-control" disabled="@Model.AutoSelectEncryption">
<select asp-for="EncryptionMethod" class="form-select" disabled="@Model.AutoSelectEncryption">
<option value="@SmtpEncryptionMethod.None" selected="@(SmtpEncryptionMethod.None == Model.EncryptionMethod ? true : false)">
@T["None"] - @T["Connect to server using insecure connection."]
</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<div class="mb-3">
<label asp-for="Type">@T["Type"]</label>
<select asp-for="Type" class="form-control content-preview-select">
<select asp-for="Type" class="form-select content-preview-select">
<option value="submit">Submit</option>
<option value="button">Button</option>
<option value="reset">Reset</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<div class="mb-3">
<label asp-for="Method">@T["Method"]</label>
<select asp-for="Method" class="form-control content-preview-select">
<select asp-for="Method" class="form-select content-preview-select">
<option value="POST">POST</option>
<option value="GET">GET</option>
</select>
Expand All @@ -18,7 +18,7 @@

<div class="mb-3">
<label asp-for="EncType">@T["EncType"]</label>
<select asp-for="EncType" class="form-control content-preview-select">
<select asp-for="EncType" class="form-select content-preview-select">
<option value="application/x-www-form-urlencoded">application/x-www-form-urlencoded </option>
<option value="multipart/form-data">multipart/form-data</option>
<option value="text/plain">text/plain</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<div class="mb-3">
<label asp-for="Type">@T["Type"]</label>
<select asp-for="Type" class="form-control content-preview-select">
<select asp-for="Type" class="form-select content-preview-select">
<option value="text">@T["Text"]</option>
<option value="number">@T["Number"]</option>
<option value="email">@T["Email"]</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
var fieldName = formInputElementPart.Name;
var fieldId = !string.IsNullOrEmpty(elementId) ? elementId : !string.IsNullOrEmpty(fieldName) ? Html.GenerateIdFromName(fieldName) : default(string);
var fieldValue = Model.Value.DefaultValue;
var fieldClass = "form-control";
var fieldClass = "form-select";

if (ViewData.ModelState.TryGetValue(fieldName, out var fieldEntry))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<div class="form-g mb-3" asp-validation-class-for="SelectedWidth">
<div class="w-100 w-md-50">
<label asp-for="SelectedWidth">@T["Width"]</label>
<select asp-for="SelectedWidth" asp-items="@Model.AvailableWidths" class="form-control content-preview-select" asp-validation-class-for="SelectedWidth"></select>
<select asp-for="SelectedWidth" asp-items="@Model.AvailableWidths" class="form-select content-preview-select" asp-validation-class-for="SelectedWidth"></select>
<span asp-validation-for="SelectedWidth"></span>
<input type="number" asp-for="CustomWidth" class="form-control mt-3" style="@(Model.CustomWidth != 0 ? "" : "display: none;")"/>
<span asp-validation-for="CustomWidth"></span>
Expand All @@ -42,7 +42,7 @@
<div class="form-g mb-3" asp-validation-class-for="SelectedHeight">
<div class="w-100 w-md-50">
<label asp-for="SelectedHeight">@T["Height"]</label>
<select asp-for="SelectedHeight" asp-items="@Model.AvailableHeights" class="form-control content-preview-select" asp-validation-class-for="SelectedHeight"></select>
<select asp-for="SelectedHeight" asp-items="@Model.AvailableHeights" class="form-select content-preview-select" asp-validation-class-for="SelectedHeight"></select>
<span asp-validation-for="SelectedHeight"></span>
<input type="number" asp-for="CustomHeight" class="form-control mt-3" style="@(Model.CustomHeight != 0 ? "" : "display: none;")"/>
<span asp-validation-for="CustomHeight"></span>
Expand All @@ -55,7 +55,7 @@
<div class="form-g mb-3" asp-validation-class-for="SelectedMode">
<div class="w-100 w-md-50">
<label asp-for="SelectedMode">@T["Resize Mode"]</label>
<select asp-for="SelectedMode" asp-items="Model.AvailableResizeModes" class="form-control content-preview-select" asp-validation-class-for="SelectedMode"></select>
<select asp-for="SelectedMode" asp-items="Model.AvailableResizeModes" class="form-select content-preview-select" asp-validation-class-for="SelectedMode"></select>
<span asp-validation-for="SelectedMode"></span>
</div>
<div class="w-100">
Expand All @@ -77,7 +77,7 @@
<div class="form-g mb-3" asp-validation-class-for="SelectedFormat">
<div class="w-100 w-md-50">
<label asp-for="SelectedFormat">@T["Format"]</label>
<select asp-for="SelectedFormat" asp-items="Model.AvailableFormats" class="form-control content-preview-select" asp-validation-class-for="SelectedFormat"></select>
<select asp-for="SelectedFormat" asp-items="Model.AvailableFormats" class="form-select content-preview-select" asp-validation-class-for="SelectedFormat"></select>
<span asp-validation-for="SelectedFormat"></span>
</div>
<div class="w-100">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<div class="form-g mb-3" asp-validation-class-for="SelectedWidth">
<div class="w-100 w-md-50">
<label asp-for="SelectedWidth">@T["Width"]</label>
<select asp-for="SelectedWidth" asp-items="@Model.AvailableWidths" class="form-control content-preview-select" asp-validation-class-for="SelectedWidth"></select>
<select asp-for="SelectedWidth" asp-items="@Model.AvailableWidths" class="form-select content-preview-select" asp-validation-class-for="SelectedWidth"></select>
<span asp-validation-for="SelectedWidth"></span>
<input type="number" asp-for="CustomWidth" class="form-control mt-3" style="@(Model.CustomWidth != 0 ? "" : "display: none;")" />
<span asp-validation-for="CustomWidth"></span>
Expand All @@ -43,7 +43,7 @@
<div class="form-g mb-3" asp-validation-class-for="SelectedHeight">
<div class="w-100 w-md-50">
<label asp-for="SelectedHeight">@T["Height"]</label>
<select asp-for="SelectedHeight" asp-items="@Model.AvailableHeights" class="form-control content-preview-select" asp-validation-class-for="SelectedHeight"></select>
<select asp-for="SelectedHeight" asp-items="@Model.AvailableHeights" class="form-select content-preview-select" asp-validation-class-for="SelectedHeight"></select>
<span asp-validation-for="SelectedHeight"></span>
<input type="number" asp-for="CustomHeight" class="form-control mt-3" style="@(Model.CustomHeight != 0 ? "" : "display: none;")" />
<span asp-validation-for="CustomHeight"></span>
Expand All @@ -56,7 +56,7 @@
<div class="form-g mb-3" asp-validation-class-for="SelectedMode">
<div class="w-100 w-md-50">
<label asp-for="SelectedMode">@T["Resize Mode"]</label>
<select asp-for="SelectedMode" asp-items="Model.AvailableResizeModes" class="form-control content-preview-select" asp-validation-class-for="SelectedMode"></select>
<select asp-for="SelectedMode" asp-items="Model.AvailableResizeModes" class="form-select content-preview-select" asp-validation-class-for="SelectedMode"></select>
<span asp-validation-for="SelectedMode"></span>
</div>
<div class="w-100">
Expand All @@ -78,7 +78,7 @@
<div class="form-g mb-3" asp-validation-class-for="SelectedFormat">
<div class="w-100 w-md-50">
<label asp-for="SelectedFormat">@T["Format"]</label>
<select asp-for="SelectedFormat" asp-items="Model.AvailableFormats" class="form-control content-preview-select" asp-validation-class-for="SelectedFormat"></select>
<select asp-for="SelectedFormat" asp-items="Model.AvailableFormats" class="form-select content-preview-select" asp-validation-class-for="SelectedFormat"></select>
<span asp-validation-for="SelectedFormat"></span>
</div>
<div class="w-100">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
</div>
<div class="mb-3" asp-validation-class-for="ChangeFrequency">
<label asp-for="ChangeFrequency">@T["Change Frequency"] </label>
<select asp-for="ChangeFrequency" class="form-control w-25" asp-items="Html.GetEnumSelectList<ChangeFrequency>()"></select>
<select asp-for="ChangeFrequency" class="form-select w-25" asp-items="Html.GetEnumSelectList<ChangeFrequency>()"></select>
<span class="hint">@T["The default frequency with which this path is likely to change."]</span>
</div>
<div class="mb-3" asp-validation-class-for="Priority">
<label asp-for="Priority">@T["Priority"] </label>
<select asp-for="Priority" class="form-control w-25">
<select asp-for="Priority" class="form-select w-25">
<option value="0">@T["0.0"]</option>
<option value="1">@T["0.1"]</option>
<option value="2">@T["0.2"]</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}
<div class="mb-3" asp-validation-class-for="TermContentType">
<label asp-for="TermContentType" >@T["Term Content Type"]</label>
<select asp-for="TermContentType" class="form-control col-small" asp-items="@(new SelectList(termContentTypes, "Name", "DisplayName"))">
<select asp-for="TermContentType" class="form-select col-small" asp-items="@(new SelectList(termContentTypes, "Name", "DisplayName"))">
</select>
<span asp-validation-for="TermContentType"></span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
</h6>
<div class="row" asp-validation-class-for="FeatureProfile">
<div class="mb-3 col-md-6">
<select asp-for="FeatureProfile" asp-items="Model.FeatureProfiles" class="form-control"></select>
<select asp-for="FeatureProfile" asp-items="Model.FeatureProfiles" class="form-select"></select>
</div>
</div>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</h6>
<div class="row recipes" asp-validation-class-for="RecipeName">
<div class="mb-3 col-md-6">
<select asp-for="RecipeName" class="form-control">
<select asp-for="RecipeName" class="form-select">

<option value=""></option>
@foreach (var recipe in Model.Recipes)
Expand All @@ -71,7 +71,7 @@
{
<div class="mb-3 col-md-6">
<label asp-for="DatabaseProvider">@T["What type of database to use?"]</label>
<select asp-for="DatabaseProvider" class="form-control">
<select asp-for="DatabaseProvider" class="form-select">
<option value="" data-connection-string="false">@T["None"]</option>
@foreach (var provider in DatabaseProviders)
{
Expand Down Expand Up @@ -108,7 +108,7 @@
</h6>
<div class="row" asp-validation-class-for="FeatureProfile">
<div class="mb-3 col-md-6">
<select asp-for="FeatureProfile" asp-items="Model.FeatureProfiles" class="form-control"></select>
<select asp-for="FeatureProfile" asp-items="Model.FeatureProfiles" class="form-select"></select>
</div>
</div>
}
Expand Down