Files
firefly-iii/resources/views/vendor/passport/authorize.twig

119 lines
4.3 KiB
Twig
Raw Normal View History

2018-02-04 08:16:37 +01:00
<!DOCTYPE html>
<html lang="en">
<head>
2018-09-03 14:50:57 +02:00
<base href="{{ route('index') }}/">
2018-02-04 08:16:37 +01:00
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
2018-03-03 17:16:47 +01:00
<title>Firefly III v{{ config('firefly.version') }} - {{ 'authorization'|_ }}</title>
2018-02-04 08:16:37 +01:00
2018-08-26 21:29:30 +02:00
{# CSS things #}
{# libraries #}
2023-07-23 07:10:42 +02:00
<link href="v1/lib/bs/css/bootstrap.min.css?v={{ FF_VERSION }}" rel="stylesheet" type="text/css"
nonce="{{ JS_NONCE }}">
<link href="v1/lib/fa/css/font-awesome.min.css?v={{ FF_VERSION }}" rel="stylesheet" type="text/css"
nonce="{{ JS_NONCE }}">
2018-08-26 21:29:30 +02:00
{# the theme #}
2023-07-23 07:10:42 +02:00
<link href="v1/lib/adminlte/css/AdminLTE.min.css?v={{ FF_VERSION }}" rel="stylesheet" type="text/css"
nonce="{{ JS_NONCE }}">
2018-08-26 21:29:30 +02:00
{# Firefly III customisations #}
2021-04-08 12:30:21 +02:00
<link href="v1/css/firefly.css?v={{ FF_VERSION }}" rel="stylesheet" type="text/css" nonce="{{ JS_NONCE }}">
2018-02-04 08:16:37 +01:00
<style>
.passport-authorize .container {
margin-top: 30px;
}
.passport-authorize .scopes {
margin-top: 20px;
}
.passport-authorize .buttons {
margin-top: 25px;
text-align: center;
}
.passport-authorize .btn {
width: 125px;
}
.passport-authorize .btn-approve {
margin-right: 15px;
}
.passport-authorize form {
display: inline;
}
</style>
</head>
<body class="passport-authorize">
2023-07-23 07:10:42 +02:00
<div class="container">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<div class="panel panel-default">
<div class="panel-heading">
{{ trans('firefly.authorization_request', {version: config('firefly.version')}) }}
</div>
<div class="panel-body">
{% if client.user.id == user.id %}
<p>
2020-06-25 13:37:44 +02:00
{{ trans('firefly.authorization_request_intro', {client: client.name|escape})|raw }}
</p>
<p>
{{ trans('firefly.authorization_request_site', {url: client.redirect|phphost})|raw }}
</p>
2023-07-23 07:10:42 +02:00
{% endif %}
2023-07-23 07:10:42 +02:00
{% if client.user.id != user.id %}
<p class="text-danger">
{{ 'authorization_request_invalid'|_ }}
</p>
2023-07-23 07:10:42 +02:00
{% endif %}
<!-- Scope List -->
{% if scopes|length > 0 %}
<div class="scopes">
<p><strong>{{ 'scopes_will_be_able'|_ }}</strong></p>
<ul>
{% for scope in scopes %}
<li>{{ scope.description }}</li>
{% endfor %}
</ul>
</div>
{% endif %}
2018-02-04 08:16:37 +01:00
2023-07-23 07:10:42 +02:00
<div class="buttons">
<!-- Authorize Button -->
{% if client.user.id == user.id %}
2018-09-22 20:01:38 +02:00
<form method="post" action="{{ route('index') }}/oauth/authorize">
2018-02-04 08:16:37 +01:00
{{ csrf_field() }}
<input type="hidden" name="state" value="{{ request.state }}">
<input type="hidden" name="client_id" value="{{ client.id }}">
2023-07-23 07:10:42 +02:00
<button type="submit"
class="btn btn-success btn-approve">{{ 'button_authorize'|_ }}</button>
2018-02-04 08:16:37 +01:00
</form>
2023-07-23 07:10:42 +02:00
{% endif %}
2018-02-04 08:16:37 +01:00
2023-07-23 07:10:42 +02:00
<!-- Cancel Button -->
<form method="post" action="{{ route('index') }}/oauth/authorize">
{{ csrf_field() }}
{{ method_field('DELETE') }}
2018-02-04 08:16:37 +01:00
2023-07-23 07:10:42 +02:00
<input type="hidden" name="state" value="{{ request.state }}">
<input type="hidden" name="client_id" value="{{ client.id }}">
<button class="btn btn-danger">{{ 'cancel'|_ }}</button>
</form>
2018-02-04 08:16:37 +01:00
</div>
</div>
</div>
</div>
</div>
2023-07-23 07:10:42 +02:00
</div>
2018-02-04 08:16:37 +01:00
</body>
</html>