diff --git a/BSolutions.Bocons/BSolutions.Bocons.Test/Models/Forms/RegisterViewModel.cs b/BSolutions.Bocons/BSolutions.Bocons.Test/Models/Forms/RegisterViewModel.cs index 865ebd4..fd497d0 100644 --- a/BSolutions.Bocons/BSolutions.Bocons.Test/Models/Forms/RegisterViewModel.cs +++ b/BSolutions.Bocons/BSolutions.Bocons.Test/Models/Forms/RegisterViewModel.cs @@ -1,6 +1,7 @@ using Microsoft.AspNetCore.Mvc.Rendering; using System; using System.Collections.Generic; +using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Threading.Tasks; @@ -16,7 +17,7 @@ public class RegisterViewModel [Required] public string Name { get; set; } - [Display(Name = "Email Address")] + [DisplayName("E-Mail Adresse")] [Required] [EmailAddress] public string Email { get; set; } diff --git a/BSolutions.Bocons/BSolutions.Bocons.Test/Views/Forms/Register.cshtml b/BSolutions.Bocons/BSolutions.Bocons.Test/Views/Forms/Register.cshtml index fbf28cd..2a9019f 100644 --- a/BSolutions.Bocons/BSolutions.Bocons.Test/Views/Forms/Register.cshtml +++ b/BSolutions.Bocons/BSolutions.Bocons.Test/Views/Forms/Register.cshtml @@ -7,18 +7,21 @@
- + @* - - - - + *@ + @* + + *@ + + + @* - + *@
diff --git a/BSolutions.Bocons/BSolutions.Bocons/BSolutions.Bocons.csproj b/BSolutions.Bocons/BSolutions.Bocons/BSolutions.Bocons.csproj index cfa8a77..cbe8f8a 100644 --- a/BSolutions.Bocons/BSolutions.Bocons/BSolutions.Bocons.csproj +++ b/BSolutions.Bocons/BSolutions.Bocons/BSolutions.Bocons.csproj @@ -32,7 +32,7 @@ - + diff --git a/BSolutions.Bocons/BSolutions.Bocons/Controls/Buttons/ButtonDropdownTagHelper.cs b/BSolutions.Bocons/BSolutions.Bocons/Controls/Buttons/ButtonDropdownTagHelper.cs index e3a44be..8800642 100644 --- a/BSolutions.Bocons/BSolutions.Bocons/Controls/Buttons/ButtonDropdownTagHelper.cs +++ b/BSolutions.Bocons/BSolutions.Bocons/Controls/Buttons/ButtonDropdownTagHelper.cs @@ -80,7 +80,6 @@ protected override async Task RenderProcessAsync(TagHelperContext context, TagHe { output.AddCssClass("dropdown-toggle"); output.MergeAttribute("type", "button"); - output.MergeAttribute("id", this.Id); output.MergeAttribute("data-toggle", "dropdown"); output.MergeAttribute("aria-haspopup", "true"); output.MergeAttribute("aria-expanded", "false"); @@ -100,7 +99,6 @@ private TagBuilder DropdownButtonBuilder() TagBuilder button = new TagBuilder("button"); button.AddCssClass("btn dropdown-toggle"); button.MergeAttribute("type", "button"); - button.MergeAttribute("id", this.Id); button.MergeAttribute("data-toggle", "dropdown"); button.MergeAttribute("aria-haspopup", "true"); button.MergeAttribute("aria-expanded", "false"); diff --git a/BSolutions.Bocons/BSolutions.Bocons/Controls/Components/ProgressTagHelper.cs b/BSolutions.Bocons/BSolutions.Bocons/Controls/Components/ProgressTagHelper.cs index 37379b6..0553778 100644 --- a/BSolutions.Bocons/BSolutions.Bocons/Controls/Components/ProgressTagHelper.cs +++ b/BSolutions.Bocons/BSolutions.Bocons/Controls/Components/ProgressTagHelper.cs @@ -50,6 +50,9 @@ protected override void RenderProcess(TagHelperContext context, TagHelperOutput output.TagMode = TagMode.StartTagAndEndTag; output.AddCssClass("progress"); + // Height + output.AddCssStyle("height", $"{this.Height}px"); + output.Content.SetHtmlContent(this.BuildProgressbar()); } @@ -63,7 +66,7 @@ private TagBuilder BuildProgressbar() progressbar.MergeAttribute("aria-valuemax", "100"); progressbar.MergeAttribute("aria-valuenow", this.Value.ToString()); progressbar.MergeAttribute("role", "progressbar"); - progressbar.MergeAttribute("style", $"width: {this.Value}%; height: {this.Height}px"); + progressbar.MergeAttribute("style", $"width: {this.Value}%;"); // Label if (this.HasLabel) diff --git a/BSolutions.Bocons/BSolutions.Bocons/Controls/Forms/ValidationTagHelper.cs b/BSolutions.Bocons/BSolutions.Bocons/Controls/Forms/ValidationTagHelper.cs index 634fc9a..5177014 100644 --- a/BSolutions.Bocons/BSolutions.Bocons/Controls/Forms/ValidationTagHelper.cs +++ b/BSolutions.Bocons/BSolutions.Bocons/Controls/Forms/ValidationTagHelper.cs @@ -51,15 +51,15 @@ protected override void RenderProcess(TagHelperContext context, TagHelperOutput } } - public static IHtmlContent Generate(ModelExpression model, ViewContext viewContext) + public static IHtmlContent Generate(FormTagHelperBase tagHelper) { var builder = new TagBuilder("div") { TagRenderMode = TagRenderMode.Normal }; builder.AddCssClass("invalid-feedback"); - builder.MergeAttribute("data-valmsg-for", model.Metadata.PropertyName); + builder.MergeAttribute("data-valmsg-for", tagHelper.Id); builder.MergeAttribute("data-valmsg-replace", "true"); // Error Message - var modelState = viewContext.ViewData.ModelState.FirstOrDefault(k => k.Key == model.Metadata.PropertyName).Value; + var modelState = tagHelper.ViewContext.ViewData.ModelState.FirstOrDefault(k => k.Key == tagHelper.For.Metadata.PropertyName).Value; if (modelState != null && modelState.ValidationState == ModelValidationState.Invalid) { builder.AddCssClass("field-validation-error"); diff --git a/BSolutions.Bocons/BSolutions.Bocons/Rendering/FormTagHelperRendering.cs b/BSolutions.Bocons/BSolutions.Bocons/Rendering/FormTagHelperRendering.cs index 8dd234d..fd5667c 100644 --- a/BSolutions.Bocons/BSolutions.Bocons/Rendering/FormTagHelperRendering.cs +++ b/BSolutions.Bocons/BSolutions.Bocons/Rendering/FormTagHelperRendering.cs @@ -24,7 +24,7 @@ internal static void RenderValidation(this BoconsFormTagHelperBase tagHelper, Ta // Validation Message if (tagHelper.For != null && tagHelper.Validation) { - output.PostElement.AppendHtml(ValidationTagHelper.Generate(tagHelper.For, tagHelper.ViewContext)); + output.PostElement.AppendHtml(ValidationTagHelper.Generate(tagHelper)); } } diff --git a/docs/ChangeLog.md b/docs/ChangeLog.md index 2916e29..e6b776c 100644 --- a/docs/ChangeLog.md +++ b/docs/ChangeLog.md @@ -1,15 +1,18 @@ -# Change Logs & Releases +# Change Log and Releases In this page, you can find a record of all the changes made to Bocons such as bug fixes, new features, etc. -## Version 2.4.0 Oct. 09, 2018 +## Version 2.4.0 Dec. 21, 2018 -This release of Bocons supports Bootstrap 4.1.3 and comes with many extensions, bugfixes and a new documentation published on GitHub. +This release of Bocons supports Bootstrap 4.1.3 and comes with some bugfixes and small changes requested by the community.
    -
  • Input: Support for Bootstrap Buttons with Tag Helper.
  • +
  • Input: Support for Bootstrap Buttons with <input type="button" /> Tag Helper.
  • Add support for Target Framework netstandard1.6.
  • Table: The attribute bc-bordered has been replaced by the bc-border attribute.
  • +
  • Switch from bower package manager to Yarn.
  • +
  • Form Controls: Wrong for attribute generated in label tags.
  • +
  • Progress: Height applied to wrong tag.