diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-09-12 20:48:06 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-09-12 21:04:04 -0700 |
commit | c32f95a62f3ad583a58763022e1a2578ecdb9ee5 (patch) | |
tree | 10bb62a8c2daf1865a3df7a1de440b05a2503042 | |
parent | 35275b2df8229736f52b2fc121669113beea50cd (diff) | |
download | DotNetOpenAuth-c32f95a62f3ad583a58763022e1a2578ecdb9ee5.zip DotNetOpenAuth-c32f95a62f3ad583a58763022e1a2578ecdb9ee5.tar.gz DotNetOpenAuth-c32f95a62f3ad583a58763022e1a2578ecdb9ee5.tar.bz2 |
OpenIdTextBox now honors Popup == PopupBehavior.Never.
Fixes #126.
-rw-r--r-- | src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdTextBox.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdTextBox.cs b/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdTextBox.cs index 184707c..a920ac7 100644 --- a/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdTextBox.cs +++ b/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdTextBox.cs @@ -1221,7 +1221,16 @@ namespace DotNetOpenAuth.OpenId.RelyingParty { private bool IsPopupAppropriate() { Contract.Requires(this.Request != null); - return this.Popup == PopupBehavior.Always || this.Request.Provider.IsExtensionSupported<UIRequest>(); + switch (this.Popup) { + case PopupBehavior.Never: + return false; + case PopupBehavior.Always: + return true; + case PopupBehavior.IfProviderSupported: + return this.Request.Provider.IsExtensionSupported<UIRequest>(); + default: + throw new InternalErrorException(); + } } /// <summary> |