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

Fix alert view #14508

Merged
merged 1 commit into from
Oct 14, 2023
Merged
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
9 changes: 8 additions & 1 deletion src/OrchardCore.Themes/TheAdmin/Views/Message.cshtml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
@{
string type = Model.Type.ToString().ToLowerInvariant();
var bsClassName = type switch
{
"information" => "alert-info",
"error" => "alert-danger",
_ => $"alert-{type}",
};
}
<div class="alert alert-dismissible fade show message-@type alert-@type" role="alert">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the wrong with the previous one alert-@type is fine for me

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because alert-information does not work

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, is the enum values like this from the beginning?!!


<div class="alert alert-dismissible @bsClassName fade show message-@type" role="alert">
@Model.Message
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>