refactor, implement next attribute, for forward, service need user approve berfore redirect

This commit is contained in:
TuxCoder 2020-05-13 17:04:22 +02:00
parent 77962edd15
commit 5037fe4def
8 changed files with 82 additions and 40 deletions

View file

@ -4,15 +4,8 @@
{% block content %}
<form method="POST" action="/login">
{{ form.csrf_token }}
<div class="form-group row">
<label class="col-sm-2 col-form-label">{{ form.name.label }} </label>
<div class="col-sm-10">
{{ form.name(size=20) }}
</div>
</div>
{{ form.submit() }}
</form>
{{ render_form(form) }}
{% endblock %}

View file

@ -4,9 +4,21 @@
{% block content %}
{% for form in forms %}
{{ render_form(form) }}
{% endfor %}
<ul class="nav nav-tabs" id="myTab" role="tablist">
{% for auth_name in forms.keys() %}
<li class="nav-item">
<a class="nav-link{{' active' if loop.first else ''}}" id="home-tab" data-toggle="tab" href="#{{ auth_name }}" role="tab" aria-controls="home" aria-selected="true">{{ gettext(auth_name) }}</a>
</li>
{% endfor %}
</ul>
<div class="tab-content" id="myTabContent">
{% for auth_name, form in forms.items() %}
<div class="tab-pane fade{{ ' show active' if loop.first else '' }}" id="{{ auth_name }}" role="tabpanel" aria-labelledby="{{ auth_name }}-tab">
{{ render_form(form) }}
</div>
{% endfor %}
</div>
{% endblock %}

View file

@ -0,0 +1,17 @@
{% extends 'frontend/base.html.j2' %}
{% block title %}{{ gettext('Oauth2 Request') }}{% endblock %}
{% block content %}
<div class="container">
<p>
A service ask for access to your account data.<br>
You can confirm this pressing "Continue"
</p>
{{ render_form(form) }}
</div>
{% endblock %}