Fixing small bug when creating a new content type. The use culture checkbox click event whas not working because the ID can change depending on the order the parts have been added. Replaced the jQuery selector to a class instead.

This commit is contained in:
Skrypt
2015-06-04 20:55:57 -04:00
parent 13b012d212
commit ab8162347e
2 changed files with 2 additions and 2 deletions

View File

@@ -19,7 +19,7 @@
} }
}; };
$("#Parts_3__AutorouteSettings_UseCulturePattern[type=checkbox]").click(function () { $(".use-culture-pattern[type=checkbox]").click(function () {
if ($(this).attr("checked") == "checked") { if ($(this).attr("checked") == "checked") {
$(".autoroute-cultures li:not(:first)").hide(); $(".autoroute-cultures li:not(:first)").hide();
$(".autoroute-cultures li").removeClass("selected"); $(".autoroute-cultures li").removeClass("selected");

View File

@@ -25,7 +25,7 @@
@if (Model.SiteCultures.Count > 1) { @if (Model.SiteCultures.Count > 1) {
<fieldset> <fieldset>
<div> <div>
@Html.CheckBoxFor(m => m.UseCulturePattern) @Html.CheckBoxFor(m => m.UseCulturePattern, new { @class = "use-culture-pattern" })
<label class="forcheckbox" for="@Html.FieldIdFor(m => m.UseCulturePattern)">@T("Use culture pattern(s)")</label> <label class="forcheckbox" for="@Html.FieldIdFor(m => m.UseCulturePattern)">@T("Use culture pattern(s)")</label>
<span class="hint">@T("Allow to set pattern(s) for each culture. If left unchecked this means it will use the default website culture pattern(s).")</span> <span class="hint">@T("Allow to set pattern(s) for each culture. If left unchecked this means it will use the default website culture pattern(s).")</span>
</div> </div>