-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Feature/maxlengthsetting #8719
Feature/maxlengthsetting #8719
Conversation
# Conflicts: # src/Orchard.Web/Modules/Orchard.Taxonomies/Settings/TaxonomyFieldEditorEvents.cs
@@ -1,10 +1,16 @@ | |||
@using Orchard.Utility.Extensions; | |||
@{ | |||
string editorFlavor = Model.EditorFlavor; | |||
var htmlAttributes = (Dictionary<string, object>)Model.HtmlAttributes; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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