<commit_before>using System.Threading.Tasks;
using OrchardCore.ContentFields.Fields;
using OrchardCore.ContentFields.ViewModels;
using OrchardCore.ContentManagement.Metadata.Models;
using OrchardCore.ContentTypes.Editors;
using OrchardCore.DisplayManagement.Views;

namespace OrchardCore.ContentFields.Settings
{
    public class HtmlFieldSettingsDriver : ContentPartFieldDefinitionDisplayDriver<HtmlField>
    {
        public override IDisplayResult Edit(ContentPartFieldDefinition partFieldDefinition)
        {
            return Initialize<HtmlSettingsViewModel>("HtmlFieldSettings_Edit", model =>
            {
                var settings = partFieldDefinition.GetSettings<HtmlFieldSettings>();

                model.SanitizeHtml = settings.SanitizeHtml;
                model.Hint = settings.Hint;
            })
            .Location("Editor");
        }

        public override async Task<IDisplayResult> UpdateAsync(ContentPartFieldDefinition partFieldDefinition, UpdatePartFieldEditorContext context)
        {
            var model = new HtmlSettingsViewModel();
            var settings = new HtmlFieldSettings();

            await context.Updater.TryUpdateModelAsync(model, Prefix);

            settings.SanitizeHtml = model.SanitizeHtml;
            settings.Hint = model.Hint;

            context.Builder.WithSettings(settings);

            return Edit(partFieldDefinition);
        }
    }
}<commit_msg>Fix HtmlFieldSettings not showing up (#7175)<commit_after>using System.Threading.Tasks;
using OrchardCore.ContentFields.Fields;
using OrchardCore.ContentFields.ViewModels;
using OrchardCore.ContentManagement.Metadata.Models;
using OrchardCore.ContentTypes.Editors;
using OrchardCore.DisplayManagement.Views;

namespace OrchardCore.ContentFields.Settings
{
    public class HtmlFieldSettingsDriver : ContentPartFieldDefinitionDisplayDriver<HtmlField>
    {
        public override IDisplayResult Edit(ContentPartFieldDefinition partFieldDefinition)
        {
            return Initialize<HtmlSettingsViewModel>("HtmlFieldSettings_Edit", model =>
            {
                var settings = partFieldDefinition.GetSettings<HtmlFieldSettings>();

                model.SanitizeHtml = settings.SanitizeHtml;
                model.Hint = settings.Hint;
            })
            .Location("Content");
        }

        public override async Task<IDisplayResult> UpdateAsync(ContentPartFieldDefinition partFieldDefinition, UpdatePartFieldEditorContext context)
        {
            var model = new HtmlSettingsViewModel();
            var settings = new HtmlFieldSettings();

            await context.Updater.TryUpdateModelAsync(model, Prefix);

            settings.SanitizeHtml = model.SanitizeHtml;
            settings.Hint = model.Hint;

            context.Builder.WithSettings(settings);

            return Edit(partFieldDefinition);
        }
    }
}
{'fraction_non_alphanumeric': 0.07311157311157311, 'fraction_numerical': 0.001386001386001386, 'mean_word_length': 3.0434173669467786, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4048852', 'n_tokens_mistral': 705, 'n_tokens_neox': 683, 'n_words': 125}