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

unique class names for named parts fields #14547

Merged
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@using OrchardCore.Mvc.Utilities
@{
var settings = Model.PartFieldDefinition.GetSettings<BooleanFieldSettings>();
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<div class="@Orchard.GetWrapperCssClasses("field-wrapper", $"field-wrapper-{uniqueName.HtmlClassify()}")" id="@Html.IdFor(x => x.Value)_FieldWrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@{
var settings = Model.PartFieldDefinition.GetSettings<BooleanFieldSettings>();
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<div class="@Orchard.GetWrapperCssClasses("field-wrapper", $"field-wrapper-{uniqueName.HtmlClassify()}")" id="@Html.IdFor(x => x.Value)_FieldWrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
var selectedItems = JsonConvert.SerializeObject(Model.SelectedItems, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() });
var partName = Model.PartFieldDefinition.PartDefinition.Name;
var fieldName = Model.PartFieldDefinition.Name;
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
var searchUrl = Url.RouteUrl(new { area = "OrchardCore.ContentFields", controller = "ContentPickerAdmin", action = "SearchContentItems", part = partName, field = fieldName });
var vueElementId = $"ContentPicker_{partName}_{fieldName}_{Guid.NewGuid().ToString("n")}";
var multiple = settings.Multiple.ToString().ToLowerInvariant();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@using OrchardCore.Mvc.Utilities
@{
var settings = Model.PartFieldDefinition.GetSettings<DateFieldSettings>();
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<script asp-name="jQuery-ui-i18n" at="Foot"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@using OrchardCore.Mvc.Utilities
@{
var settings = Model.PartFieldDefinition.GetSettings<DateTimeFieldSettings>();
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}
<script asp-name="jQuery-ui-i18n" at="Foot"></script>
<div class="@Orchard.GetWrapperCssClasses("field-wrapper", $"field-wrapper-{uniqueName.HtmlClassify()}")" id="@Html.IdFor(x => x.LocalDateTime)_FieldWrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
var settings = Model.PartFieldDefinition.GetSettings<HtmlFieldSettings>();
var monacoSettings = Model.PartFieldDefinition.GetSettings<HtmlFieldMonacoEditorSettings>();
var culture = await Orchard.GetContentCultureAsync(Model.Field.ContentItem);
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<div class="@Orchard.GetWrapperCssClasses("field-wrapper", $"field-wrapper-{uniqueName.HtmlClassify()}")" id="@Html.IdFor(x => x.Html)_FieldWrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@{
var settings = Model.PartFieldDefinition.GetSettings<HtmlFieldSettings>();
var culture = await Orchard.GetContentCultureAsync(Model.Field.ContentItem);
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<div class="@Orchard.GetWrapperCssClasses("field-wrapper", $"field-wrapper-{uniqueName.HtmlClassify()}")" id="@Html.IdFor(x => x.Html)_FieldWrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
var settings = Model.PartFieldDefinition.GetSettings<HtmlFieldSettings>();
var trumbowygSettings = Model.PartFieldDefinition.GetSettings<HtmlFieldTrumbowygEditorSettings>();
var culture = await Orchard.GetContentCultureAsync(Model.Field.ContentItem);
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<script asp-name="trumbowyg-plugins" depends-on="admin" version="2" at="Foot"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@{
var settings = Model.PartFieldDefinition.GetSettings<HtmlFieldSettings>();
var culture = await Orchard.GetContentCultureAsync(Model.Field.ContentItem);
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<style asp-name="trumbowyg" version="2"></style>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@{
var settings = Model.PartFieldDefinition.GetSettings<HtmlFieldSettings>();
var culture = await Orchard.GetContentCultureAsync(Model.Field.ContentItem);
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<div class="@Orchard.GetWrapperCssClasses("field-wrapper", $"field-wrapper-{uniqueName.HtmlClassify()}")" id="@Html.IdFor(x => x.Html)_FieldWrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
var isTextRequired = settings.LinkTextMode == LinkTextMode.Required && string.IsNullOrWhiteSpace(settings.DefaultText);
var urlClass = settings.Required ? "required" : null;
var textClass = settings.LinkTextMode == LinkTextMode.Required ? "required" : null;
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
var useFormFloating = string.IsNullOrWhiteSpace(settings.UrlPlaceholder) || string.IsNullOrWhiteSpace(settings.TextPlaceholder);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
var selectedItems = JsonConvert.SerializeObject(Model.SelectedItems, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() });
var partName = Model.PartFieldDefinition.PartDefinition.Name;
var fieldName = Model.PartFieldDefinition.Name;
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
var searchUrl = Url.RouteUrl(new { area = "OrchardCore.ContentFields", controller = "LocalizationSetContentPickerAdmin", action = "SearchLocalizationSets", part = partName, field = fieldName });
var vueElementId = $"LocalizedContentPicker_{partName}_{fieldName}_{Guid.NewGuid().ToString("n")}";
var multiple = settings.Multiple.ToString().ToLowerInvariant();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Value = option.Value,
Selected = Model.Values.Contains(option.Value)
}).ToList();
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<div class="@Orchard.GetWrapperCssClasses("field-wrapper", $"field-wrapper-{uniqueName.HtmlClassify()}")" id="@Html.IdFor(x => x.Values)_FieldWrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

var partName = Model.PartFieldDefinition.PartDefinition.Name;
var fieldName = Model.PartFieldDefinition.Name;
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();

var vueElementId = $"MultiTextField-Picker_{partName}_{fieldName}_{Guid.NewGuid().ToString("n")}";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

options.Add(new SelectListItem { Text = option.Name, Value = option.Value, Selected = isSelected });
}
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<div class="@Orchard.GetWrapperCssClasses("field-wrapper", $"field-wrapper-{uniqueName.HtmlClassify()}")" id="@Html.IdFor(x => x.Values)_FieldWrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
string id = Html.IdFor(m => m.Value);
string javascriptDecimalSeparator = CultureInfo.InvariantCulture.NumberFormat.NumberDecimalSeparator;
string serverDecimalSeparator = CultureInfo.CurrentUICulture.NumberFormat.NumberDecimalSeparator;
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<div class="@Orchard.GetWrapperCssClasses("field-wrapper", $"field-wrapper-{uniqueName.HtmlClassify()}")" id="@Html.IdFor(x => x.Value)_FieldWrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
decimal step = (decimal)Math.Pow(10, 0 - settings.Scale);
decimal from = settings.Minimum.HasValue ? settings.Minimum.Value : 0;
decimal to = settings.Maximum.HasValue ? settings.Maximum.Value : 10;
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<div class="@Orchard.GetWrapperCssClasses("field-wrapper", $"field-wrapper-{uniqueName.HtmlClassify()}")" id="@Html.IdFor(x => x.Value)_FieldWrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
string id = Html.IdFor(m => m.Value);
string javascriptDecimalSeparator = CultureInfo.InvariantCulture.NumberFormat.NumberDecimalSeparator;
string serverDecimalSeparator = CultureInfo.CurrentUICulture.NumberFormat.NumberDecimalSeparator;
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<script asp-name="nouislider" at="Foot"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
string id = Html.IdFor(m => m.Value);
string javascriptDecimalSeparator = CultureInfo.InvariantCulture.NumberFormat.NumberDecimalSeparator;
string serverDecimalSeparator = CultureInfo.CurrentUICulture.NumberFormat.NumberDecimalSeparator;
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<div class="@Orchard.GetWrapperCssClasses("field-wrapper", $"field-wrapper-{uniqueName.HtmlClassify()}")" id="@Html.IdFor(x => x.Value)_FieldWrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
string name = Model.PartFieldDefinition.DisplayName();
decimal min = settings.Minimum.HasValue ? settings.Minimum.Value : 0;
decimal max = settings.Maximum.HasValue ? settings.Maximum.Value : 10000;
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<div class="@Orchard.GetWrapperCssClasses("field-wrapper", $"field-wrapper-{uniqueName.HtmlClassify()}")" id="@Html.IdFor(x => x.Value)_FieldWrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@{
var settings = Model.PartFieldDefinition.GetSettings<TextFieldSettings>();
var culture = await Orchard.GetContentCultureAsync(Model.Field.ContentItem);
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<div class="@Orchard.GetWrapperCssClasses("field-wrapper", $"field-wrapper-{uniqueName.HtmlClassify()}")" id="@Html.IdFor(x => x.Text)_FieldWrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@using OrchardCore.Mvc.Utilities
@{
var settings = Model.PartFieldDefinition.GetSettings<TextFieldSettings>();
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<div class="@Orchard.GetWrapperCssClasses("field-wrapper", $"field-wrapper-{uniqueName.HtmlClassify()}")" id="@Html.IdFor(x => x.Text)_FieldWrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@using OrchardCore.Mvc.Utilities
@{
var settings = Model.PartFieldDefinition.GetSettings<TextFieldSettings>();
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<div class="@Orchard.GetWrapperCssClasses("field-wrapper", $"field-wrapper-{uniqueName.HtmlClassify()}")" id="@Html.IdFor(x => x.Text)_FieldWrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@using OrchardCore.Mvc.Utilities
@{
var settings = Model.PartFieldDefinition.GetSettings<TextFieldSettings>();
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<style asp-name="fontpickerStyle" at="Head" asp-src="~/OrchardCore.ContentFields/Styles/fontawesome-iconpicker.min.css" debug-src="~/OrchardCore.ContentFields/Styles/fontawesome-iconpicker.css"></style>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
var settings = Model.PartFieldDefinition.GetSettings<TextFieldSettings>();
var monacoSettings = Model.PartFieldDefinition.GetSettings<TextFieldMonacoEditorSettings>();
var culture = await Orchard.GetContentCultureAsync(Model.Field.ContentItem);
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<div class="@Orchard.GetWrapperCssClasses("field-wrapper", $"field-wrapper-{uniqueName.HtmlClassify()}")" id="@Html.IdFor(x => x.Text)_FieldWrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

options.Add(new SelectListItem { Text = option.Name, Value = option.Value, Selected = isSelected });
}
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<div class="@Orchard.GetWrapperCssClasses("field-wrapper", $"field-wrapper-{uniqueName.HtmlClassify()}")" id="@Html.IdFor(x => x.Text)_FieldWrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@using OrchardCore.Mvc.Utilities
@{
var settings = Model.PartFieldDefinition.GetSettings<TextFieldSettings>();
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<div class="@Orchard.GetWrapperCssClasses("field-wrapper", $"field-wrapper-{uniqueName.HtmlClassify()}")" id="@Html.IdFor(x => x.Text)_FieldWrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@{
var settings = Model.PartFieldDefinition.GetSettings<TextFieldSettings>();
var culture = await Orchard.GetContentCultureAsync(Model.Field.ContentItem);
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<div class="@Orchard.GetWrapperCssClasses("field-wrapper", $"field-wrapper-{uniqueName.HtmlClassify()}")" id="@Html.IdFor(x => x.Text)_FieldWrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@using OrchardCore.Mvc.Utilities
@{
var settings = Model.PartFieldDefinition.GetSettings<TextFieldSettings>();
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<div class="@Orchard.GetWrapperCssClasses("field-wrapper", $"field-wrapper-{uniqueName.HtmlClassify()}")" id="@Html.IdFor(x => x.Text)_FieldWrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@{
var settings = Model.PartFieldDefinition.GetSettings<TextFieldSettings>();
var culture = await Orchard.GetContentCultureAsync(Model.Field.ContentItem);
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<div class="@Orchard.GetWrapperCssClasses("field-wrapper", $"field-wrapper-{uniqueName.HtmlClassify()}")" id="@Html.IdFor(x => x.Text)_FieldWrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@using OrchardCore.Mvc.Utilities
@{
var settings = Model.PartFieldDefinition.GetSettings<TimeFieldSettings>();
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<div class="@Orchard.GetWrapperCssClasses("field-wrapper", $"field-wrapper-{uniqueName.HtmlClassify()}")" id="@Html.IdFor(x => x.Value)_FieldWrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
var selectedUsers = JsonConvert.SerializeObject(Model.SelectedUsers, new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() });
var partName = Model.PartFieldDefinition.PartDefinition.Name;
var fieldName = Model.PartFieldDefinition.Name;
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
var contentTypeName = Model.TypePartDefinition.Name;
var searchUrl = Url.RouteUrl(new { area = "OrchardCore.ContentFields", controller = "UserPickerAdmin", action = "SearchUsers", part = partName, field = fieldName, contentType = contentTypeName });
var vueElementId = $"UserPicker_{partName}_{fieldName}_{Guid.NewGuid().ToString("n")}";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@using OrchardCore.Mvc.Utilities
@{
var settings = Model.PartFieldDefinition.GetSettings<YoutubeFieldSettings>();
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<div class="@Orchard.GetWrapperCssClasses("field-wrapper", $"field-wrapper-{uniqueName.HtmlClassify()}")" id="@Html.IdFor(x => x.RawAddress)_FieldWrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,17 @@
var description = typePartDefinition.Description();
var namedPart = typePartDefinition.PartDefinition.IsReusable() && typePartDefinition.Name != typePartDefinition.PartDefinition.Name;
var name = typePartDefinition.PartDefinition.Name.HtmlClassify();
var additionalClasses = new List<string> { "content-part-wrapper", $"content-part-wrapper-{name}" };
if (namedPart)
{
var namedPartTechnicalName = typePartDefinition.Name.HtmlClassify();
additionalClasses.Add($"content-part-wrapper-{namedPartTechnicalName}");
}
}

@if (namedPart)
{
<div class="@Orchard.GetWrapperCssClasses("content-part-wrapper", $"content-part-wrapper-{name}")">
<div class="@Orchard.GetWrapperCssClasses(additionalClasses.ToArray())">
<div class="@Orchard.GetLabelCssClasses()">
@typePartDefinition.DisplayName()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@{
var settings = Model.PartFieldDefinition.GetSettings<MarkdownFieldSettings>();
var culture = await Orchard.GetContentCultureAsync(Model.Field.ContentItem);
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<div class="mb-3 field-wrapper [email protected]()" id="@Html.IdFor(x => x.Markdown)_FieldWrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@{
var settings = Model.PartFieldDefinition.GetSettings<MarkdownFieldSettings>();
var culture = await Orchard.GetContentCultureAsync(Model.Field.ContentItem);
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<style asp-name="codemirror"></style>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
@{
var settings = Model.PartFieldDefinition.GetSettings<MarkdownFieldSettings>();
var culture = await Orchard.GetContentCultureAsync(Model.Field.ContentItem);
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<div class="@Orchard.GetWrapperCssClasses("field-wrapper", $"field-wrapper-{uniqueName.HtmlClassify()}")" id="@Html.IdFor(x => x.Markdown)_FieldWrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@{
var settings = Model.PartFieldDefinition.GetSettings<MediaFieldSettings>();
var mediaFieldId = Html.IdFor(m => m);
var uniqueName = $"{Model.PartFieldDefinition.PartDefinition.Name}-{Model.PartFieldDefinition.Name}";
var uniqueName = Model.PartFieldDefinition.GetFullName();
}

<script asp-name="media" at="Foot"></script>
Expand Down
Loading