forked from 00dani/lemoncurry
Throw away now-unused lemonauth templates, since they've all been ported across to Jinja2
This commit is contained in:
parent
24bc7816f1
commit
67f8ec6fae
5 changed files with 0 additions and 135 deletions
|
@ -1,70 +0,0 @@
|
||||||
{% extends 'lemoncurry/layout.html' %}
|
|
||||||
{% load markdown static %}
|
|
||||||
|
|
||||||
{% block styles %}
|
|
||||||
<link rel="stylesheet" type="text/stylus" href="{% static 'lemonauth/css/indie.styl' %}" />
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block main %}
|
|
||||||
<div class="container">
|
|
||||||
<form class="card" method="post" action="{% url 'lemonauth:indie_approve' %}">
|
|
||||||
<h4 class="card-header h-x-app">
|
|
||||||
{% if app %}<img class="u-logo p-name" src="{{ app.logo | first }}" alt="{{ app.name | first }}" />{% endif %}
|
|
||||||
sign in to
|
|
||||||
{% if app %}{{ app.name | first }}{% endif %}
|
|
||||||
{% if app %}({% endif %}<a class="u-url code{% if not app %} p-name{% endif %}" href="{{ params.client_id }}">{{ params.client_id }}</a>{% if app %}){% endif %}?
|
|
||||||
{% if verified %}
|
|
||||||
<span data-tooltip data-tippy-theme="dark success" data-tippy-html="#verified-success">
|
|
||||||
<i class="fas fa-check-circle verified-success"></i>
|
|
||||||
</span>
|
|
||||||
{% else %}
|
|
||||||
<span data-tooltip data-tippy-theme="dark warning" data-tippy-html="#verified-warning">
|
|
||||||
<i class="fas fa-question-circle verified-warning"></i>
|
|
||||||
</span>
|
|
||||||
{% endif %}
|
|
||||||
</h4>
|
|
||||||
|
|
||||||
<div class="card-body">
|
|
||||||
<p class="card-text">do you want to confirm your identity, <a class="code" href="{{ me }}">{{ me }}</a>, with this app?</p>
|
|
||||||
{% if params.response_type == 'code' %}
|
|
||||||
<p class="card-text">additionally, this app is requesting the following <i>scopes</i> - you can edit the scopes that will be granted to the app, if you wish</p>
|
|
||||||
<div class="card-text form-group">
|
|
||||||
{% for scope in scopes %}
|
|
||||||
<div class="form-check">
|
|
||||||
<input class="form-check-input" id="scopes-{{ scope }}" name="scope" type="checkbox" checked value="{{ scope }}" />
|
|
||||||
<label class="form-check-label" for="scopes-{{ scope }}">{{ scope }}</label>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
<p class="card-text"><small>you will be redirected to <a class="code" href="{{ redirect_uri }}">{{ redirect_uri }}</a> after authorising this app</small></p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card-footer">
|
|
||||||
<button class="btn btn-success" type="submit">
|
|
||||||
<i class="fas fa-check"></i>
|
|
||||||
approve
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% csrf_token %}
|
|
||||||
<input name="me" type="hidden" value="{{ me }}" />
|
|
||||||
<input name="client_id" type="hidden" value="{{ params.client_id }}" />
|
|
||||||
<input name="redirect_uri" type="hidden" value="{{ redirect_uri }}" />
|
|
||||||
{% if params.state %}<input name="state" type="hidden" value="{{ params.state }}" />{% endif %}
|
|
||||||
<input name="response_type" type="hidden" value="{{ params.response_type }}" />
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="verified-success" hidden>
|
|
||||||
this client has been <strong>verified</strong> using <code>{{ '<link rel="redirect_uri">' | force_escape }}</code> - they are who they claim to be!
|
|
||||||
</div>
|
|
||||||
<div id="verified-warning" hidden>
|
|
||||||
this client could <strong>not</strong> be verified using <code>{{ '<link rel="redirect_uri">' | force_escape }}</code> - check the redirect uri carefully yourself!
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
||||||
{% block foot %}
|
|
||||||
<script type="text/javascript">
|
|
||||||
tippy('[data-tippy-theme]', {arrow: true});
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
|
|
@ -1,51 +0,0 @@
|
||||||
{% extends 'lemoncurry/layout.html' %}
|
|
||||||
{% load lemonauth_tags static %}
|
|
||||||
|
|
||||||
{% block styles %}
|
|
||||||
<link rel="stylesheet" type="text/stylus" href="{% static 'lemonauth/css/login.styl' %}" />
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block main %}
|
|
||||||
<div class="container">
|
|
||||||
{% if form.errors %}
|
|
||||||
<p class="alert alert-danger">
|
|
||||||
<strong>Uh oh!</strong> Your username and password didn't match. Please try again.
|
|
||||||
</p>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if next %}
|
|
||||||
{% if user.is_authenticated %}
|
|
||||||
<p class="alert alert-warning">
|
|
||||||
<strong>Hang on!</strong> Your account doesn't have access to this page. To proceed, please log in to an account that does have access.
|
|
||||||
</p>
|
|
||||||
{% else %}
|
|
||||||
<p class="alert alert-warning">
|
|
||||||
<strong>Oops!</strong> Please log in to see this page.
|
|
||||||
</p>
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<form class="card" method="post" action="{% url 'lemonauth:login' %}">
|
|
||||||
<div class="card-body">
|
|
||||||
{% form_field form.username %}
|
|
||||||
{% form_field form.password %}
|
|
||||||
{% form_field form.otp_token %}
|
|
||||||
|
|
||||||
<div class="form-group form-check">
|
|
||||||
<input id="id_{{ form.otp_trust_agent.name }}" name="{{ form.otp_trust_agent.name }}" class="form-check-input" type="checkbox" />
|
|
||||||
<label for="id_{{ form.otp_trust_agent.name }}" class="form-check-label">remember this browser (don't tick this on a public computer!)</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card-footer">
|
|
||||||
<button class="btn btn-primary" type="submit">
|
|
||||||
<i class="fas fa-sign-in-alt"></i>
|
|
||||||
log in
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% csrf_token %}
|
|
||||||
<input type="hidden" name="next" value="{{ next }}" />
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
|
@ -1,6 +0,0 @@
|
||||||
<div class="form-group">
|
|
||||||
<label for="{{ field.id_for_label }}">{{ field.label | lower }}</label>
|
|
||||||
<input id="{{ field.id_for_label }}" class="form-control{% if field.errors %}is-invalid{% endif %}" type="{{ field.field.widget.input_type }}" required
|
|
||||||
name="{{ field.html_name }}"{% if field.value %} value="{{ field.value }}"{% endif %}{% if field.help_text %} aria-describedby="{{ field.id_for_label }}-help"{% endif %} />
|
|
||||||
{% if field.help_text %}<p id="{{ field.id_for_label }}-help" class="form-text">{{ field.help_text }}</p>{% endif %}
|
|
||||||
</div>
|
|
|
@ -1,8 +0,0 @@
|
||||||
from django import template
|
|
||||||
|
|
||||||
register = template.Library()
|
|
||||||
|
|
||||||
|
|
||||||
@register.inclusion_tag('lemonauth/tags/form_field.html')
|
|
||||||
def form_field(field):
|
|
||||||
return {'field': field}
|
|
Loading…
Reference in a new issue