Add Python APIs for account/profile information to user_api Updating profile page to have social linking Authors: Renzo Lucioni, Alasdair Swan, Stephen Sanchez, Will Daly
69 lines
2.9 KiB
HTML
69 lines
2.9 KiB
HTML
<%! from django.utils.translation import ugettext as _ %>
|
|
<%! from third_party_auth import pipeline %>
|
|
<%namespace name='static' file='/static_content.html'/>
|
|
|
|
<%inherit file="../main.html" />
|
|
|
|
<%block name="pagetitle">${_("Student Profile")}</%block>
|
|
|
|
<%block name="js_extra">
|
|
<%static:js group='student_profile'/>
|
|
</%block>
|
|
|
|
<h1>Student Profile</h1>
|
|
|
|
<p>This is a placeholder for the student's profile page.</p>
|
|
|
|
<form id="name-change-form">
|
|
<input type="hidden" name="csrfmiddlewaretoken" value="${csrf_token}">
|
|
|
|
<label for="new-name">${_('Full Name')}</label>
|
|
<input id="new-name" type="text" name="new-name" value="" placeholder="Xsy" />
|
|
|
|
<div class="submit-button">
|
|
<input type="submit" id="name-change-submit" value="${_('Change My Name')}">
|
|
</div>
|
|
</form>
|
|
|
|
<li class="controls--account">
|
|
<span class="title">
|
|
## Translators: this section lists all the third-party authentication providers (for example, Google and LinkedIn) the user can link with or unlink from their edX account.
|
|
${_("Connected Accounts")}
|
|
</span>
|
|
<span class="data">
|
|
<span class="third-party-auth">
|
|
% for state in provider_user_states:
|
|
<div class="auth-provider">
|
|
<div class="status">
|
|
% if state.has_account:
|
|
<i class="icon icon-link"></i> <span class="copy">${_('Linked')}</span>
|
|
% else:
|
|
<i class="icon icon-unlink"></i><span class="copy">${_('Not Linked')}</span>
|
|
% endif
|
|
</div>
|
|
<span class="provider">${state.provider.NAME}</span>
|
|
<span class="control">
|
|
<form
|
|
action="${pipeline.get_disconnect_url(state.provider.NAME)}"
|
|
method="post"
|
|
name="${state.get_unlink_form_name()}">
|
|
% if state.has_account:
|
|
<input type="hidden" name="csrfmiddlewaretoken" value="${csrf_token}">
|
|
|
|
<a href="#" onclick="document.${state.get_unlink_form_name()}.submit()">
|
|
## Translators: clicking on this removes the link between a user's edX account and their account with an external authentication provider (like Google or LinkedIn).
|
|
${_("Unlink")}
|
|
</a>
|
|
% else:
|
|
<a href="${pipeline.get_login_url(state.provider.NAME, pipeline.AUTH_ENTRY_PROFILE)}">
|
|
## Translators: clicking on this creates a link between a user's edX account and their account with an external authentication provider (like Google or LinkedIn).
|
|
${_("Link")}
|
|
</a>
|
|
% endif
|
|
</form>
|
|
</span>
|
|
</div>
|
|
% endfor
|
|
</span>
|
|
</li>
|