From 730ded46a643c02ef9d33b20b4439b6fa8d80458 Mon Sep 17 00:00:00 2001 From: starfighter83 Date: Wed, 24 Nov 2010 11:54:12 +0000 Subject: [PATCH] Fixes #28696: Macro Container bug: Can't handle bool/checkboxes [TFS Changeset #80524] --- components/macroRenderings/yesNo.cs | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/components/macroRenderings/yesNo.cs b/components/macroRenderings/yesNo.cs index e2b4ad3b98..b4cf50931a 100644 --- a/components/macroRenderings/yesNo.cs +++ b/components/macroRenderings/yesNo.cs @@ -38,30 +38,17 @@ namespace umbraco.macroRenderings protected override void OnInit(EventArgs e) { + if (_value != null) + { + if (_value == "1") + this.Checked = true; + else + this.Checked = false; + } + this.Text = "Yes"; base.OnInit (e); } - - /// - /// Render this control to the output parameter specified. - /// - /// The HTML writer to write out to - protected override void Render(HtmlTextWriter output) - { - if (_value != null) - { - if (_value == "1") - { - this.Checked = true; - } - else - { - this.Checked = false; - } - } - - base.Render(output); - } } }