42 lines
1.4 KiB
Twig
42 lines
1.4 KiB
Twig
{% extends 'pages/settings/settings.twig' %}
|
|
{% import 'macros/form.twig' as f %}
|
|
|
|
{% block title %}{{ __('settings.oauth') }}{% endblock %}
|
|
|
|
{% block container_title %}
|
|
<h1 id="oauth-settings-title">{{ block('title') }}</h1>
|
|
{% endblock %}
|
|
|
|
{% block row_content %}
|
|
<table class="table table-striped">
|
|
<tbody>
|
|
{% for name,config in providers %}
|
|
<tr{% if config.hidden|default(false) %} class="hidden"{% endif %}>
|
|
<th>
|
|
{% if config.url|default %}
|
|
<a href="{{ config.url }}" target="_blank" rel="noopener">{{ name|capitalize }}</a>
|
|
{% else %}
|
|
{{ name|capitalize }}
|
|
{% endif %}
|
|
</th>
|
|
<td>
|
|
{% if not user.oauth.contains('provider', name) %}
|
|
<form method="POST" action="{{ url('/oauth/' ~ name ~ '/connect') }}">
|
|
{{ csrf() }}
|
|
|
|
{{ f.submit(__('form.connect')) }}
|
|
</form>
|
|
{% else %}
|
|
<form method="POST" action="{{ url('/oauth/' ~ name ~ '/disconnect') }}">
|
|
{{ csrf() }}
|
|
|
|
{{ f.submit(__('form.disconnect'), {'btn_type': 'danger'}) }}
|
|
</form>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endblock %}
|