Files
firefly-iii/resources/views/v1/profile/index.twig

158 lines
6.6 KiB
Twig
Raw Normal View History

2016-11-06 16:17:22 +01:00
{% extends "./layout/default" %}
2015-06-19 20:59:14 +02:00
{% block breadcrumbs %}
{{ Breadcrumbs.render(Route.getCurrentRoute.getName) }}
2015-06-19 20:59:14 +02:00
{% endblock %}
{% block content %}
2018-02-04 08:17:22 +01:00
2015-06-27 08:06:24 +02:00
<div class="row">
2018-03-09 05:45:22 +01:00
<div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12">
2015-06-27 08:06:24 +02:00
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'options'|_ }}</h3>
2015-06-27 08:06:24 +02:00
</div>
<div class="box-body">
2016-10-20 19:10:43 +02:00
<p>
{{ trans('firefly.user_id_is',{user: userId})|raw }}
</p>
2018-07-03 05:56:46 +02:00
{% if not SANDSTORM %}
2019-01-06 13:37:25 +01:00
<ul>
<li><a href="{{ route('profile.change-email') }}">{{ 'change_your_email'|_ }}</a></li>
<li><a href="{{ route('profile.change-password') }}">{{ 'change_your_password'|_ }}</a></li>
<li><a class="text-danger" href="{{ route('profile.delete-account') }}">{{ 'delete_account'|_ }}</a></li>
</ul>
2018-07-03 05:56:46 +02:00
{% endif %}
2015-06-27 08:06:24 +02:00
</div>
</div>
</div>
</div>
2019-01-06 13:37:25 +01:00
{% if SANDSTORM %}
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">Offer template</h3>
</div>
<div class="box-body">
<p>
Block for sandstorm thing
</p>
<div>
<iframe style="width: 100%; height: 55px; margin: 0; border: 0;" id="offer-iframe">
</iframe>
</div>
</div>
</div>
</div>
</div>
2018-07-03 05:56:46 +02:00
{% endif %}
{% if not SANDSTORM %}
2019-01-06 13:37:25 +01:00
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'command_line_token'|_ }}</h3>
</div>
<div class="box-body">
<p>
{{ 'explain_command_line_token'|_ }}
</p>
<p>
<input id="token" type="text" class="form-control" name="token" value="{{ accessToken.data }}" size="32" maxlength="32" readonly/>
2018-03-09 05:45:22 +01:00
2019-01-06 13:37:25 +01:00
</p>
2018-03-09 05:45:22 +01:00
<p>
2019-01-06 13:37:25 +01:00
<form action="{{ route('profile.regenerate') }}" method="post">
2018-03-09 05:45:22 +01:00
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
2019-01-06 13:37:25 +01:00
<button type="submit" class="btn btn-danger btn-xs"><i class="fa fa-refresh"></i> {{ 'regenerate_command_line_token'|_ }}</button>
2018-03-09 05:45:22 +01:00
</form>
</p>
2019-01-06 13:37:25 +01:00
</div>
</div>
</div>
</div>
{% endif %}
{% if not SANDSTORM %}
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{ 'pref_two_factor_auth'|_ }}</h3>
</div>
<div class="box-body">
<p class="text-info">{{ 'pref_two_factor_auth_help'|_ }}</p>
{% if enabled2FA == true %}
<div class="btn-group">
<a class="btn btn-info" href="{{ route('profile.code') }}">
<i class="fa fa-recycle"></i>
{{ 'pref_two_factor_auth_reset_code'|_ }}</a>
<a class="btn btn-danger" href="{{ route('profile.delete-code') }}">
<i class="fa fa-trash"></i>
{{ 'pref_two_factor_auth_disable_2fa'|_ }}</a>
</div>
{% else %}
<p>
<form action="{{ route('profile.enable2FA') }}" method="post">
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
<button type="submit" class="btn btn-info"><i class="fa fa-lock"></i> {{ 'pref_enable_two_factor_auth'|_ }}</button>
</form>
</p>
{% endif %}
</div>
2018-03-09 05:45:22 +01:00
</div>
</div>
</div>
2018-07-03 05:56:46 +02:00
{% endif %}
2018-02-04 08:17:22 +01:00
<div class="row">
2018-03-09 05:45:22 +01:00
<div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12">
2018-02-04 08:17:22 +01:00
<passport-clients></passport-clients>
</div>
</div>
<div class="row">
2018-03-09 05:45:22 +01:00
<div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12">
2018-02-04 08:17:22 +01:00
<passport-authorized-clients></passport-authorized-clients>
</div>
</div>
<div class="row">
2018-03-09 05:45:22 +01:00
<div class="col-lg-8 col-lg-offset-2 col-md-12 col-sm-12">
2018-02-04 08:17:22 +01:00
<passport-personal-access-tokens></passport-personal-access-tokens>
</div>
</div>
{% endblock %}
2019-01-06 13:37:25 +01:00
{% block scripts %}
{% if SANDSTORM %}
<script>
function requestIframeURL() {
var template = "You can use the $API_TOKEN key to reach Firefly III at $API_HOST.";
window.parent.postMessage({
renderTemplate: {
rpcId: "0",
template: template,
clipboardButton: 'left'
}
}, "*");
}
document.addEventListener("DOMContentLoaded", requestIframeURL);
var copyIframeURLToElement = function (event) {
if (event.data.rpcId === "0") {
if (event.data.error) {
console.log("ERROR: " + event.data.error);
} else {
var el = document.getElementById("offer-iframe");
el.setAttribute("src", event.data.uri);
}
}
};
window.addEventListener("message", copyIframeURLToElement);
</script>
{% endif %}
{% endblock %}