Skip to content

Commit 07b85d1

Browse files
author
Daniel Jacinto
committed
add red start for required label in form groups.
1 parent 8528374 commit 07b85d1

4 files changed

Lines changed: 11 additions & 2 deletions

File tree

src/Bootstrap/dist/css/bootstrap-theme.css

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Bootstrap/less/theme/base.less

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,11 @@ img.reserved-indicator-icon {
426426
cursor: pointer;
427427
}
428428

429+
.form-group label.required::after {
430+
color: red;
431+
content: " *";
432+
}
433+
429434
// Workaround. See https://github.com/NuGet/NuGetGallery/issues/8264
430435
@media (max-width: 767.9px) {
431436
.hidden-xs {

src/NuGetGallery/ExtensionMethods.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public static HtmlString ShowLabelFor<TModel, TProperty>(this HtmlHelper<TModel>
124124
return html.LabelFor(expression, labelText, new
125125
{
126126
id = $"{propertyName}-label",
127-
@class = "required"
127+
@class = "control-label required"
128128
});
129129
}
130130
else

src/NuGetGallery/Views/Users/ForgotPassword.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
@Html.AntiForgeryToken()
2626

2727
<div class="form-group @Html.HasErrorFor(m => m.Email)">
28-
@Html.ShowLabelFor(m => m.Email)
28+
@Html.ShowLabelFor(m => m.Email, isrequired: true)
2929
@Html.ShowTextBoxFor(m => m.Email)
3030
@Html.ShowValidationMessagesFor(m => m.Email)
3131
</div>

0 commit comments

Comments
 (0)