WU/templates/profile.html
2018-12-03 00:31:48 +01:00

13 lines
592 B
HTML

{% macro show_provider_button(provider_id, display_name, conn) %}
{% if conn %}
<form action="{{ url_for('social.remove_connection', provider_id=conn.provider_id, provider_user_id=conn.provider_user_id) }}" method="DELETE">
<input type="submit" value="Disconnect {{ display_name }}" />
</form>
{% else %}
<form action="{{ url_for('social.connect', provider_id=provider_id) }}" method="POST">
<input type="submit" value="Connect {{ display_name }}" />
</form>
{% endif %}
{% endmacro %}
{{ show_provider_button('facebook', 'Facebook', facebook_conn) }}