2017-11-25 22:37:54 +11:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
|
|
|
|
{#
|
|
|
|
Eos - Verifiable elections
|
|
|
|
Copyright © 2017 RunasSudo (Yingtong Li)
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Affero General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
#}
|
|
|
|
|
2017-11-26 20:48:15 +11:00
|
|
|
{% block title %}Log in{% endblock %}
|
2017-11-25 22:37:54 +11:00
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
{% if session.user %}
|
2017-11-26 20:48:15 +11:00
|
|
|
<p>You are currently logged in as {{ session.user.name }}. Please select an option from the list below to switch accounts.</p>
|
2017-11-25 22:37:54 +11:00
|
|
|
{% else %}
|
|
|
|
<p>You are not currently logged in. Please select an option from the list below to log in.</p>
|
|
|
|
{% endif %}
|
2017-11-25 23:16:29 +11:00
|
|
|
<ul class="ui list">
|
2017-11-25 22:37:54 +11:00
|
|
|
{% for auth_method in eosweb.app.config['AUTH_METHODS'] %}
|
|
|
|
<li><a href="/auth/{{ auth_method[0] }}/login" target="_blank" onclick="login(this);return false;">{{ auth_method[1] }}</a></li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block basecontent %}
|
|
|
|
{{ super() }}
|
|
|
|
<script>
|
|
|
|
function login(el) {
|
|
|
|
window.open(el.getAttribute("href"), "eos_login_window", "width=400,height=600");
|
|
|
|
}
|
|
|
|
|
2017-11-26 20:48:15 +11:00
|
|
|
function callback_complete(name) {
|
2017-11-25 22:37:54 +11:00
|
|
|
window.location = "/";
|
2017-11-28 14:45:54 +11:00
|
|
|
return true;
|
2017-11-25 22:37:54 +11:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
{% endblock %}
|