Feature/maxlengthsetting#8719
Conversation
# Conflicts: # src/Orchard.Web/Modules/Orchard.Taxonomies/Settings/TaxonomyFieldEditorEvents.cs
| @using Orchard.Utility.Extensions; | ||
| @{ | ||
| string editorFlavor = Model.EditorFlavor; | ||
| var htmlAttributes = (Dictionary<string, object>)Model.HtmlAttributes; |
There was a problem hiding this comment.
There should be a "behavior" attached to this HtmlAttributes property that will initialize the dictionary automatically to prevent such tests. Can you try?
…ge the constant introduced previously
| }; | ||
| var htmlAttributes = (Dictionary<string, object>)Model.HtmlAttributes; | ||
|
|
||
| if (htmlAttributes == null) { |
There was a problem hiding this comment.
Can you try to set the attributes even if Model.HtmlAttributes is null, meaning don't check for it, just assign it and see if that works (some magic we made in Orchard1).
There was a problem hiding this comment.
I tried, it doesn't work.
Anyway I found a bug introduced in the last commit and I fixed it and tested everything from scratch.
There was a problem hiding this comment.
I think it's because the existing property on the shapes is named Attributes. Can you try to use this one and even doing something like Model.Attributes["required"] = "required" for instance?
And it also already has a IList<string> Classes property which isn't null.
|
|
||
| public class TitlePartSettings { | ||
| // Whenever this constant is changed a new migration step must be created to update the length of the field on the DB | ||
| public const int MAX_TITLE_LENGTH = 1024; |
There was a problem hiding this comment.
Pascal case
| public const int MAX_TITLE_LENGTH = 1024; | |
| public const int MaxTitleLength = 1024; |
|
@AndreaPiovanelliLaser let me know if you think we should review it again? |
|
He only changed the the casing to PascalCase per your September recommendation. |
As Matteo said, I only changed the casing of the MaxTitleLength const, so I think this pr is safe to be merged. |
Implemented what was described in the #8718 issue