Add OAuth link&unlink in user profile

This commit is contained in:
Jim Ma
2018-10-14 16:51:00 +08:00
parent 1abbcfa3c6
commit 4b76b8400d
2 changed files with 90 additions and 21 deletions
+15
View File
@@ -52,6 +52,21 @@
{% endfor %}
</select>
</div>
{% if registered_oauth.keys()| length > 0 %}
<div class="form-group">
<label for="oauth_settings">{{_('OAuth Settings')}}</label>
<br/>
{% for oauth, name in registered_oauth.iteritems() %}
<label for="config_{{ oauth }}_oauth" style="margin-left: 15px">{{ name }}</label>
{% if oauth not in oauth_status %}
<a href="/{{ oauth }}" target="_blank" style="margin-left: 5px">Link</a>
{% else %}
<a href="/unlink/{{ oauth }}" style="margin-left: 5px">Unlink</a>
{% endif %}
<br/>
{% endfor %}
</div>
{% endif %}
<div class="col-sm-6">
<div class="form-group">
<input type="checkbox" name="show_random" id="show_random" {% if content.show_random_books() %}checked{% endif %}>