Fixing the setting of the Search fields site settings (http://orchardqa.codeplex.com/workitem/150)

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-10-21 14:04:37 -07:00
parent 0490252c0a
commit 3e0b8731f6

View File

@@ -4,16 +4,18 @@
<fieldset>
<legend>@T("Search")</legend>
<div>
@{var entryIndex = 0;}
@if (Model.Entries != null && Model.Entries.Any()) {
foreach(SearchSettingsEntry modelEntry in Model.Entries) {
if(modelEntry.Selected) {
<input type="checkbox" value="true" checked="checked" name="@Html.FieldNameFor(m => modelEntry.Selected)" id="@Html.FieldIdFor(m => modelEntry.Selected)"/>
foreach(var modelEntry in Model.Entries) {
if(Model.Entries[entryIndex].Selected) {
<input type="checkbox" value="true" checked="checked" name="@Html.FieldNameFor(m => m.Entries[entryIndex].Selected)" id="@Html.FieldIdFor(m => m.Entries[entryIndex].Selected)"/>
}
else {
<input type="checkbox" value="true" name="@Html.FieldNameFor(m => modelEntry.Selected)" id="@Html.FieldIdFor(m => modelEntry.Selected)"/>
<input type="checkbox" value="true" name="@Html.FieldNameFor(m => m.Entries[entryIndex].Selected)" id="@Html.FieldIdFor(m => m.Entries[entryIndex].Selected)"/>
}
@Html.HiddenFor(m => modelEntry.Field)
<label class="forcheckbox" for="@Html.FieldIdFor(m => modelEntry.Selected)">@modelEntry.Field</label>
@Html.HiddenFor(m => m.Entries[entryIndex].Field)
<label class="forcheckbox" for="@Html.FieldIdFor(m => m.Entries[entryIndex].Selected)">@Model.Entries[entryIndex].Field</label>
entryIndex = entryIndex + 1;
}
}
else {