summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdButtonPanel.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdButtonPanel.cs')
-rw-r--r--src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdButtonPanel.cs30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdButtonPanel.cs b/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdButtonPanel.cs
index 235d6f3..e71847c 100644
--- a/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdButtonPanel.cs
+++ b/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdButtonPanel.cs
@@ -50,6 +50,17 @@ namespace DotNetOpenAuth.OpenId.RelyingParty {
private const string AuthenticatedAsToolTipDefault = "We recognize you!";
/// <summary>
+ /// The OpenIdAjaxTextBox that remains hidden until the user clicks the OpenID button.
+ /// </summary>
+ private OpenIdAjaxTextBox textBox;
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="OpenIdButtonPanel"/> class.
+ /// </summary>
+ public OpenIdButtonPanel() {
+ }
+
+ /// <summary>
/// Gets or sets the tool tip text that appears on the green checkmark when authentication succeeds.
/// </summary>
[Bindable(true), DefaultValue(AuthenticatedAsToolTipDefault), Localizable(true), Category(AppearanceCategory)]
@@ -83,6 +94,17 @@ namespace DotNetOpenAuth.OpenId.RelyingParty {
}
/// <summary>
+ /// Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create any child controls they contain in preparation for posting back or rendering.
+ /// </summary>
+ protected override void CreateChildControls() {
+ base.CreateChildControls();
+
+ this.textBox = new OpenIdAjaxTextBox();
+ this.textBox.ID = "openid_identifier";
+ this.Controls.Add(this.textBox);
+ }
+
+ /// <summary>
/// Raises the <see cref="E:System.Web.UI.Control.PreRender"/> event.
/// </summary>
/// <param name="e">An <see cref="T:System.EventArgs"/> object that contains the event data.</param>
@@ -142,6 +164,14 @@ namespace DotNetOpenAuth.OpenId.RelyingParty {
}
writer.RenderEndTag(); // </ul>
+
+ writer.AddStyleAttribute(HtmlTextWriterStyle.Display, "none");
+ writer.AddAttribute(HtmlTextWriterAttribute.Id, "OpenIDForm");
+ writer.RenderBeginTag(HtmlTextWriterTag.Div);
+
+ this.RenderChildren(writer);
+
+ writer.RenderEndTag(); // </div>
}
}