Commit 56015fec by asadiqbal Committed by Matt Drayer

asadiqbal08/SOL-1046: Convert LinkedIn anchor tag to button

* remove the onclick event
* add mako check to Javascript handler
parent 66e1b11a
...@@ -49,7 +49,7 @@ class CertificatePage(PageObject): ...@@ -49,7 +49,7 @@ class CertificatePage(PageObject):
""" """
returns add to LinkedIn profile button returns add to LinkedIn profile button
""" """
return self.q(css='a.action-linkedin-profile') return self.q(css='button.action-linkedin-profile')
@property @property
def add_to_facebook_profile_button(self): def add_to_facebook_profile_button(self):
......
...@@ -30,6 +30,9 @@ from django.core.urlresolvers import reverse ...@@ -30,6 +30,9 @@ from django.core.urlresolvers import reverse
social_network: 'LinkedIn' social_network: 'LinkedIn'
}; };
Logger.log('edx.certificate.shared', data); Logger.log('edx.certificate.shared', data);
% if linked_in_url:
window.open('${linked_in_url}');
% endif
}); });
}); });
...@@ -85,10 +88,10 @@ from django.core.urlresolvers import reverse ...@@ -85,10 +88,10 @@ from django.core.urlresolvers import reverse
%endif %endif
%if linked_in_url: %if linked_in_url:
<a class="action action-linkedin-profile btn btn-overlay btn-small icon-only" id="action-share-linkedin" target="_blank" href="${linked_in_url}" title="${_('Add to LinkedIn Profile')}" data-course-id="${course_id}" data-certificate-mode="${course_mode}"> <button class="action action-linkedin-profile btn btn-overlay btn-small icon-only" id="action-share-linkedin" title="${_('Add to LinkedIn Profile')}" data-course-id="${course_id}" data-certificate-mode="${course_mode}">
<i class="icon fa fa-linkedin" aria-hidden="true"></i> <i class="icon fa fa-linkedin" aria-hidden="true"></i>
<span class="action-label">${_("Add to LinkedIn Profile")}</span> <span class="action-label">${_("Add to LinkedIn Profile")}</span>
</a> </button>
%endif %endif
%if badge: %if badge:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment