Skip to content

Firefly III: a personal finances manager

More stuff for new layout.

James Coledd5a179ba1f2
diff --git a/app/Models/TransactionCurrency.php b/app/Models/TransactionCurrency.php
index 8d1ca509af..5b05bc9cd5 100644
--- a/app/Models/TransactionCurrency.php
+++ b/app/Models/TransactionCurrency.php
@@ -67,7 +67,6 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @property-read int|null $budget_limits_count
* @property-read int|null $transaction_journals_count
* @property-read int|null $transactions_count
- * @property string $name
*/
class TransactionCurrency extends Model
{
diff --git a/app/User.php b/app/User.php
index ee262ecccf..f1bafdc01e 100644
--- a/app/User.php
+++ b/app/User.php
@@ -44,6 +44,7 @@ use FireflyIII\Models\Tag;
use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionGroup;
use FireflyIII\Models\TransactionJournal;
+use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
@@ -135,10 +136,6 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
* @property-read int|null $transactions_count
* @method static \Illuminate\Database\Eloquent\Builder|\FireflyIII\User whereMfaSecret($value)
* @method static \Illuminate\Database\Eloquent\Builder|\FireflyIII\User whereObjectguid($value)
- * @property string $password
- * @property bool $blocked
- * @property string|null $blocked_code
- * @property-read \Illuminate\Database\Eloquent\Collection|\FireflyIII\Models\Role[] $roles
* @property string|null $provider
* @method static \Illuminate\Database\Eloquent\Builder|\FireflyIII\User whereProvider($value)
*/
diff --git a/config/mail.php b/config/mail.php
index 371669dbd2..57d7998ba6 100644
--- a/config/mail.php
+++ b/config/mail.php
@@ -62,10 +62,10 @@ return [
'transport' => 'sendmail',
'path' => '/usr/sbin/sendmail -bs',
],
-
'log' => [
'transport' => 'log',
- 'channel' => env('MAIL_LOG_CHANNEL'),
+ 'channel' => env('MAIL_LOG_CHANNEL', 'stack'),
+ 'level' => 'debug',
],
'array' => [
diff --git a/frontend/mix-manifest.json b/frontend/mix-manifest.json
index d0d64593d8..dcf1d27f48 100644
--- a/frontend/mix-manifest.json
+++ b/frontend/mix-manifest.json
@@ -1,9 +1,11 @@
{
- "/public/js/dashboard.js": "/public/js/dashboard.js",
- "/public/css/app.css": "/public/css/app.css",
- "/public/js/dashboard.js.map": "/public/js/dashboard.js.map",
"/public/js/manifest.js": "/public/js/manifest.js",
"/public/js/manifest.js.map": "/public/js/manifest.js.map",
"/public/js/vendor.js": "/public/js/vendor.js",
- "/public/js/vendor.js.map": "/public/js/vendor.js.map"
+ "/public/js/vendor.js.map": "/public/js/vendor.js.map",
+ "/public/js/dashboard.js": "/public/js/dashboard.js",
+ "/public/css/app.css": "/public/css/app.css",
+ "/public/js/dashboard.js.map": "/public/js/dashboard.js.map",
+ "/public/js/register.js": "/public/js/register.js",
+ "/public/js/register.js.map": "/public/js/register.js.map"
}
diff --git a/frontend/src/bootstrap.js b/frontend/src/bootstrap.js
index acbb0110a8..8588cb2142 100644
--- a/frontend/src/bootstrap.js
+++ b/frontend/src/bootstrap.js
@@ -1,34 +1,8 @@
// imports
-import Vue from 'vue';
-import VueI18n from 'vue-i18n'
-import * as uiv from 'uiv';
// export jquery for others scripts to use
window.$ = window.jQuery = require('jquery');
-// axios
-window.axios = require('axios');
-window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
-
-// CSRF
-let token = document.head.querySelector('meta[name="csrf-token"]');
-
-if (token) {
- window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
-} else {
- console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
-}
-
// admin stuff
-require('jquery-ui');
require('bootstrap');
-require('./dist/js/adminlte');
-require('overlayscrollbars');
-
-// vue
-window.vuei18n = VueI18n;
-window.uiv =uiv;
-Vue.use(vuei18n);
-Vue.use(uiv);
-window.Vue = Vue;
diff --git a/frontend/webpack.mix.js b/frontend/webpack.mix.js
index 7ce48a0f43..e247dac940 100644
--- a/frontend/webpack.mix.js
+++ b/frontend/webpack.mix.js
@@ -34,6 +34,9 @@ mix
// dashboard component (frontpage):
.js('src/pages/dashboard.js', 'public/js')
+ // register page
+ .js('src/pages/register.js', 'public/js')
+
.extract().sourceMaps()
diff --git a/resources/views/v2/auth/login.twig b/resources/views/v2/auth/login.twig
index a74db40d11..c30b7b73b8 100644
--- a/resources/views/v2/auth/login.twig
+++ b/resources/views/v2/auth/login.twig
@@ -25,7 +25,7 @@
{# default header #}
<div class="login-box">
<div class="login-logo">
- <img src="v2/images/logo-small.png" alt="Firefly III" width="40"/>
+ <img src="v2/images/firefly-iii-logo.png" alt="Firefly III" width="40"/>
<a href="{{ route('index') }}"><b>Firefly</b>III</a>
</div>
@@ -70,7 +70,7 @@
<div class="row">
<div class="col-8">
<div class="icheck-primary">
- <input id="remember" type="checkbox" name="remember" {% if remember %}checked="checked"{% endif %} value="1">
+ <input id="remember" checked type="checkbox" name="remember" {% if remember %}checked="checked"{% endif %} value="1">
<label for="remember">
{{ trans('form.remember_me') }}
</label>
@@ -83,18 +83,23 @@
<!-- /.col -->
</div>
</form>
- {% if allowReset %}
- <p class="mb-1">
- <a href="{{ URL.to('/password/reset') }}">{{ 'forgot_my_password'|_ }}</a>
- </p>
- {% endif %}
- {% if allowRegistration %}
- <p class="mb-0">
- <a href="{{ URL.to('/register') }}">{{ 'register_new_account'|_ }}</a><br>
- </p>
- {% endif %}
+ <div class="row">
+ <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
+ <ul class="list-unstyled small">
+ {% if allowReset %}
+ <li>
+ <a href="{{ route('password.reset.request') }}">{{ 'forgot_my_password'|_ }}</a>
+ </li>
+ {% endif %}
+ {% if allowRegistration %}
+ <li>
+ <a href="{{ route('register') }}">{{ 'register_new_account'|_ }}</a><br>
+ </li>
+ {% endif %}
+ </ul>
+ </div>
+ </div>
</div>
- <!-- /.login-card-body -->
</div>
</div>
<!-- /.login-box -->
diff --git a/resources/views/v2/auth/passwords/email.twig b/resources/views/v2/auth/passwords/email.twig
new file mode 100644
index 0000000000..060f1a1b6e
--- /dev/null
+++ b/resources/views/v2/auth/passwords/email.twig
@@ -0,0 +1,83 @@
+{% extends "./layout/auth" %}
+{% block content %}
+
+
+ {% if errors|length > 0 %}
+ <div class="row">
+ <div class="alert alert-danger alert-dismissible">
+ <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
+ <h5><i class="icon fas fa-ban"></i> {{ 'flash_error'|_ }}</h5>
+ <p>
+ {{ 'problems_with_input'|_ }}
+ </p>
+ <ul class="list-unstyled">
+ {% for error in errors.all %}
+ <li>{{ error }}</li>
+ {% endfor %}
+ </ul>
+ </div>
+ </div>
+ {% endif %}
+
+ {# default header #}
+ <div class="login-box">
+ <div class="login-logo">
+ <img src="v2/images/firefly-iii-logo.png" alt="Firefly III" width="40"/>
+ <a href="{{ route('index') }}"><b>Firefly</b>III</a>
+ </div>
+
+
+ <!-- /.login-logo -->
+ <div class="card">
+ <div class="card-body login-card-body">
+ <p class="login-box-msg">{{ 'reset_password'|_ }}</p>
+
+ {% if session('status') %}
+ <div class="row">
+ <div class="col-lg-12">
+ <p class="text-success">
+ {{ session('status') }}
+ </p>
+ </div>
+ </div>
+ {% else %}
+ <form action="{{ route('password.email') }}" method="post">
+ <input type="hidden" name="_token" value="{{ csrf_token() }}"/>
+ <div class="input-group mb-3">
+ <input type="email" required autocomplete="email" class="form-control" name="email" placeholder="{{ trans('form.email') }}"/>
+ <div class="input-group-append">
+ <div class="input-group-text">
+ <span class="fas fa-envelope"></span>
+ </div>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-8">
+ </div>
+ <div class="col-4">
+ <button type="submit" class="btn btn-primary btn-block">{{ 'reset_button'|_ }}</button>
+ </div>
+ </div>
+ </form>
+ <div class="row">
+ <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
+ <ul class="list-unstyled small">
+
+ <li>
+ <a href="{{ route('login') }}">{{ 'want_to_login'|_ }}</a>
+ </li>
+
+ {% if allowRegistration %}
+ <li>
+ <a href="{{ route('register') }}">{{ 'register_new_account'|_ }}</a><br>
+ </li>
+ {% endif %}
+ </ul>
+ </div>
+ </div>
+ {% endif %}
+ </div>
+ </div>
+ </div>
+ <!-- /.login-box -->
+{% endblock %}
diff --git a/resources/views/v2/auth/passwords/reset.twig b/resources/views/v2/auth/passwords/reset.twig
new file mode 100644
index 0000000000..267913a8e6
--- /dev/null
+++ b/resources/views/v2/auth/passwords/reset.twig
@@ -0,0 +1,113 @@
+{% extends "./layout/auth" %}
+{% block content %}
+
+
+ {% if errors|length > 0 %}
+ <div class="row">
+ <div class="alert alert-danger alert-dismissible">
+ <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
+ <h5><i class="icon fas fa-ban"></i> {{ 'flash_error'|_ }}</h5>
+ <p>
+ {{ 'problems_with_input'|_ }}
+ </p>
+ <ul class="list-unstyled">
+ {% for error in errors.all %}
+ <li>{{ error }}</li>
+ {% endfor %}
+ </ul>
+ </div>
+ </div>
+
+
+
+ {% endif %}
+
+
+
+
+
+
+ {# default header #}
+ <div class="login-box">
+ <div class="login-logo">
+ <img src="v2/images/firefly-iii-logo.png" alt="Firefly III" width="40"/>
+ <a href="{{ route('index') }}"><b>Firefly</b>III</a>
+ </div>
+
+
+
+ <!-- /.login-logo -->
+ <div class="card">
+ <div class="card-body login-card-body">
+ <p class="login-box-msg">{{ 'reset_password'|_ }}</p>
+
+ <form action="{{ route('password.reset.post') }}" method="post">
+ <input type="hidden" name="_token" value="{{ csrf_token() }}"/>
+ <input type="hidden" name="token" value="{{ token }}">
+ <div class="input-group mb-3">
+ <input type="email" required autocomplete="email" name="email" class="form-control" value="{{ old('email') }}" placeholder="{{ trans('form.email') }}"/>
+ <div class="input-group-append">
+ <div class="input-group-text">
+ <span class="fas fa-envelope"></span>
+ </div>
+ </div>
+ </div>
+
+ <div class="input-group mb-3">
+ <input type="password" name="password" required autocomplete="new-password" class="form-control"
+ placeholder="{{ trans('form.password') }}"/>
+ <div class="input-group-append">
+ <div class="input-group-text">
+ <span class="fas fa-lock"></span>
+ </div>
+ </div>
+ </div>
+
+ <div class="input-group mb-3">
+ <input type="password" name="password_confirmation" required autocomplete="new-password" class="form-control"
+ placeholder="{{ trans('form.password_confirmation') }}"/>
+ <div class="input-group-append">
+ <div class="input-group-text">
+ <span class="fas fa-lock"></span>
+ </div>
+ </div>
+ </div>
+
+
+
+
+
+
+
+ <div class="row">
+ <div class="col-6">
+
+ </div>
+ <!-- /.col -->
+ <div class="col-6">
+ <button type="submit" class="btn btn-primary btn-block">{{ 'button_reset_password'|_ }}</button>
+ </div>
+ <!-- /.col -->
+ </div>
+ </form>
+ <div class="row">
+ <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
+ <ul class="list-unstyled small">
+
+ <li>
+ <a href="{{ route('login') }}">{{ 'want_to_login'|_ }}</a>
+ </li>
+
+ {% if allowRegistration %}
+ <li>
+ <a href="{{ route('register') }}">{{ 'register_new_account'|_ }}</a><br>
+ </li>
+ {% endif %}
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <!-- /.login-box -->
+{% endblock %}
diff --git a/resources/views/v2/auth/register.twig b/resources/views/v2/auth/register.twig
new file mode 100644
index 0000000000..0d47e63345
--- /dev/null
+++ b/resources/views/v2/auth/register.twig
@@ -0,0 +1,116 @@
+{% extends "./layout/auth" %}
+{% block content %}
+ {# alerts here #}
+
+ {% if errors|length > 0 %}
+
+
+ <div class="row">
+ <div class="alert alert-info alert-dismissible">
+ <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
+ <h5><i class="icon fas fa-info"></i> {{ 'problems_with_input'|_ }}</h5>
+ <ul class="list-unstyled">
+ {% for error in errors.all %}
+ <li>{{ error }}</li>
+ {% endfor %}
+ </ul>
+ </div>
+ </div>
+
+ {% endif %}
+
+
+
+
+ {# default header #}
+ <div class="login-box">
+ <div class="login-logo">
+ <img src="v2/images/firefly-iii-logo.png" alt="Firefly III" width="40"/>
+ <a href="{{ route('index') }}"><b>Firefly</b>III</a>
+ </div>
+
+ <!-- /.login-logo -->
+ <div class="card">
+ <div class="card-body login-card-body">
+ <p class="login-box-msg">{{ 'register_new_account'|_ }}</p>
+
+ <form action="{{ route('register') }}" method="post">
+ <input type="hidden" name="_token" value="{{ csrf_token() }}"/>
+ <div class="input-group mb-3">
+ <input type="email" required autocomplete="email" name="email" value="{{ email }}" class="form-control"
+ placeholder="{{ trans('form.email') }}"/>
+ <div class="input-group-append">
+ <div class="input-group-text">
+ <span class="fas fa-envelope"></span>
+ </div>
+ </div>
+ </div>
+
+ <div class="input-group mb-3">
+ <input type="password" name="password" required autocomplete="new-password" class="form-control"
+ placeholder="{{ trans('form.password') }}"/>
+ <div class="input-group-append">
+ <div class="input-group-text">
+ <span class="fas fa-lock"></span>
+ </div>
+ </div>
+ </div>
+
+ <div class="input-group mb-3">
+ <input type="password" name="password_confirmation" required autocomplete="new-password" class="form-control"
+ placeholder="{{ trans('form.password_confirmation') }}"/>
+ <div class="input-group-append">
+ <div class="input-group-text">
+ <span class="fas fa-lock"></span>
+ </div>
+ </div>
+ </div>
+
+ <div class="row">
+ <div class="col-8">
+ <div class="icheck-primary">
+ <input id="remember" checked type="checkbox" name="remember" {% if remember %}checked="checked"{% endif %} value="1">
+ <label for="remember">
+ {{ trans('form.verify_password') }}
+ </label>
+
+ </div>
+ </div>
+ <!-- /.col -->
+ <div class="col-4">
+ <button type="submit" class="btn btn-primary btn-block">{{ 'button_register'|_ }}</button>
+ </div>
+ <!-- /.col -->
+ </div>
+ <div class="row">
+ <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
+ <ul class="list-unstyled small">
+ <li>
+ <a data-toggle="modal" data-target="#passwordModal" href="#passwordModal">
+ What is "verify password security"?
+ </a>
+ </li>
+ <li>
+ <a href="{{ URL.to('/login') }}">{{ 'want_to_login'|_ }}</a>
+ </li>
+ <li>
+ <a href="{{ route('password.reset.request') }}">{{ 'forgot_my_password'|_ }}</a>
+ </li>
+ </div>
+ </div>
+ </form>
+
+ </div>
+ <!-- /.login-card-body -->
+ </div>
+ </div>
+
+ {% include 'partials.auth.password-modal' %}
+
+ <!-- /.login-box -->
+{% endblock %}
+{% block scripts %}
+ <script src="v2/js/manifest.js" nonce="{{ JS_NONCE }}"></script>
+ <script src="v2/js/vendor.js" nonce="{{ JS_NONCE }}"></script>
+ <script src="v2/js/register.js" nonce="{{ JS_NONCE }}"></script>
+{% endblock %}
diff --git a/resources/views/v2/emails/access-token-created-html.twig b/resources/views/v2/emails/access-token-created-html.twig
new file mode 100644
index 0000000000..ede3a2f044
--- /dev/null
+++ b/resources/views/v2/emails/access-token-created-html.twig
@@ -0,0 +1,13 @@
+{% include 'emails.header-html' %}
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.access_token_created_body') }}
+</p>
+
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.access_token_created_explanation')|raw }}
+</p>
+
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.access_token_created_revoke', {url: route('profile.index') }) }}
+</p>
+{% include 'emails.footer-html' %}
diff --git a/resources/views/v2/emails/access-token-created-text.twig b/resources/views/v2/emails/access-token-created-text.twig
new file mode 100644
index 0000000000..04d85cdf35
--- /dev/null
+++ b/resources/views/v2/emails/access-token-created-text.twig
@@ -0,0 +1,7 @@
+{% include 'emails.header-text' %}
+{{ trans('email.access_token_created_body')|raw }}
+
+{{ trans('email.access_token_created_explanation')|striptags|raw }}
+
+{{ trans('email.access_token_created_revoke', {url: route('profile.index') })|raw }}
+{% include 'emails.footer-text' %}
diff --git a/resources/views/v2/emails/admin-test-html.twig b/resources/views/v2/emails/admin-test-html.twig
new file mode 100644
index 0000000000..6d343085b8
--- /dev/null
+++ b/resources/views/v2/emails/admin-test-html.twig
@@ -0,0 +1,5 @@
+{% include 'emails.header-html' %}
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.admin_test_body', {email: email })}}
+</p>
+{% include 'emails.footer-html' %}
diff --git a/resources/views/v2/emails/admin-test-text.twig b/resources/views/v2/emails/admin-test-text.twig
new file mode 100644
index 0000000000..e6c5aca702
--- /dev/null
+++ b/resources/views/v2/emails/admin-test-text.twig
@@ -0,0 +1,3 @@
+{% include 'emails.header-text' %}
+{{ trans('email.admin_test_body', {email: email })|raw }}
+{% include 'emails.footer-text' %}
diff --git a/resources/views/v2/emails/confirm-email-change-html.twig b/resources/views/v2/emails/confirm-email-change-html.twig
new file mode 100644
index 0000000000..7eb907c421
--- /dev/null
+++ b/resources/views/v2/emails/confirm-email-change-html.twig
@@ -0,0 +1,18 @@
+{% include 'emails.header-html' %}
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.email_change_body_to_new')}}
+</p>
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{trans('email.email_change_old', { email: oldEmail }) }}
+</p>
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{trans('email.email_change_new_strong', { email: newEmail })|raw }}
+</p>
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.email_change_instructions')}}
+</p>
+
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ <a href="{{ uri }}">{{ uri }}</a>
+</p>
+{% include 'emails.footer-html' %}
diff --git a/resources/views/v2/emails/confirm-email-change-text.twig b/resources/views/v2/emails/confirm-email-change-text.twig
new file mode 100644
index 0000000000..1fd8695814
--- /dev/null
+++ b/resources/views/v2/emails/confirm-email-change-text.twig
@@ -0,0 +1,10 @@
+{% include 'emails.header-text' %}
+{{ trans('email.email_change_body_to_new')|raw }}
+
+{{trans('email.email_change_old', { email: oldEmail })|raw }}
+
+{{trans('email.email_change_new', { email: newEmail })|raw }}
+
+{{ trans('email.email_change_instructions')|raw }}
+{{ uri }}
+{% include 'emails.footer-text' %}
diff --git a/resources/views/v2/emails/error-html.twig b/resources/views/v2/emails/error-html.twig
new file mode 100644
index 0000000000..d90bc67879
--- /dev/null
+++ b/resources/views/v2/emails/error-html.twig
@@ -0,0 +1,45 @@
+{% include 'emails.header-html' %}
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.error_intro', { version: version, errorMessage: errorMessage })|raw }}
+</p>
+
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.error_type', {class: class }) }}
+</p>
+
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.error_timestamp', {time: time }) }}
+
+</p>
+
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.error_location', { file: file, line: line, code: code })|raw }}
+</p>
+
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {% if loggedIn %}
+ {{ trans('email.error_user', { id: user.id, email: user.email })|raw }}
+ {% else %}
+ {{ trans('email.error_no_user') }}
+ {% endif %}
+</p>
+
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.error_ip', { ip: ip }) }}<br />
+ {{ trans('email.error_url', {url :url }) }}<br />
+ {{ trans('email.error_user_agent', {userAgent: userAgent }) }}
+</p>
+
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.error_stacktrace')|raw }}
+</p>
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.error_github_html')|raw }}
+</p>
+
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.error_stacktrace_below') }}</p>
+<p style="font-family: monospace;font-size:11px;color:#aaa">
+ {{ stackTrace|nl2br }}
+</p>
+{% include 'emails.footer-html' %}
diff --git a/resources/views/v2/emails/error-text.twig b/resources/views/v2/emails/error-text.twig
new file mode 100644
index 0000000000..35e4a46334
--- /dev/null
+++ b/resources/views/v2/emails/error-text.twig
@@ -0,0 +1,27 @@
+{% include 'emails.header-text' %}
+{{ trans('email.error_intro', { version: version, errorMessage: errorMessage })|striptags|raw }}
+
+{{ trans('email.error_type', {class: class })|raw }}
+
+{{ trans('email.error_timestamp', {time: time })|raw }}
+
+{{ trans('email.error_location', { file: file , line: line, code: code })|striptags|raw }}
+
+{% if loggedIn %}
+{{ trans('email.error_user', { id: user.id, email: user.email })|striptags|raw }}
+{% else %}
+{{ trans('email.error_no_user')|raw }}
+{% endif %}
+
+{{ trans('email.error_ip', { ip: ip }) }}
+{{ trans('email.error_url', {url :url}) }}
+{{ trans('email.error_user_agent', {userAgent: userAgent } ) }}
+
+{{ trans('email.error_stacktrace')|striptags|raw }}
+
+{{ trans('email.error_github_text' )|raw }}
+
+{{ trans('email.error_stacktrace_below')|raw }}
+
+{{ stackTrace|raw }}
+{% include 'emails.footer-text' %}
diff --git a/resources/views/v2/emails/footer-html.twig b/resources/views/v2/emails/footer-html.twig
new file mode 100644
index 0000000000..a5caad932a
--- /dev/null
+++ b/resources/views/v2/emails/footer-html.twig
@@ -0,0 +1,13 @@
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.closing') }}
+</p>
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.signature') }}
+</p>
+
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:11px;color:#aaa;">
+ {{ trans('email.footer_ps', {ipAddress: ipAddress}) }}
+</p>
+
+</body>
+</html>
diff --git a/resources/views/v2/emails/footer-text.twig b/resources/views/v2/emails/footer-text.twig
new file mode 100644
index 0000000000..54a6c6b68d
--- /dev/null
+++ b/resources/views/v2/emails/footer-text.twig
@@ -0,0 +1,6 @@
+
+{{ trans('email.closing')|raw }}
+
+{{ trans('email.signature')|raw }}
+
+{{ trans('email.footer_ps', {ipAddress: ipAddress})|raw }}
diff --git a/resources/views/v2/emails/header-html.twig b/resources/views/v2/emails/header-html.twig
new file mode 100644
index 0000000000..d4e89e3255
--- /dev/null
+++ b/resources/views/v2/emails/header-html.twig
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
+
+</head>
+<body>
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.greeting') }}
+</p>
diff --git a/resources/views/v2/emails/header-text.twig b/resources/views/v2/emails/header-text.twig
new file mode 100644
index 0000000000..16cd8490c4
--- /dev/null
+++ b/resources/views/v2/emails/header-text.twig
@@ -0,0 +1,2 @@
+{{ trans('email.greeting')|raw }}
+
diff --git a/resources/views/v2/emails/oauth-client-created-html.twig b/resources/views/v2/emails/oauth-client-created-html.twig
new file mode 100644
index 0000000000..03906957f1
--- /dev/null
+++ b/resources/views/v2/emails/oauth-client-created-html.twig
@@ -0,0 +1,13 @@
+{% include 'emails.header-html' %}
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.oauth_created_body', { name:client.name, url: client.redirect })|raw }}
+</p>
+
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.oauth_created_explanation')|raw }}
+</p>
+
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.oauth_created_undo', { url:route('profile.index')}) }}
+</p>
+{% include 'emails.footer-html' %}
diff --git a/resources/views/v2/emails/oauth-client-created-text.twig b/resources/views/v2/emails/oauth-client-created-text.twig
new file mode 100644
index 0000000000..566f2ad89b
--- /dev/null
+++ b/resources/views/v2/emails/oauth-client-created-text.twig
@@ -0,0 +1,7 @@
+{% include 'emails.header-text' %}
+{{ trans('email.oauth_created_body', {name: client.name, url: client.redirect })|striptags|raw }}
+
+{{ trans('email.oauth_created_explanation')|striptags|raw }}
+
+{{ trans('email.oauth_created_undo', { url:route('profile.index')})|raw }}
+{% include 'emails.footer-text' %}
diff --git a/resources/views/v2/emails/password-html.twig b/resources/views/v2/emails/password-html.twig
new file mode 100644
index 0000000000..2f020fb924
--- /dev/null
+++ b/resources/views/v2/emails/password-html.twig
@@ -0,0 +1,13 @@
+{% include 'emails.header-html' %}
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.reset_pw_instructions') }}
+</p>
+
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.reset_pw_warning')|raw }}
+</p>
+
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ <a href="{{ url }}">{{ url }}</a>
+</p>
+{% include 'emails.footer-html' %}
diff --git a/resources/views/v2/emails/password-text.twig b/resources/views/v2/emails/password-text.twig
new file mode 100644
index 0000000000..258521ea99
--- /dev/null
+++ b/resources/views/v2/emails/password-text.twig
@@ -0,0 +1,7 @@
+{% include 'emails.header-text' %}
+{{ trans('email.reset_pw_instructions')|raw }}
+
+{{ trans('email.reset_pw_warning')|striptags|raw }}
+
+{{ url }}
+{% include 'emails.footer-text' %}
diff --git a/resources/views/v2/emails/registered-html.twig b/resources/views/v2/emails/registered-html.twig
new file mode 100644
index 0000000000..78d8b1052e
--- /dev/null
+++ b/resources/views/v2/emails/registered-html.twig
@@ -0,0 +1,20 @@
+{% include 'emails.header-html' %}
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.registered_welcome', {address: address})|raw }}
+</p>
+
+<ul>
+ <li style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.registered_pw', {address: address})|raw }}
+ </li>
+ <li style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.registered_help')}}
+ </li>
+ <li style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.registered_doc_html')|raw }}
+ </li>
+</ul>
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.registered_closing')}}
+</p>
+{% include 'emails.footer-html' %}
diff --git a/resources/views/v2/emails/registered-text.twig b/resources/views/v2/emails/registered-text.twig
new file mode 100644
index 0000000000..78c696b065
--- /dev/null
+++ b/resources/views/v2/emails/registered-text.twig
@@ -0,0 +1,21 @@
+{% include 'emails.header-text' %}
+
+{{ trans('email.registered_welcome')|striptags|raw }}
+
+* {{ trans('email.registered_pw')|striptags|raw }}
+* {{ trans('email.registered_help')|raw }}
+* {{ trans('email.registered_doc_text')|raw }}
+
+{{ trans('email.registered_closing')|raw }}
+
+{{ trans('email.registered_firefly_iii_link')|raw }}
+{{ address }}
+
+{{ trans('email.registered_pw_reset_link')|raw }}
+{{ address }}/password/reset
+
+{{ trans('email.registered_doc_link')}}
+https://github.com/firefly-iii/firefly-iii
+https://firefly-iii.org/
+
+{% include 'emails.footer-text' %}
diff --git a/resources/views/v2/emails/report-new-journals-html.twig b/resources/views/v2/emails/report-new-journals-html.twig
new file mode 100644
index 0000000000..c4414ae4ed
--- /dev/null
+++ b/resources/views/v2/emails/report-new-journals-html.twig
@@ -0,0 +1,78 @@
+{% include 'emails.header-html' %}
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans_choice('email.new_journals_header', transformed|length ) }}
+</p>
+
+<!-- loop groups -->
+<ol>
+ {% for group in transformed %}
+ <li>
+ {% set count = group.transactions|length %}
+ <!-- if journals === 1, skip straight to journals. -->
+ {% if 1 == count %}
+ {% set journal = group.transactions[0] %}
+ <a href="{{ route('transactions.show', [group.id]) }}">{{ journal.description }}</a>,
+ <!-- amount -->
+ {% if journal.type == 'deposit' %}
+ <span style="color:#3c763d;">
+ {{ formatAmountBySymbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places, false) }}
+ {% if null != journal.foreign_amount*-1 %}
+ ({{ formatAmountBySymbol(journal.foreign_amount, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places, false) }})
+ {% endif %}
+ </span>
+ {% elseif journal.type == 'transfer' %}
+ <span style="color:#31708f">
+ {{ formatAmountBySymbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places, false) }}
+ {% if null != journal.foreign_amount %}
+ ({{ formatAmountBySymbol(journal.foreign_amount*-1, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places, false) }})
+ {% endif %}
+ </span>
+ {% else %}
+ <span style="color:#a94442">
+ {{ formatAmountBySymbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places, false) }}
+ {% if null != journal.foreign_amount %}
+ ({{ formatAmountBySymbol(journal.foreign_amount*-1, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places, false) }})
+ {% endif %}
+ </span>
+
+ {% endif %}
+ <!-- / amount -->
+ {% else %}
+ <a href="{{ route('transactions.show', [group.id]) }}">{{ group.group_title }}</a>
+ <ol>
+ {% for journal in group.transactions %}
+ <li>
+ {{ journal.description }},
+ <!-- amount -->
+ {% if journal.type == 'deposit' %}
+ <span style="color:#3c763d;">
+ {{ formatAmountBySymbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places, false) }}
+ {% if null != journal.foreign_amount*-1 %}
+ ({{ formatAmountBySymbol(journal.foreign_amount, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places, false) }})
+ {% endif %}
+ </span>
+ {% elseif journal.type == 'transfer' %}
+ <span style="color:#31708f">
+ {{ formatAmountBySymbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places, false) }}
+ {% if null != journal.foreign_amount %}
+ ({{ formatAmountBySymbol(journal.foreign_amount*-1, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places, false) }})
+ {% endif %}
+ </span>
+ {% else %}
+ <span style="color:#a94442">
+ {{ formatAmountBySymbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places, false) }}
+ {% if null != journal.foreign_amount %}
+ ({{ formatAmountBySymbol(journal.foreign_amount*-1, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places, false) }})
+ {% endif %}
+ </span>
+
+ {% endif %}
+ </li>
+ {% endfor %}
+ </ol>
+ {% endif %}
+ </li>
+ {% endfor %}
+</ol>
+
+{% include 'emails.footer-html' %}
diff --git a/resources/views/v2/emails/report-new-journals-text.twig b/resources/views/v2/emails/report-new-journals-text.twig
new file mode 100644
index 0000000000..fe6455141c
--- /dev/null
+++ b/resources/views/v2/emails/report-new-journals-text.twig
@@ -0,0 +1,16 @@
+{% include 'emails.header-text' %}
+{{ trans_choice('email.new_journals_header', transformed|length )|raw }}
+
+
+{% for group in transformed %}
+{% set count = group.transactions|length %}
+{% if 1 == count %}{% set journal = group.transactions[0] %}
+- {{ journal.description }}, {% if journal.type == 'deposit' %}{{ formatAmountBySymbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places, false) }}{% if null != journal.foreign_amount*-1 %} ({{ formatAmountBySymbol(journal.foreign_amount, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places, false) }}){% endif %}{% elseif journal.type == 'transfer' %}{{ formatAmountBySymbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places, false) }}{% if null != journal.foreign_amount %} ({{ formatAmountBySymbol(journal.foreign_amount*-1, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places, false) }}){% endif %}{% else %}{{ formatAmountBySymbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places, false) }}{% if null != journal.foreign_amount %} ({{ formatAmountBySymbol(journal.foreign_amount*-1, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places, false) }}){% endif %}{% endif %}
+
+{% else %}- {{ group.group_title }}
+{% for journal in group.transactions %}-- {{ journal.description }}, {% if journal.type == 'deposit' %}{{ formatAmountBySymbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places, false) }}{% if null != journal.foreign_amount*-1 %} ({{ formatAmountBySymbol(journal.foreign_amount, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places, false) }}){% endif %}{% elseif journal.type == 'transfer' %}{{ formatAmountBySymbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places, false) }}{% if null != journal.foreign_amount %} ({{ formatAmountBySymbol(journal.foreign_amount*-1, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places, false) }}){% endif %}{% else %}{{ formatAmountBySymbol(journal.amount*-1, journal.currency_symbol, journal.currency_decimal_places, false) }}{% if null != journal.foreign_amount %} ({{ formatAmountBySymbol(journal.foreign_amount*-1, journal.foreign_currency_symbol, journal.foreign_currency_decimal_places, false) }}){% endif %}{% endif %}
+
+{% endfor %}
+{% endif %}
+{% endfor %}
+{% include 'emails.footer-text' %}
diff --git a/resources/views/v2/emails/undo-email-change-html.twig b/resources/views/v2/emails/undo-email-change-html.twig
new file mode 100644
index 0000000000..00bc5bb7a4
--- /dev/null
+++ b/resources/views/v2/emails/undo-email-change-html.twig
@@ -0,0 +1,17 @@
+{% include 'emails.header-html' %}
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.email_change_body_to_old')|raw }}
+</p>
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{ trans('email.email_change_ignore') }}
+</p>
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{trans('email.email_change_old_strong', { email: oldEmail })|raw }}
+</p>
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{trans('email.email_change_new', { email: newEmail }) }}
+</p>
+<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
+ {{trans('email.email_change_undo_link')}} <a href="{{ uri }}">{{ uri }}</a>
+</p>
+{% include 'emails.footer-html' %}
diff --git a/resources/views/v2/emails/undo-email-change-text.twig b/resources/views/v2/emails/undo-email-change-text.twig
new file mode 100644
index 0000000000..2c719b9e4d
--- /dev/null
+++ b/resources/views/v2/emails/undo-email-change-text.twig
@@ -0,0 +1,11 @@
+{% include 'emails.header-text' %}
+{{ trans('email.email_change_body_to_old')|striptags|raw }}
+
+{{ trans('email.email_change_ignore')|raw }}
+
+{{trans('email.email_change_old', { email: oldEmail })|raw }}
+
+{{trans('email.email_change_new', { email: newEmail })|raw }}
+
+{{ trans('email.email_change_undo_link')|raw }} {{ uri }}
+{% include 'emails.footer-text' %}
diff --git a/resources/views/v2/errors/FireflyException.twig b/resources/views/v2/errors/FireflyException.twig
new file mode 100644
index 0000000000..5617c4994f
--- /dev/null
+++ b/resources/views/v2/errors/FireflyException.twig
@@ -0,0 +1,80 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <base href="{{ route('index') }}/">
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <title>AdminLTE 3 | 500 Error</title>
+ <!-- Tell the browser to be responsive to screen width -->
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+
+ <link rel="stylesheet" href="v2/plugins/local-fonts/gf-source.css">
+ <link rel="stylesheet" href="v2/css/app.css">
+
+</head>
+<body>
+
+<div class="container-fluid">
+ <div class="row">
+ <div class="col-12">
+ <div class="error-page">
+ <h2 class="headline text-danger">500</h2>
+
+ <div class="error-content">
+ <h3><i class="fas fa-exclamation-triangle text-danger"></i> {{ trans('errors.error_occurred') }}</h3>
+
+ <p>
+ {{ trans('errors.error_not_recoverable') }}
+ </p>
+ <p class="text-danger">
+ {{ exception.getMessage |default('General unknown errror') }}
+ </p>
+
+ {% if not debug %}
+ <h4>
+ {{ trans('errors.more_info') }}
+ </h4>
+ <p>
+ {{ trans('errors.collect_info')|raw }}
+ {{ trans('errors.collect_info_more')|raw }}
+ </p>
+ <h4>
+ {{ trans('errors.github_help') }}
+ </h4>
+ <p>
+ {{ trans('errors.github_instructions')|raw }}
+ </p>
+ <ol>
+ <li>{{ trans('errors.use_search') }}</li>
+ <li>{{ trans('errors.include_info', { link: route('debug') })|raw }}</li>
+ <li>{{ trans('errors.tell_more') }}</li>
+ <li>{{ trans('errors.include_logs') }}</li>
+ <li>{{ trans('errors.what_did_you_do') }}</li>
+ </ol>
+ {% endif %}
+
+ </div>
+ </div>
+ </div>
+ </div>
+
+ {% if debug %}
+ <div class="row">
+ <div class="col-lg-8 offset-lg-2">
+ <h4>{{ trans('errors.error') }}</h4>
+ <p>
+ {{ trans('errors.error_location', {file: exception.getFile, line: exception.getLine, code: exception.getCode })|raw }}
+ </p>
+ <h4>
+ {{ trans('errors.stacktrace') }}
+ </h4>
+ <div style="font-family: monospace;font-size:11px;">
+ {{ exception.getTraceAsString|nl2br }}
+ </div>
+ </div>
+ </div>
+ {% endif %}
+
+</div>
+</body>
+</html>
diff --git a/resources/views/v2/layout/auth.twig b/resources/views/v2/layout/auth.twig
new file mode 100644
index 0000000000..1ce7466456
--- /dev/null
+++ b/resources/views/v2/layout/auth.twig
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html lang="{{ trans('config.html_language') }}">
+<head>
+ <base href="{{ route('index') }}/" />
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <title>Firefly III
+ {% if title != "Firefly" and title != "" %}
+ // {{ title }}
+ {% endif %}
+
+ {% if subTitle %}
+ // {{ subTitle }}
+ {% endif %}</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link rel="stylesheet" href="v2/plugins/local-fonts/gf-source.css">
+ <link rel="stylesheet" href="v2/css/app.css">
+</head>
+<body class="hold-transition login-page">
+{% block content %}{% endblock %}
+{% block scripts %}{% endblock %}
+</body>
+</html>
diff --git a/resources/views/v2/partials/auth/password-modal.twig b/resources/views/v2/partials/auth/password-modal.twig
new file mode 100644
index 0000000000..4da1f437b4
--- /dev/null
+++ b/resources/views/v2/partials/auth/password-modal.twig
@@ -0,0 +1,36 @@
+<!-- Modal -->
+<div class="modal fade" id="passwordModal" tabindex="-1" role="dialog" aria-labelledby="passwordModalLabel" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <h5 class="modal-title" id="exampleModalLabel">{{ 'secure_pw_title'|_ }}</h5>
+ <button type="button" class="close" data-dismiss="modal" aria-label="{{ 'close'|_ }}">
+ <span aria-hidden="true">&times;</span>
+ </button>
+ </div>
+ <div class="modal-body">
+ <p>
+ {{ 'secure_pw_history'|_ }}
+ </p>
+ <p>
+ {{ 'secure_pw_ff'|_ }}
+ </p>
+ <p>
+ {{ 'secure_pw_check_box'|_ }}
+ </p>
+
+ <h4>{{ 'secure_pw_working_title'|_ }}</h4>
+ <p>
+ {{ 'secure_pw_working'|_ }}
+ </p>
+ <h4>{{ 'secure_pw_should'|_ }}</h4>
+ <p>
+ {{ 'secure_pw_long_password'|_ }}
+ </p>
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-primary" data-dismiss="modal">{{ 'close'|_ }}</button>
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/routes/web.php b/routes/web.php
index d4040adb86..1563e265ae 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -55,7 +55,7 @@ Route::group(
// Password Reset Routes...
Route::get('password/reset/{token}', ['uses' => 'Auth\ResetPasswordController@showResetForm', 'as' => 'password.reset']);
Route::post('password/email', ['uses' => 'Auth\ForgotPasswordController@sendResetLinkEmail', 'as' => 'password.email']);
- Route::post('password/reset', ['uses' => 'Auth\ResetPasswordController@reset']);
+ Route::post('password/reset', ['uses' => 'Auth\ResetPasswordController@reset', 'as' => 'password.reset.post']);
Route::get('password/reset', ['uses' => 'Auth\ForgotPasswordController@showLinkRequestForm', 'as' => 'password.reset.request']);
// Change email routes: