mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Adding some spec tests around setting a page as the home page
--HG-- branch : dev
This commit is contained in:
@@ -213,6 +213,23 @@ namespace Orchard.Specs.Bindings {
|
||||
else if (radio.Attributes.Contains("checked"))
|
||||
radio.Attributes.Remove("checked");
|
||||
}
|
||||
break;
|
||||
case "checkbox":
|
||||
if (string.Equals(row["value"], "true", StringComparison.OrdinalIgnoreCase)) {
|
||||
input.Attributes.Add("checked", "checked");
|
||||
}
|
||||
else {
|
||||
input.Attributes.Remove("checked");
|
||||
}
|
||||
|
||||
var hiddenForCheckbox = inputs.Where(
|
||||
x =>
|
||||
x.GetAttributeValue("type", "") == "hidden" &&
|
||||
x.GetAttributeValue("name", x.GetAttributeValue("id", "")) == r["name"]
|
||||
).FirstOrDefault();
|
||||
if (hiddenForCheckbox != null)
|
||||
hiddenForCheckbox.Attributes.Add("value", row["value"]);
|
||||
|
||||
break;
|
||||
default:
|
||||
input.Attributes.Add("value", row["value"]);
|
||||
|
Reference in New Issue
Block a user