diff --git a/get_together/settings.py b/get_together/settings.py index 83146c0..5a2a50d 100644 --- a/get_together/settings.py +++ b/get_together/settings.py @@ -66,7 +66,7 @@ AUTHENTICATION_BACKENDS = ( 'social_core.backends.github.GithubOAuth2', 'social_core.backends.twitter.TwitterOAuth', 'social_core.backends.facebook.FacebookOAuth2', - 'social_core.backends.yahoo.YahooOpenId', +# 'social_core.backends.linkedin.LinkedinOAuth2', ) MIDDLEWARE = [ @@ -163,7 +163,20 @@ GOOGLE_MAPS_API_KEY=None SOCIAL_AUTH_GITHUB_KEY=None SOCIAL_AUTH_GOOGLE_OAUTH2_KEY=None SOCIAL_AUTH_FACEBOOK_KEY=None +SOCIAL_AUTH_FACEBOOK_SCOPE = ['email'] +SOCIAL_AUTH_FACEBOOK_PROFILE_EXTRA_PARAMS = { + 'fields': 'id, name, email' +} +SOCIAL_AUTH_FACEBOOK_API_VERSION = '2.12' SOCIAL_AUTH_TWITTER_KEY=None +SOCIAL_AUTH_LINKEDIN_KEY=None +SOCIAL_AUTH_LINKEDIN_SECRET=None +SOCIAL_AUTH_LINKEDIN_SCOPE = ['r_basicprofile', 'r_emailaddress'] +SOCIAL_AUTH_LINKEDIN_FIELD_SELECTORS = ['email-address'] +SOCIAL_AUTH_LINKEDIN_EXTRA_DATA = [('id', 'id'), + ('firstName', 'first_name'), + ('lastName', 'last_name'), + ('emailAddress', 'email_address')] SETTINGS_EXPORT = [ 'DEBUG', 'GOOGLE_ANALYTICS_ID', @@ -172,6 +185,7 @@ SETTINGS_EXPORT = [ 'SOCIAL_AUTH_GOOGLE_OAUTH2_KEY', 'SOCIAL_AUTH_FACEBOOK_KEY', 'SOCIAL_AUTH_TWITTER_KEY', + 'SOCIAL_AUTH_LINKEDIN_KEY', ] # Make django messages framework use Bootstrap's alert style classes diff --git a/get_together/static/css/get_together.css b/get_together/static/css/get_together.css index e032615..a0b86b6 100644 --- a/get_together/static/css/get_together.css +++ b/get_together/static/css/get_together.css @@ -32,7 +32,7 @@ form { display: inline; } .ui-selectmenu-menu .ui-menu { - height: 200px; + max-height: 200px; } .gt_lookup .ui-selectmenu-icon.ui-icon { background-position: 0px 0px; @@ -77,6 +77,15 @@ form { color: #FFFFFF; } +.btn-linkedin { + color: #FFFFFF; + background-color: #0084bf; + border-color: #0084bf; +} +.btn-linkedin:hover, .btn-linkedin:active { + color: #FFFFFF; +} + ul.errorlist li { padding: 0.75rem 1.25rem; margin-bottom: 1rem; diff --git a/get_together/templates/get_together/events/show_event.html b/get_together/templates/get_together/events/show_event.html index 846ff9f..6c5f069 100644 --- a/get_together/templates/get_together/events/show_event.html +++ b/get_together/templates/get_together/events/show_event.html @@ -78,6 +78,21 @@ }(document, "script", "twitter-wjs")); {% endif %} +{% if settings.SOCIAL_AUTH_LINKEDIN_KEY %} + +{% endif %} {% endblock %} {% block content %} @@ -104,6 +119,9 @@ {% if settings.SOCIAL_AUTH_FACEBOOK_KEY %} Share {% endif %} + {% if settings.SOCIAL_AUTH_LINKEDIN_KEY %} + Share + {% endif %} {% if not is_attending %} Attend {% endif %} @@ -155,7 +173,7 @@