Skip to content
This repository has been archived by the owner on Apr 8, 2019. It is now read-only.

Commit

Permalink
GTNPORTAL-2909 - added localization and status validation
Browse files Browse the repository at this point in the history
  • Loading branch information
vrockai authored and mposolda committed May 7, 2013
1 parent 08ee34e commit 5d8133c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public InteractionState<TwitterAccessTokenContext> processOAuthInteraction(HttpS

@Override
public InteractionState<TwitterAccessTokenContext> processOAuthInteraction(HttpServletRequest httpRequest, HttpServletResponse httpResponse, String scope) throws IOException, OAuthException {
throw new OAuthException(OAuthExceptionCode.EXCEPTION_CODE_TWITTER_ERROR, "Thsi is currently not supported for Twitter");
throw new OAuthException(OAuthExceptionCode.EXCEPTION_CODE_TWITTER_ERROR, "This is currently not supported for Twitter");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1275,6 +1275,14 @@ UIAccountSocial.msg.failed-revoke=Revocation of access token failed. Maybe your
UIAccountSocial.msg.access-denied=Operation failed due to denied access
UIAccountSocial.msg.oauth-error=Unspecified error during oauth flow

################################################################################
# UIAccountSettings #
################################################################################

UIAccountSocial.msg.disabled=No Social networks available
UIAccountSocial.action.link=Link social account
UIAccountSocial.action.unlink=Unlink social account

################################################################################
# UIDropDownControl # tungnd
################################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Collection<OAuthProviderType> oauthProviders = uicomponent.getOAuthProviderTypes();
if (oauthProviders.size() == 0) {
%>
<tr><td>No Social networks available</td></tr>
<tr><td><%=_ctx.appRes("UIAccountSocial.msg.disabled")%></td></tr>
<%
} else {
for(OAuthProviderType oauthPrType : oauthProviders) {
Expand All @@ -38,11 +38,11 @@
uicomponent.saveURLAfterLinkSocialAccount();
String linkSocialAccountURL = uicomponent.getLinkSocialAccountURL(oauthPrType);
%>
<a href="$linkSocialAccountURL" class="ActionButton LightBlueStyle">Link social account</a>
<a href="$linkSocialAccountURL" class="ActionButton LightBlueStyle"><%=_ctx.appRes("UIAccountSocial.action.link")%></a>
<% } else {
String link = uicomponent.getUnlinkSocialAccountURL(oauthPrType);
%>
<a href="javascript:void(0);" onclick="$link" class="ActionButton LightBlueStyle">Unlink social account</a>
<a href="javascript:void(0);" onclick="$link" class="ActionButton LightBlueStyle"><%=_ctx.appRes("UIAccountSocial.action.unlink")%></a>
<% } %>
</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,13 @@ public UIUserProfileInputSet(String name) {
businessInputSet.setRendered(false);
addUIFormInput(businessInputSet);

UIFormInputSet socialInputSet = new UIFormInputSet("SocialNetworksInfo");
addInput(socialInputSet, getSocialInfoKeys());
socialInputSet.setRendered(false);
addUIFormInput(socialInputSet);
OAuthProviderTypeRegistry registry = getApplicationComponent(OAuthProviderTypeRegistry.class);
if (registry.isOAuthEnabled()) {
UIFormInputSet socialInputSet = new UIFormInputSet("SocialNetworksInfo");
addInput(socialInputSet, getSocialInfoKeys());
socialInputSet.setRendered(false);
addUIFormInput(socialInputSet);
}
}

public void reset() {
Expand Down

0 comments on commit 5d8133c

Please sign in to comment.