From dd5a179ba1f24a1595167c1613f41df72ac98b63 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 14 Jun 2020 19:17:45 +0200 Subject: [PATCH] More stuff for new layout. --- app/Models/TransactionCurrency.php | 1 - app/User.php | 5 +- config/mail.php | 4 +- frontend/mix-manifest.json | 10 +- frontend/src/bootstrap.js | 26 ---- frontend/webpack.mix.js | 3 + resources/views/v2/auth/login.twig | 31 +++-- resources/views/v2/auth/passwords/email.twig | 83 +++++++++++++ resources/views/v2/auth/passwords/reset.twig | 113 +++++++++++++++++ resources/views/v2/auth/register.twig | 116 ++++++++++++++++++ .../v2/emails/access-token-created-html.twig | 13 ++ .../v2/emails/access-token-created-text.twig | 7 ++ .../views/v2/emails/admin-test-html.twig | 5 + .../views/v2/emails/admin-test-text.twig | 3 + .../v2/emails/confirm-email-change-html.twig | 18 +++ .../v2/emails/confirm-email-change-text.twig | 10 ++ resources/views/v2/emails/error-html.twig | 45 +++++++ resources/views/v2/emails/error-text.twig | 27 ++++ resources/views/v2/emails/footer-html.twig | 13 ++ resources/views/v2/emails/footer-text.twig | 6 + resources/views/v2/emails/header-html.twig | 10 ++ resources/views/v2/emails/header-text.twig | 2 + .../v2/emails/oauth-client-created-html.twig | 13 ++ .../v2/emails/oauth-client-created-text.twig | 7 ++ resources/views/v2/emails/password-html.twig | 13 ++ resources/views/v2/emails/password-text.twig | 7 ++ .../views/v2/emails/registered-html.twig | 20 +++ .../views/v2/emails/registered-text.twig | 21 ++++ .../v2/emails/report-new-journals-html.twig | 78 ++++++++++++ .../v2/emails/report-new-journals-text.twig | 16 +++ .../v2/emails/undo-email-change-html.twig | 17 +++ .../v2/emails/undo-email-change-text.twig | 11 ++ .../views/v2/errors/FireflyException.twig | 80 ++++++++++++ resources/views/v2/layout/auth.twig | 23 ++++ .../v2/partials/auth/password-modal.twig | 36 ++++++ routes/web.php | 2 +- 36 files changed, 844 insertions(+), 51 deletions(-) create mode 100644 resources/views/v2/auth/passwords/email.twig create mode 100644 resources/views/v2/auth/passwords/reset.twig create mode 100644 resources/views/v2/auth/register.twig create mode 100644 resources/views/v2/emails/access-token-created-html.twig create mode 100644 resources/views/v2/emails/access-token-created-text.twig create mode 100644 resources/views/v2/emails/admin-test-html.twig create mode 100644 resources/views/v2/emails/admin-test-text.twig create mode 100644 resources/views/v2/emails/confirm-email-change-html.twig create mode 100644 resources/views/v2/emails/confirm-email-change-text.twig create mode 100644 resources/views/v2/emails/error-html.twig create mode 100644 resources/views/v2/emails/error-text.twig create mode 100644 resources/views/v2/emails/footer-html.twig create mode 100644 resources/views/v2/emails/footer-text.twig create mode 100644 resources/views/v2/emails/header-html.twig create mode 100644 resources/views/v2/emails/header-text.twig create mode 100644 resources/views/v2/emails/oauth-client-created-html.twig create mode 100644 resources/views/v2/emails/oauth-client-created-text.twig create mode 100644 resources/views/v2/emails/password-html.twig create mode 100644 resources/views/v2/emails/password-text.twig create mode 100644 resources/views/v2/emails/registered-html.twig create mode 100644 resources/views/v2/emails/registered-text.twig create mode 100644 resources/views/v2/emails/report-new-journals-html.twig create mode 100644 resources/views/v2/emails/report-new-journals-text.twig create mode 100644 resources/views/v2/emails/undo-email-change-html.twig create mode 100644 resources/views/v2/emails/undo-email-change-text.twig create mode 100644 resources/views/v2/errors/FireflyException.twig create mode 100644 resources/views/v2/layout/auth.twig create mode 100644 resources/views/v2/partials/auth/password-modal.twig 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 #}
@@ -70,7 +70,7 @@
- + @@ -83,18 +83,23 @@
- {% if allowReset %} -

- {{ 'forgot_my_password'|_ }} -

- {% endif %} - {% if allowRegistration %} -

- {{ 'register_new_account'|_ }}
-

- {% endif %} +
+
+ +
+
-
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 %} +
+
+ +
{{ 'flash_error'|_ }}
+

+ {{ 'problems_with_input'|_ }} +

+
    + {% for error in errors.all %} +
  • {{ error }}
  • + {% endfor %} +
+
+
+ {% endif %} + + {# default header #} +
+ + + + +
+ +
+
+ +{% 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 %} +
+
+ +
{{ 'flash_error'|_ }}
+

+ {{ 'problems_with_input'|_ }} +

+
    + {% for error in errors.all %} +
  • {{ error }}
  • + {% endfor %} +
+
+
+ + + + {% endif %} + + + + + + + {# default header #} +
+ + + + + +
+ +
+
+ +{% 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 %} + + +
+
+ +
{{ 'problems_with_input'|_ }}
+
    + {% for error in errors.all %} +
  • {{ error }}
  • + {% endfor %} +
+
+
+ + {% endif %} + + + + + {# default header #} +
+ + + +
+ + +
+
+ + {% include 'partials.auth.password-modal' %} + + +{% endblock %} +{% block scripts %} + + + +{% 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' %} +

+ {{ trans('email.access_token_created_body') }} +

+ +

+ {{ trans('email.access_token_created_explanation')|raw }} +

+ +

+ {{ trans('email.access_token_created_revoke', {url: route('profile.index') }) }} +

+{% 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' %} +

+ {{ trans('email.admin_test_body', {email: email })}} +

+{% 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' %} +

+ {{ trans('email.email_change_body_to_new')}} +

+

+ {{trans('email.email_change_old', { email: oldEmail }) }} +

+

+ {{trans('email.email_change_new_strong', { email: newEmail })|raw }} +

+

+ {{ trans('email.email_change_instructions')}} +

+ +

+ {{ uri }} +

+{% 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' %} +

+ {{ trans('email.error_intro', { version: version, errorMessage: errorMessage })|raw }} +

+ +

+ {{ trans('email.error_type', {class: class }) }} +

+ +

+ {{ trans('email.error_timestamp', {time: time }) }} + +

+ +

+ {{ trans('email.error_location', { file: file, line: line, code: code })|raw }} +

+ +

+ {% if loggedIn %} + {{ trans('email.error_user', { id: user.id, email: user.email })|raw }} + {% else %} + {{ trans('email.error_no_user') }} + {% endif %} +

+ +

+ {{ trans('email.error_ip', { ip: ip }) }}
+ {{ trans('email.error_url', {url :url }) }}
+ {{ trans('email.error_user_agent', {userAgent: userAgent }) }} +

+ +

+ {{ trans('email.error_stacktrace')|raw }} +

+

+ {{ trans('email.error_github_html')|raw }} +

+ +

+ {{ trans('email.error_stacktrace_below') }}

+

+ {{ stackTrace|nl2br }} +

+{% 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 @@ +

+ {{ trans('email.closing') }} +

+

+ {{ trans('email.signature') }} +

+ +

+ {{ trans('email.footer_ps', {ipAddress: ipAddress}) }} +

+ + + 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 @@ + + + + + + + +

+ {{ trans('email.greeting') }} +

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' %} +

+ {{ trans('email.oauth_created_body', { name:client.name, url: client.redirect })|raw }} +

+ +

+ {{ trans('email.oauth_created_explanation')|raw }} +

+ +

+ {{ trans('email.oauth_created_undo', { url:route('profile.index')}) }} +

+{% 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' %} +

+ {{ trans('email.reset_pw_instructions') }} +

+ +

+ {{ trans('email.reset_pw_warning')|raw }} +

+ +

+ {{ url }} +

+{% 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' %} +

+ {{ trans('email.registered_welcome', {address: address})|raw }} +

+ + +

+ {{ trans('email.registered_closing')}} +

+{% 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' %} +

+ {{ trans_choice('email.new_journals_header', transformed|length ) }} +

+ + +
    + {% for group in transformed %} +
  1. + {% 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 %} +
    1. + {{ 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 %} +
    2. + {% endfor %} +
    + {% endif %} +
  2. + {% endfor %} +
+ +{% 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' %} +

+ {{ trans('email.email_change_body_to_old')|raw }} +

+

+ {{ trans('email.email_change_ignore') }} +

+

+ {{trans('email.email_change_old_strong', { email: oldEmail })|raw }} +

+

+ {{trans('email.email_change_new', { email: newEmail }) }} +

+

+ {{trans('email.email_change_undo_link')}} {{ uri }} +

+{% 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 @@ + + + + + + + AdminLTE 3 | 500 Error + + + + + + + + + +
+
+
+
+

500

+ +
+

{{ trans('errors.error_occurred') }}

+ +

+ {{ trans('errors.error_not_recoverable') }} +

+

+ {{ exception.getMessage |default('General unknown errror') }} +

+ + {% if not debug %} +

+ {{ trans('errors.more_info') }} +

+

+ {{ trans('errors.collect_info')|raw }} + {{ trans('errors.collect_info_more')|raw }} +

+

+ {{ trans('errors.github_help') }} +

+

+ {{ trans('errors.github_instructions')|raw }} +

+
    +
  1. {{ trans('errors.use_search') }}
  2. +
  3. {{ trans('errors.include_info', { link: route('debug') })|raw }}
  4. +
  5. {{ trans('errors.tell_more') }}
  6. +
  7. {{ trans('errors.include_logs') }}
  8. +
  9. {{ trans('errors.what_did_you_do') }}
  10. +
+ {% endif %} + +
+
+
+
+ + {% if debug %} +
+
+

{{ trans('errors.error') }}

+

+ {{ trans('errors.error_location', {file: exception.getFile, line: exception.getLine, code: exception.getCode })|raw }} +

+

+ {{ trans('errors.stacktrace') }} +

+
+ {{ exception.getTraceAsString|nl2br }} +
+
+
+ {% endif %} + +
+ + 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 @@ + + + + + + + Firefly III + {% if title != "Firefly" and title != "" %} + // {{ title }} + {% endif %} + + {% if subTitle %} + // {{ subTitle }} + {% endif %} + + + + + +{% block content %}{% endblock %} +{% block scripts %}{% endblock %} + + 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 @@ + + 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: