diff --git a/.env.example b/.env.example index 45c7fb9fec..71dd938bf4 100644 --- a/.env.example +++ b/.env.example @@ -163,9 +163,8 @@ SEND_ERROR_MESSAGE=true # These messages contain (sensitive) transaction information: SEND_REPORT_JOURNALS=true -# Set this value to true if you want to set the location -# of certain things, like transactions. Since this involves an external service, it's optional -# and disabled by default. +# Set this value to true if you want to set the location of certain things, like transactions. +# Since this involves an external service, it's optional and disabled by default. ENABLE_EXTERNAL_MAP=false # Set this value to true if you want Firefly III to download currency exchange rates diff --git a/app/Support/ExpandedForm.php b/app/Support/ExpandedForm.php index 3c6e61716c..627da132e9 100644 --- a/app/Support/ExpandedForm.php +++ b/app/Support/ExpandedForm.php @@ -176,7 +176,7 @@ class ExpandedForm $options = $this->expandOptionArray($name, $label, $options); $classes = $this->getHolderClasses($name); $value = $this->fillFieldValue($name, $value); - $options['step'] = '1'; + $options['step'] = $options['step'] ?? '1'; try { $html = view('form.integer', compact('classes', 'name', 'label', 'value', 'options'))->render(); } catch (Throwable $e) { @@ -242,65 +242,6 @@ class ExpandedForm return $selectList; } - /** - * @param string $name - * @param mixed $value - * @param array|null $options - * - * @return string - * @throws FireflyException - */ - public function nonSelectableAmount(string $name, $value = null, array $options = null): string - { - $label = $this->label($name, $options); - $options = $this->expandOptionArray($name, $label, $options); - $classes = $this->getHolderClasses($name); - $value = $this->fillFieldValue($name, $value); - $options['step'] = 'any'; - $selectedCurrency = $options['currency'] ?? Amt::getDefaultCurrency(); - unset($options['currency'], $options['placeholder']); - - // make sure value is formatted nicely: - if (null !== $value && '' !== $value) { - // $value = round((float)$value, $selectedCurrency->decimal_places); - } - try { - $html = view('form.non-selectable-amount', compact('selectedCurrency', 'classes', 'name', 'label', 'value', 'options'))->render(); - } catch (Throwable $e) { - Log::debug(sprintf('Could not render nonSelectableAmount(): %s', $e->getMessage())); - $html = 'Could not render nonSelectableAmount.'; - throw new FireflyException($html, 0, $e); - } - - return $html; - } - - /** - * @param string $name - * @param mixed $value - * @param array|null $options - * - * @return string - * @throws FireflyException - */ - public function number(string $name, $value = null, array $options = null): string - { - $label = $this->label($name, $options); - $options = $this->expandOptionArray($name, $label, $options); - $classes = $this->getHolderClasses($name); - $value = $this->fillFieldValue($name, $value); - $options['step'] = 'any'; - unset($options['placeholder']); - try { - $html = view('form.number', compact('classes', 'name', 'label', 'value', 'options'))->render(); - } catch (Throwable $e) { - Log::debug(sprintf('Could not render number(): %s', $e->getMessage())); - $html = 'Could not render number.'; - throw new FireflyException($html, 0, $e); - } - - return $html; - } /** * @param null $value diff --git a/composer.json b/composer.json index 0df59454dd..537b5bd479 100644 --- a/composer.json +++ b/composer.json @@ -93,7 +93,6 @@ "laravel/sanctum": "^3.2", "laravel/slack-notification-channel": "^2.4", "laravel/ui": "^4.2", - "laravelcollective/html": "6.*", "league/commonmark": "2.*", "league/csv": "^9.7", "league/fractal": "0.*", @@ -103,6 +102,7 @@ "psr/log": "<4", "ramsey/uuid": "^4.7", "rcrowe/twigbridge": "^0.14", + "spatie/laravel-html": "^3.2", "spatie/laravel-ignition": "^2", "spatie/period": "^2.4", "symfony/http-client": "^6.2", diff --git a/composer.lock b/composer.lock index 8d56175ffd..86d758d560 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "cc2447110d1ddec300550e2e41634217", + "content-hash": "4f792c06cb58d42c0cb6a8d027aefbf7", "packages": [ { "name": "bacon/bacon-qr-code", @@ -472,16 +472,16 @@ }, { "name": "doctrine/dbal", - "version": "3.6.2", + "version": "3.6.3", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "b4bd1cfbd2b916951696d82e57d054394d84864c" + "reference": "9a747d29e7e6b39509b8f1847e37a23a0163ea6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/b4bd1cfbd2b916951696d82e57d054394d84864c", - "reference": "b4bd1cfbd2b916951696d82e57d054394d84864c", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/9a747d29e7e6b39509b8f1847e37a23a0163ea6a", + "reference": "9a747d29e7e6b39509b8f1847e37a23a0163ea6a", "shasum": "" }, "require": { @@ -494,12 +494,12 @@ "psr/log": "^1|^2|^3" }, "require-dev": { - "doctrine/coding-standard": "11.1.0", + "doctrine/coding-standard": "12.0.0", "fig/log-test": "^1", "jetbrains/phpstorm-stubs": "2022.3", - "phpstan/phpstan": "1.10.9", + "phpstan/phpstan": "1.10.14", "phpstan/phpstan-strict-rules": "^1.5", - "phpunit/phpunit": "9.6.6", + "phpunit/phpunit": "9.6.7", "psalm/plugin-phpunit": "0.18.4", "squizlabs/php_codesniffer": "3.7.2", "symfony/cache": "^5.4|^6.0", @@ -564,7 +564,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/3.6.2" + "source": "https://github.com/doctrine/dbal/tree/3.6.3" }, "funding": [ { @@ -580,29 +580,33 @@ "type": "tidelift" } ], - "time": "2023-04-14T07:25:38+00:00" + "time": "2023-06-01T05:46:46+00:00" }, { "name": "doctrine/deprecations", - "version": "v1.1.0", + "version": "v1.1.1", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "8cffffb2218e01f3b370bf763e00e81697725259" + "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/8cffffb2218e01f3b370bf763e00e81697725259", - "reference": "8cffffb2218e01f3b370bf763e00e81697725259", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", + "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", "shasum": "" }, "require": { - "php": "^7.1|^8.0" + "php": "^7.1 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^9", - "phpunit/phpunit": "^7.5|^8.5|^9.5", - "psr/log": "^1|^2|^3" + "phpstan/phpstan": "1.4.10 || 1.10.15", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "0.18.4", + "psr/log": "^1 || ^2 || ^3", + "vimeo/psalm": "4.30.0 || 5.12.0" }, "suggest": { "psr/log": "Allows logging deprecations via PSR-3 logger implementation" @@ -621,9 +625,9 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/v1.1.0" + "source": "https://github.com/doctrine/deprecations/tree/v1.1.1" }, - "time": "2023-05-29T18:55:17+00:00" + "time": "2023-06-03T09:27:29+00:00" }, { "name": "doctrine/event-manager", @@ -1937,16 +1941,16 @@ }, { "name": "laravel/framework", - "version": "v10.13.0", + "version": "v10.13.1", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "7322723585103082758d74917db62980684845cb" + "reference": "c1569099594168870cb4bdabfbaa35e5d172310b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/7322723585103082758d74917db62980684845cb", - "reference": "7322723585103082758d74917db62980684845cb", + "url": "https://api.github.com/repos/laravel/framework/zipball/c1569099594168870cb4bdabfbaa35e5d172310b", + "reference": "c1569099594168870cb4bdabfbaa35e5d172310b", "shasum": "" }, "require": { @@ -2133,7 +2137,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-05-30T14:46:25+00:00" + "time": "2023-06-02T13:13:10+00:00" }, { "name": "laravel/passport", @@ -2462,79 +2466,6 @@ }, "time": "2023-05-09T19:47:28+00:00" }, - { - "name": "laravelcollective/html", - "version": "v6.4.1", - "source": { - "type": "git", - "url": "https://github.com/LaravelCollective/html.git", - "reference": "64ddfdcaeeb8d332bd98bef442bef81e39c3910b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/LaravelCollective/html/zipball/64ddfdcaeeb8d332bd98bef442bef81e39c3910b", - "reference": "64ddfdcaeeb8d332bd98bef442bef81e39c3910b", - "shasum": "" - }, - "require": { - "illuminate/http": "^6.0|^7.0|^8.0|^9.0|^10.0", - "illuminate/routing": "^6.0|^7.0|^8.0|^9.0|^10.0", - "illuminate/session": "^6.0|^7.0|^8.0|^9.0|^10.0", - "illuminate/support": "^6.0|^7.0|^8.0|^9.0|^10.0", - "illuminate/view": "^6.0|^7.0|^8.0|^9.0|^10.0", - "php": ">=7.2.5" - }, - "require-dev": { - "illuminate/database": "^6.0|^7.0|^8.0|^9.0|^10.0", - "mockery/mockery": "~1.0", - "phpunit/phpunit": "~8.5|^9.5.10" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.x-dev" - }, - "laravel": { - "providers": [ - "Collective\\Html\\HtmlServiceProvider" - ], - "aliases": { - "Form": "Collective\\Html\\FormFacade", - "Html": "Collective\\Html\\HtmlFacade" - } - } - }, - "autoload": { - "files": [ - "src/helpers.php" - ], - "psr-4": { - "Collective\\Html\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adam Engebretson", - "email": "adam@laravelcollective.com" - }, - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "HTML and Form Builders for the Laravel Framework", - "homepage": "https://laravelcollective.com", - "support": { - "issues": "https://github.com/LaravelCollective/html/issues", - "source": "https://github.com/LaravelCollective/html" - }, - "abandoned": "spatie/laravel-html", - "time": "2023-04-25T02:46:11+00:00" - }, { "name": "lcobucci/clock", "version": "3.1.0", @@ -5720,6 +5651,84 @@ ], "time": "2023-05-25T10:19:32+00:00" }, + { + "name": "spatie/laravel-html", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/spatie/laravel-html.git", + "reference": "bf7bdb55cc5ce15c4ec8134aa1df709c0397c397" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/laravel-html/zipball/bf7bdb55cc5ce15c4ec8134aa1df709c0397c397", + "reference": "bf7bdb55cc5ce15c4ec8134aa1df709c0397c397", + "shasum": "" + }, + "require": { + "illuminate/http": "^9.0|^8.0|^10.0", + "illuminate/support": "^9.0|^8.0|^10.0", + "php": "^8.0" + }, + "require-dev": { + "mockery/mockery": "^1.3", + "orchestra/testbench": "^7.0|^6.23|^8.0", + "pestphp/pest": "^1.22" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Spatie\\Html\\HtmlServiceProvider" + ], + "aliases": { + "Html": "Spatie\\Html\\Facades\\Html" + } + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Spatie\\Html\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Sebastian De Deyne", + "email": "sebastian@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + }, + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "A fluent html builder", + "homepage": "https://github.com/spatie/laravel-html", + "keywords": [ + "html", + "spatie" + ], + "support": { + "source": "https://github.com/spatie/laravel-html/tree/3.2.1" + }, + "funding": [ + { + "url": "https://spatie.be/open-source/support-us", + "type": "custom" + } + ], + "time": "2023-01-24T23:47:16+00:00" + }, { "name": "spatie/laravel-ignition", "version": "2.1.3", @@ -10440,16 +10449,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.1.3", + "version": "10.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "2379ebafc1737e71cdc84f402acb6b7f04198b9d" + "reference": "3aad97fde1f3e490e2b316ba56bc4680310e3c3f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2379ebafc1737e71cdc84f402acb6b7f04198b9d", - "reference": "2379ebafc1737e71cdc84f402acb6b7f04198b9d", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3aad97fde1f3e490e2b316ba56bc4680310e3c3f", + "reference": "3aad97fde1f3e490e2b316ba56bc4680310e3c3f", "shasum": "" }, "require": { @@ -10489,7 +10498,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "10.1-dev" + "dev-main": "10.2-dev" } }, "autoload": { @@ -10521,7 +10530,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.1.3" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.2.0" }, "funding": [ { @@ -10537,7 +10546,7 @@ "type": "tidelift" } ], - "time": "2023-05-11T05:16:22+00:00" + "time": "2023-06-02T05:42:13+00:00" }, { "name": "sebastian/cli-parser", diff --git a/config/app.php b/config/app.php index b6f332b8c0..a7c44efb4e 100644 --- a/config/app.php +++ b/config/app.php @@ -140,8 +140,7 @@ return [ 'URL' => Illuminate\Support\Facades\URL::class, 'Validator' => Illuminate\Support\Facades\Validator::class, 'View' => Illuminate\Support\Facades\View::class, - 'Form' => Collective\Html\FormFacade::class, - 'Html' => Collective\Html\HtmlFacade::class, + 'Html' => Spatie\Html\Facades\Html::class, 'Preferences' => Preferences::class, 'FireflyConfig' => FireflyConfig::class, 'Navigation' => Navigation::class, diff --git a/config/firefly.php b/config/firefly.php index 1758714bf9..eb011dc6f0 100644 --- a/config/firefly.php +++ b/config/firefly.php @@ -118,7 +118,6 @@ return [ // tokens and keys 'fixer_api_key' => env('FIXER_API_KEY', ''), - 'mapbox_api_key' => env('MAPBOX_API_KEY', ''), 'ipinfo_token' => env('IPINFO_TOKEN', ''), 'static_cron_token' => envNonEmpty('STATIC_CRON_TOKEN'), diff --git a/config/twigbridge.php b/config/twigbridge.php index d70ce0c3a4..70ecf8d088 100644 --- a/config/twigbridge.php +++ b/config/twigbridge.php @@ -171,7 +171,7 @@ return [ 'Steam', 'Config', 'Request', - 'Form' => ['is_safe' => ['input', 'select', 'checkbox', 'model', 'open', 'radio', 'textarea', 'file']], + 'Html', 'ExpandedForm' => [ 'is_safe' => [ 'date', diff --git a/public/v1/js/ff/accounts/show.js b/public/v1/js/ff/accounts/show.js index 9059b31398..4653e71104 100644 --- a/public/v1/js/ff/accounts/show.js +++ b/public/v1/js/ff/accounts/show.js @@ -67,30 +67,6 @@ $(function () { ); } - if (doPlaceMarker === true) { - /* - Create new map: - */ - - // make map: - var mymap = L.map('location_map', { - zoomControl: false, - touchZoom: false, - doubleClickZoom: false, - scrollWheelZoom: false, - boxZoom: false, - dragging: false - }).setView([latitude, longitude], zoomLevel); - - L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png?access_token={accessToken}', { - attribution: '© OpenStreetMap contributors', - maxZoom: 18, - id: 'mapbox/streets-v11', - accessToken: mapboxToken - }).addTo(mymap); - L.marker([latitude, longitude]).addTo(mymap); - } - }); function sortStop(event, ui) { diff --git a/public/v1/js/ff/tags/create-edit.js b/public/v1/js/ff/tags/create-edit.js index 986ce5e4f9..58696fda75 100644 --- a/public/v1/js/ff/tags/create-edit.js +++ b/public/v1/js/ff/tags/create-edit.js @@ -1,23 +1,22 @@ - /* - * create-edit.js - * Copyright (c) 2019 james@firefly-iii.org - * - * This file is part of Firefly III (https://github.com/firefly-iii). - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ -/** global: zoomLevel, latitude, longitude, google, apiKey, doPlaceMarker, Modernizr */ +/* +* create-edit.js +* Copyright (c) 2019 james@firefly-iii.org +* +* This file is part of Firefly III (https://github.com/firefly-iii). +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU Affero General Public License as +* published by the Free Software Foundation, either version 3 of the +* License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Affero General Public License for more details. +* +* You should have received a copy of the GNU Affero General Public License +* along with this program. If not, see . +*/ $(function () { "use strict"; @@ -29,4 +28,4 @@ $(function () { } ); } -}); \ No newline at end of file +}); diff --git a/public/v1/js/ff/tags/show.js b/public/v1/js/ff/tags/show.js index 4a279c5d60..34cd2a00c5 100644 --- a/public/v1/js/ff/tags/show.js +++ b/public/v1/js/ff/tags/show.js @@ -18,35 +18,10 @@ * along with this program. If not, see . */ -/** global: zoomLevel, latitude, longitude, L, mapboxToken, doPlaceMarker */ - /* Some vars as prep for the map: */ $(function () { "use strict"; - if (doPlaceMarker === true) { - /* - Create new map: - */ - - // make map: - var mymap = L.map('location_map', { - zoomControl: false, - touchZoom: false, - doubleClickZoom: false, - scrollWheelZoom: false, - boxZoom: false, - dragging: false - }).setView([latitude, longitude], zoomLevel); - - L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png?access_token={accessToken}', { - attribution: '© OpenStreetMap contributors', - maxZoom: 18, - id: 'mapbox/streets-v11', - accessToken: mapboxToken - }).addTo(mymap); - L.marker([latitude, longitude]).addTo(mymap); - } }); diff --git a/resources/views/accounts/create.twig b/resources/views/accounts/create.twig index 46876560cc..57dfb00f8b 100644 --- a/resources/views/accounts/create.twig +++ b/resources/views/accounts/create.twig @@ -88,7 +88,6 @@ var iAmOwed = '{{ 'i_am_owed_amount'|_|escape('js') }}'; var iOwe = '{{ 'i_owe_amount'|_|escape('js') }}'; - @@ -100,5 +99,4 @@ media="all" nonce="{{ JS_NONCE }}"> - {% endblock %} diff --git a/resources/views/accounts/delete.twig b/resources/views/accounts/delete.twig index c0dfe860be..29789e35de 100644 --- a/resources/views/accounts/delete.twig +++ b/resources/views/accounts/delete.twig @@ -6,7 +6,8 @@ {% block content %} -
+
@@ -39,7 +40,7 @@

- {{ Form.select('move_account_before_delete', accountList, null, {class: 'form-control'}) }} + {{ Html.select('move_account_before_delete', accountList, null).class('form-control') }}

{% else %} @@ -47,7 +48,8 @@
diff --git a/resources/views/accounts/edit.twig b/resources/views/accounts/edit.twig index 0f981e5558..2dfd0f81b2 100644 --- a/resources/views/accounts/edit.twig +++ b/resources/views/accounts/edit.twig @@ -117,7 +117,6 @@ var iAmOwed = '{{ 'i_am_owed_amount'|_|escape('js') }}'; var iOwe = '{{ 'i_owe_amount'|_|escape('js') }}'; - @@ -129,5 +128,4 @@ media="all" nonce="{{ JS_NONCE }}"> - {% endblock %} diff --git a/resources/views/accounts/reconcile/edit.twig b/resources/views/accounts/reconcile/edit.twig index 9eb2e06b99..a9b69caf52 100644 --- a/resources/views/accounts/reconcile/edit.twig +++ b/resources/views/accounts/reconcile/edit.twig @@ -1,119 +1 @@ -{% extends './layout/default' %} - -{% block breadcrumbs %} - {{ Breadcrumbs.render(Route.getCurrentRoute.getName, journal) }} -{% endblock %} - -{% block content %} - - - - - - {% if errors.all|length > 0 %} -
-
-

{{ 'errors'|_ }}

-
    - {% for err in errors.all %} -
  • {{ err }}
  • - {% endfor %} -
-
-
- {% endif %} - - -
-
-
-
-

{{ 'mandatoryFields'|_ }}

-
-
- {# ALWAYS AVAILABLE #} - {{ ExpandedForm.staticText('description',journal.description) }} - - {# ALWAYS SHOW AMOUNT #} - {{ ExpandedForm.nonSelectableAmount('amount',data.amount, {'currency' : data.currency}) }} - - {# ALWAYS SHOW DATE #} - {{ ExpandedForm.staticText('date',journal.date.isoFormat(monthAndDayFormat)) }} -
-
- -
-
-
-
-

{{ 'optionalFields'|_ }}

-
-
- {# category always #} - {{ ExpandedForm.text('category',data.category) }} - - {# tags #} - {{ ExpandedForm.text('tags') }} -
-
- - {# box for attachments #} - {% if optionalFields.attachments %} -
-
-

{{ 'optional_field_attachments'|_ }}

-
-
- {% if optionalFields.attachments %} - {# attachments #} - {{ ExpandedForm.file('attachments[]', {'multiple': 'multiple','helpText': trans('firefly.upload_max_file_size', {'size': uploadSize|filesize}) }) }} - {% endif %} -
-
- {% endif %} -
-
-
-
- {# panel for options #} -
-
-

{{ 'options'|_ }}

-
-
- {{ ExpandedForm.optionsList('update','transaction') }} -
- -
-
-
- -
- - -{% endblock %} -{% block scripts %} - - - - - - - - - - -{% endblock %} -{% block styles %} - - - -{% endblock %} +TODO REMOVE ME diff --git a/resources/views/accounts/show.twig b/resources/views/accounts/show.twig index 986507e235..1acd8b17b8 100644 --- a/resources/views/accounts/show.twig +++ b/resources/views/accounts/show.twig @@ -17,10 +17,13 @@ @@ -104,16 +107,16 @@
{% if(location) %} -
-
-
-

{{ 'location'|_ }}

-
-
-
+
+
+
+

{{ 'location'|_ }}

+
+
+
+
-
{% endif %} {% if account.notes.count() == 1 %}
@@ -133,7 +136,8 @@
-

{{ 'transactions'|_ }} ({{ formatAmountBySymbol(balance, currency.symbol, currency.decimal_places, true)|raw }})

+

{{ 'transactions'|_ }} + ({{ formatAmountBySymbol(balance, currency.symbol, currency.decimal_places, true)|raw }})

{% if account.accountType.type == 'Asset account' %} @@ -168,15 +172,11 @@ {% block scripts %} {% endif %} - - + + - + {# required for groups.twig #} @@ -221,6 +224,6 @@ {% block styles %} {% if location %} - + {% endif %} {% endblock %} diff --git a/resources/views/admin/link/delete.twig b/resources/views/admin/link/delete.twig index d94a1c693f..6d7d0f1bbb 100644 --- a/resources/views/admin/link/delete.twig +++ b/resources/views/admin/link/delete.twig @@ -6,7 +6,8 @@ {% block content %} -
+
@@ -34,7 +35,7 @@

- {{ Form.select('move_link_type_before_delete', moveTo, null, {class: 'form-control'}) }} + {{ Html.select('move_link_type_before_delete', moveTo).class('form-control') }}

{% else %} @@ -42,7 +43,8 @@
diff --git a/resources/views/form/amount-no-currency.twig b/resources/views/form/amount-no-currency.twig index d558f52f0c..5713afa140 100644 --- a/resources/views/form/amount-no-currency.twig +++ b/resources/views/form/amount-no-currency.twig @@ -1,7 +1,7 @@
- {{ Html.input('number', name, value).class('form-control').attribute('step','any').attribute('autocomplete','off').attribute('spellcheck','false') }} + {{ Html.input('number', name, value).class('form-control').attribute('step','any').attribute('autocomplete','off').attribute('spellcheck','false').attribute('placeholder',options.placeholder) }} {% include 'form.help' %} {% include 'form.feedback' %}
diff --git a/resources/views/form/assetAccountCheckList.twig b/resources/views/form/assetAccountCheckList.twig index 13c085ffd2..fff275d711 100644 --- a/resources/views/form/assetAccountCheckList.twig +++ b/resources/views/form/assetAccountCheckList.twig @@ -10,7 +10,7 @@ {% if account in selected or (selected|length == 0 and options.select_all == true) %} {{ Html.checkbox(name~'[]',true).id(id) }} {% else %} - {{ Form.checkbox(name~'[]',false).id(id) }} + {{ Html.checkbox(name~'[]',false).id(id) }} {% endif %} {{ account|escape }} diff --git a/resources/views/form/balance.twig b/resources/views/form/balance.twig index a9b69caf52..d4fae10dd0 100644 --- a/resources/views/form/balance.twig +++ b/resources/views/form/balance.twig @@ -1 +1,34 @@ -TODO REMOVE ME +
+ + +
+
+
+ + +
+ {{ Html.input('number', name, value).class('form-control').attribute('step','any') }} + +
+ + {% include 'form.feedback' %} +
+ + +
diff --git a/resources/views/form/integer.twig b/resources/views/form/integer.twig index 535de496a3..b7306b50de 100644 --- a/resources/views/form/integer.twig +++ b/resources/views/form/integer.twig @@ -2,7 +2,7 @@
- {{ Html.input('number', name, value).attribute('step',options.step).attribute('autocomplete','off').attribute('spellcheck', 'false').class('form-control') }} + {{ Html.input('number', name, value).attribute('step',options.step).attribute('autocomplete','off').attribute('spellcheck', 'false').class('form-control').attribute('placeholder',options.placeholder) }} {% include 'form.help' %} {% include 'form.feedback' %}
diff --git a/resources/views/form/location.twig b/resources/views/form/location.twig index a9b69caf52..831cd7740b 100644 --- a/resources/views/form/location.twig +++ b/resources/views/form/location.twig @@ -1 +1 @@ -TODO REMOVE ME +TODO REMOVE ME 3 diff --git a/resources/views/form/non-selectable-amount.twig b/resources/views/form/non-selectable-amount.twig index 06434ec050..866b5fb14f 100644 --- a/resources/views/form/non-selectable-amount.twig +++ b/resources/views/form/non-selectable-amount.twig @@ -1,11 +1 @@ -
- - -
-
- {{ selectedCurrency.symbol }} - {{ Form.input('number', name, value, options) }} -
- {% include 'form.feedback' %} -
-
+TODO REMOVE ME 1 diff --git a/resources/views/form/number.twig b/resources/views/form/number.twig index 1eac145903..a9b69caf52 100644 --- a/resources/views/form/number.twig +++ b/resources/views/form/number.twig @@ -1,9 +1 @@ -
- - -
- {{ Form.input('number', name, value, options) }} - {% include 'form.help' %} - {% include 'form.feedback' %} -
-
+TODO REMOVE ME diff --git a/resources/views/form/object_group.twig b/resources/views/form/object_group.twig index 565c8332e0..ab6e13c124 100644 --- a/resources/views/form/object_group.twig +++ b/resources/views/form/object_group.twig @@ -2,7 +2,7 @@
- {{ Form.input('text', name, value, options) }} + {{ Html.input('text', name, value).class('form-control').attribute('autocomplete','off').attribute('spellcheck','false').attribute('placeholder',options.placeholder) }} {% include 'form.help' %} {% include 'form.feedback' %}
diff --git a/resources/views/form/options.twig b/resources/views/form/options.twig index ee638c0460..727a29215f 100644 --- a/resources/views/form/options.twig +++ b/resources/views/form/options.twig @@ -7,7 +7,7 @@
@@ -24,7 +24,7 @@
diff --git a/resources/views/form/password.twig b/resources/views/form/password.twig index b4536fb876..6e541436ad 100644 --- a/resources/views/form/password.twig +++ b/resources/views/form/password.twig @@ -2,7 +2,7 @@
- {{ Form.input('password', name, value, options) }} + {{ Html.input('password', name, value).class('form-control').attribute('placeholder',options.placeholder).attribute('autocomplete','off').attribute('spellcheck','false') }} {% include 'form.help' %} {% include 'form.feedback' %}
diff --git a/resources/views/form/percentage.twig b/resources/views/form/percentage.twig index 03b5275cbd..e0f8570c87 100644 --- a/resources/views/form/percentage.twig +++ b/resources/views/form/percentage.twig @@ -3,7 +3,7 @@
- {{ Form.input('number', name, value, options) }} + {{ Html.input('number', name, value).attribute('step',options.step).attribute('autocomplete','off').attribute('spellcheck', 'false').class('form-control').attribute('placeholder',options.placeholder) }}
%
{% include 'form.help' %} diff --git a/resources/views/form/select.twig b/resources/views/form/select.twig index 01d24305fa..460a5f07d8 100644 --- a/resources/views/form/select.twig +++ b/resources/views/form/select.twig @@ -2,7 +2,7 @@
- {{ Form.select(name, list, selected , options ) }} + {{ Html.select(name, list, selected).class('form-control').attribute('autocomplete','off').attribute('spellcheck','false').attribute('placeholder',options.placeholder) }} {% include 'form.help' %} {% include 'form.feedback' %} diff --git a/resources/views/form/tags.twig b/resources/views/form/tags.twig index 41780c98d4..a9b69caf52 100644 --- a/resources/views/form/tags.twig +++ b/resources/views/form/tags.twig @@ -1,8 +1 @@ -
- - -
- {{ Form.input('text', name, value, options) }} - {% include 'form.feedback' %} -
-
+TODO REMOVE ME diff --git a/resources/views/form/text.twig b/resources/views/form/text.twig index 565c8332e0..ab6e13c124 100644 --- a/resources/views/form/text.twig +++ b/resources/views/form/text.twig @@ -2,7 +2,7 @@
- {{ Form.input('text', name, value, options) }} + {{ Html.input('text', name, value).class('form-control').attribute('autocomplete','off').attribute('spellcheck','false').attribute('placeholder',options.placeholder) }} {% include 'form.help' %} {% include 'form.feedback' %}
diff --git a/resources/views/form/textarea.twig b/resources/views/form/textarea.twig index 5c553dc07e..87cc9bcc31 100644 --- a/resources/views/form/textarea.twig +++ b/resources/views/form/textarea.twig @@ -2,7 +2,7 @@
- {{ Form.textarea(name, value, options) }} + {{ Html.textarea(name, value).attribute('rows', options.rows).class('form-control').attribute('autocomplete','off').attribute('spellcheck','false').attribute('placeholder',options.placeholder) }} {% include 'form.help' %} {% include 'form.feedback' %}
diff --git a/resources/views/new-user/index.twig b/resources/views/new-user/index.twig index ccb82d46e1..627c511dd0 100644 --- a/resources/views/new-user/index.twig +++ b/resources/views/new-user/index.twig @@ -34,19 +34,21 @@ {{ 'savings_balance_text'|_ }}

- {{ ExpandedForm.number('savings_balance',0) }} + {{ ExpandedForm.integer('savings_balance',0, {"step": "any"}) }}

{{ 'set_preferred_language'|_ }}

- +
diff --git a/resources/views/recurring/create.twig b/resources/views/recurring/create.twig index fa075fdec8..4804270342 100644 --- a/resources/views/recurring/create.twig +++ b/resources/views/recurring/create.twig @@ -4,7 +4,8 @@ {% endblock %} {% block content %} - + {# row with recurrence information #}
@@ -20,15 +21,16 @@ {{ preFilled.first_date.format('Y-m-d') }} {{ ExpandedForm.date('first_date',null, {helpText: trans('firefly.help_first_date'), min: preFilled.first_date}) }} {{ ExpandedForm.select('repetition_type', [], null, {helpText: trans('firefly.change_date_other_options')}) }} - {{ ExpandedForm.number('skip', 0) }} + {{ ExpandedForm.integer('skip',0) }} {{ ExpandedForm.select('weekend', weekendResponses, null, {helpText: trans('firefly.help_weekend')}) }} {{ ExpandedForm.select('repetition_end', repetitionEnds) }} {{ ExpandedForm.date('repeat_until',null) }} - {{ ExpandedForm.number('repetitions',null) }} + {{ ExpandedForm.integer('repetitions',null) }} {# calendar in popup #}
- +

@@ -67,7 +69,7 @@

{{ 'mandatory_fields_for_tranaction'|_ }}

- {# three buttons to distinguish type of transaction#} + {# three buttons to distinguish type of transaction #}
- {# end of three buttons#} + {# end of three buttons #} {{ ExpandedForm.text('transaction_description') }} {# transaction information (mandatory) #} @@ -99,7 +104,7 @@ {{ AccountForm.longAccountList('destination_id', null, {label: trans('form.asset_destination_account')} ) }} {# destination account name for withdrawals #} - {#{{ ExpandedForm.text('destination_name', null, {label: trans('form.expense_account')}) }} #} + {# {{ ExpandedForm.text('destination_name', null, {label: trans('form.expense_account')}) }} #} {# NEW for withdrawals, also a drop down with expense accounts, loans, debts, mortgages or (cash). #} {{ AccountForm.activeWithdrawalDestinations('withdrawal_destination_id', null, {label: trans('form.withdrawal_destination_id')}) }} @@ -164,60 +169,70 @@
{# -
-
-
-

{{ 'expected_repetitions'|_ }}

-
-
- Here. -
+
+
+
+

{{ 'expected_repetitions'|_ }}

+
+
+ Here.
-
+
+
#} {# calendar modal #}