mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix all views.
This commit is contained in:
parent
0d9bae6ec2
commit
3daddd690f
@ -53,9 +53,12 @@ use FireflyIII\Services\IP\IPRetrievalInterface;
|
||||
use FireflyIII\Services\Password\PwndVerifierV3;
|
||||
use FireflyIII\Services\Password\Verifier;
|
||||
use FireflyIII\Support\Amount;
|
||||
use FireflyIII\Support\ExpandedForm;
|
||||
use FireflyIII\Support\FireflyConfig;
|
||||
use FireflyIII\Support\ExpandedForm;
|
||||
use FireflyIII\Support\Form\AccountForm;
|
||||
use FireflyIII\Support\Form\CurrencyForm;
|
||||
use FireflyIII\Support\Form\PiggyBankForm;
|
||||
use FireflyIII\Support\Form\RuleForm;
|
||||
use FireflyIII\Support\Navigation;
|
||||
use FireflyIII\Support\Preferences;
|
||||
use FireflyIII\Support\Steam;
|
||||
@ -143,7 +146,7 @@ class FireflyServiceProvider extends ServiceProvider
|
||||
);
|
||||
$this->app->bind(
|
||||
'expandedform',
|
||||
function () {
|
||||
static function () {
|
||||
return new ExpandedForm;
|
||||
}
|
||||
);
|
||||
@ -154,6 +157,26 @@ class FireflyServiceProvider extends ServiceProvider
|
||||
return new AccountForm;
|
||||
}
|
||||
);
|
||||
$this->app->bind(
|
||||
'currencyform',
|
||||
static function () {
|
||||
return new CurrencyForm;
|
||||
}
|
||||
);
|
||||
|
||||
$this->app->bind(
|
||||
'piggybankform',
|
||||
static function () {
|
||||
return new PiggyBankForm;
|
||||
}
|
||||
);
|
||||
|
||||
$this->app->bind(
|
||||
'ruleform',
|
||||
static function () {
|
||||
return new RuleForm;
|
||||
}
|
||||
);
|
||||
|
||||
// chart generator:
|
||||
$this->app->bind(GeneratorInterface::class, ChartJsGenerator::class);
|
||||
|
@ -27,7 +27,7 @@ use Illuminate\Support\Facades\Facade;
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
* Class ExpandedForm.
|
||||
* Class AccountForm.
|
||||
*
|
||||
*/
|
||||
class AccountForm extends Facade
|
||||
|
44
app/Support/Facades/CurrencyForm.php
Normal file
44
app/Support/Facades/CurrencyForm.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* CurrencyForm.php
|
||||
* Copyright (c) 2019 thegrumpydictator@gmail.com
|
||||
*
|
||||
* This file is part of Firefly III.
|
||||
*
|
||||
* Firefly III is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Firefly III 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Support\Facades;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
* Class CurrencyForm.
|
||||
*
|
||||
*/
|
||||
class CurrencyForm extends Facade
|
||||
{
|
||||
/**
|
||||
* Get the registered name of the component.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected static function getFacadeAccessor(): string
|
||||
{
|
||||
return 'currencyform';
|
||||
}
|
||||
}
|
@ -28,9 +28,6 @@ use Illuminate\Support\Facades\Facade;
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
* Class ExpandedForm.
|
||||
*
|
||||
* @method array makeSelectList(Collection $set)
|
||||
* @method array makeSelectListWithEmpty(Collection $set)
|
||||
*/
|
||||
class ExpandedForm extends Facade
|
||||
{
|
||||
|
44
app/Support/Facades/PiggyBankForm.php
Normal file
44
app/Support/Facades/PiggyBankForm.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* PiggyBankForm.php
|
||||
* Copyright (c) 2019 thegrumpydictator@gmail.com
|
||||
*
|
||||
* This file is part of Firefly III.
|
||||
*
|
||||
* Firefly III is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Firefly III 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Support\Facades;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
* Class PiggyBankForm.
|
||||
*
|
||||
*/
|
||||
class PiggyBankForm extends Facade
|
||||
{
|
||||
/**
|
||||
* Get the registered name of the component.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected static function getFacadeAccessor(): string
|
||||
{
|
||||
return 'piggybankform';
|
||||
}
|
||||
}
|
44
app/Support/Facades/RuleForm.php
Normal file
44
app/Support/Facades/RuleForm.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* RuleForm.php
|
||||
* Copyright (c) 2019 thegrumpydictator@gmail.com
|
||||
*
|
||||
* This file is part of Firefly III.
|
||||
*
|
||||
* Firefly III is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Firefly III 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Support\Facades;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
* Class RuleForm.
|
||||
*
|
||||
*/
|
||||
class RuleForm extends Facade
|
||||
{
|
||||
/**
|
||||
* Get the registered name of the component.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected static function getFacadeAccessor(): string
|
||||
{
|
||||
return 'ruleform';
|
||||
}
|
||||
}
|
@ -40,7 +40,9 @@ use Throwable;
|
||||
class CurrencyForm
|
||||
{
|
||||
use FormSupport;
|
||||
|
||||
/**
|
||||
* TODO cleanup and describe.
|
||||
* @param string $name
|
||||
* @param mixed $value
|
||||
* @param array $options
|
||||
@ -64,6 +66,8 @@ class CurrencyForm
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO cleanup and describe.
|
||||
*
|
||||
* @param string $name
|
||||
* @param mixed $value
|
||||
* @param array $options
|
||||
@ -90,6 +94,8 @@ class CurrencyForm
|
||||
|
||||
|
||||
/**
|
||||
* TODO describe and cleanup.
|
||||
*
|
||||
* @param string $name
|
||||
* @param mixed $value
|
||||
* @param array $options
|
||||
@ -103,6 +109,8 @@ class CurrencyForm
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO cleanup and describe better.
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $view
|
||||
* @param mixed $value
|
||||
|
@ -33,7 +33,10 @@ use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface;
|
||||
class PiggyBankForm
|
||||
{
|
||||
use FormSupport;
|
||||
|
||||
/**
|
||||
* TODO cleanup and describe.
|
||||
*
|
||||
* @param string $name
|
||||
* @param mixed $value
|
||||
* @param array $options
|
||||
|
@ -100,8 +100,6 @@ return [
|
||||
FireflyIII\Providers\AdminServiceProvider::class,
|
||||
FireflyIII\Providers\RecurringServiceProvider::class,
|
||||
ImportServiceProvider::class,
|
||||
|
||||
|
||||
],
|
||||
'aliases' => [
|
||||
'App' => Illuminate\Support\Facades\App::class,
|
||||
@ -146,7 +144,10 @@ return [
|
||||
'Amount' => \FireflyIII\Support\Facades\Amount::class,
|
||||
'Steam' => \FireflyIII\Support\Facades\Steam::class,
|
||||
'ExpandedForm' => \FireflyIII\Support\Facades\ExpandedForm::class,
|
||||
'CurrencyForm' => \FireflyIII\Support\Facades\CurrencyForm::class,
|
||||
'AccountForm' => \FireflyIII\Support\Facades\AccountForm::class,
|
||||
'PiggyBankForm' => \FireflyIII\Support\Facades\PiggyBankForm::class,
|
||||
'RuleForm' => \FireflyIII\Support\Facades\RuleForm::class,
|
||||
'Google2FA' => PragmaRX\Google2FALaravel\Facade::class,
|
||||
|
||||
],
|
||||
|
@ -179,7 +179,7 @@ return [
|
||||
|
|
||||
*/
|
||||
'facades' => [
|
||||
'Breadcrumbs' => [
|
||||
'Breadcrumbs' => [
|
||||
'is_safe' => [
|
||||
'render',
|
||||
],
|
||||
@ -193,22 +193,37 @@ return [
|
||||
'Steam',
|
||||
'Config',
|
||||
'Request',
|
||||
'Form' => ['is_safe' => ['input', 'select', 'checkbox', 'model', 'open', 'radio', 'textarea', 'file',],],
|
||||
'ExpandedForm' => [
|
||||
'Form' => ['is_safe' => ['input', 'select', 'checkbox', 'model', 'open', 'radio', 'textarea', 'file',],],
|
||||
'ExpandedForm' => [
|
||||
'is_safe' => [
|
||||
'date', 'text', 'select', 'balance', 'optionsList', 'checkbox', 'amount', 'tags', 'integer', 'textarea', 'location', 'file', 'staticText',
|
||||
'password', 'nonSelectableAmount', 'number', 'amountNoCurrency', 'currencyList', 'ruleGroupList',
|
||||
'ruleGroupListWithEmpty', 'piggyBankList', 'currencyListEmpty', 'percentage', 'balanceAll',
|
||||
'password', 'nonSelectableAmount', 'number', 'amountNoCurrency', 'percentage',
|
||||
|
||||
|
||||
],
|
||||
],
|
||||
'AccountForm' => [
|
||||
'AccountForm' => [
|
||||
'is_safe' => [
|
||||
'activeAssetAccountList', 'activeLongAccountList', 'activeWithdrawalDestinations', 'activeDepositDestinations',
|
||||
'assetAccountCheckList', 'assetAccountList', 'longAccountList',
|
||||
],
|
||||
],
|
||||
'CurrencyForm' => [
|
||||
'is_safe' => [
|
||||
'currencyList', 'currencyListEmpty', 'balanceAll',
|
||||
],
|
||||
],
|
||||
'PiggyBankForm' =>
|
||||
[
|
||||
'is_safe' => [
|
||||
'piggyBankList',
|
||||
],
|
||||
],
|
||||
'RuleForm' => [
|
||||
'is_safe' => [
|
||||
'ruleGroupList', 'ruleGroupListWithEmpty',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
<div class="box-body">
|
||||
{{ ExpandedForm.text('name') }}
|
||||
{% if objectType == 'asset' or objectType == 'liabilities' %}
|
||||
{{ ExpandedForm.currencyList('currency_id', null, {helpText:'account_default_currency'|_}) }}
|
||||
{{ CurrencyForm.currencyList('currency_id', null, {helpText:'account_default_currency'|_}) }}
|
||||
{% endif %}
|
||||
{% if objectType == 'liabilities' %}
|
||||
{{ ExpandedForm.select('liability_type_id', liabilityTypes) }}
|
||||
|
@ -19,7 +19,7 @@
|
||||
<div class="box-body">
|
||||
{{ ExpandedForm.text('name') }}
|
||||
{% if account.accountType.type == 'Default account' or account.accountType.type == 'Asset account' or objectType == 'liabilities' %}
|
||||
{{ ExpandedForm.currencyList('currency_id', null, {helpText:'account_default_currency'|_}) }}
|
||||
{{ CurrencyForm.currencyList('currency_id', null, {helpText:'account_default_currency'|_}) }}
|
||||
{% endif %}
|
||||
|
||||
{% if objectType == 'liabilities' %}
|
||||
|
@ -17,7 +17,7 @@
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{ ExpandedForm.text('name') }}
|
||||
{{ ExpandedForm.currencyList('transaction_currency_id', defaultCurrency.id) }}
|
||||
{{ CurrencyForm.currencyList('transaction_currency_id', defaultCurrency.id) }}
|
||||
{{ ExpandedForm.amountNoCurrency('amount_min') }}
|
||||
{{ ExpandedForm.amountNoCurrency('amount_max') }}
|
||||
{{ ExpandedForm.date('date',phpdate('Y-m-d')) }}
|
||||
|
@ -18,7 +18,7 @@
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{ ExpandedForm.text('name') }}
|
||||
{{ ExpandedForm.currencyList('transaction_currency_id') }}
|
||||
{{ CurrencyForm.currencyList('transaction_currency_id') }}
|
||||
{{ ExpandedForm.amountNoCurrency('amount_min') }}
|
||||
{{ ExpandedForm.amountNoCurrency('amount_max') }}
|
||||
{{ ExpandedForm.date('date',bill.date.format('Y-m-d')) }}
|
||||
|
@ -24,7 +24,7 @@
|
||||
{{ 'to_get_started'|_ }}
|
||||
</p>
|
||||
{{ ExpandedForm.text('bank_name') }}
|
||||
{{ ExpandedForm.balanceAll('bank_balance') }}
|
||||
{{ CurrencyForm.balanceAll('bank_balance') }}
|
||||
|
||||
<p class="text-success">
|
||||
{{ 'currency_not_present'|_ }}
|
||||
|
@ -86,7 +86,7 @@
|
||||
|
||||
{{ ExpandedForm.text('transaction_description') }}
|
||||
{# transaction information (mandatory) #}
|
||||
{{ ExpandedForm.currencyList('transaction_currency_id', defaultCurrency.id) }}
|
||||
{{ CurrencyForm.currencyList('transaction_currency_id', defaultCurrency.id) }}
|
||||
{{ ExpandedForm.amountNoCurrency('amount', []) }}
|
||||
|
||||
{# source account if withdrawal, or if transfer: #}
|
||||
@ -115,7 +115,7 @@
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{# transaction information (optional) #}
|
||||
{{ ExpandedForm.currencyListEmpty('foreign_currency_id', 0) }}
|
||||
{{ CurrencyForm.currencyListEmpty('foreign_currency_id', 0) }}
|
||||
{{ ExpandedForm.amountNoCurrency('foreign_amount', []) }}
|
||||
|
||||
{# BUDGET ONLY WHEN CREATING A WITHDRAWAL #}
|
||||
@ -132,7 +132,7 @@
|
||||
{{ ExpandedForm.text('tags') }}
|
||||
|
||||
{# RELATE THIS TRANSFER TO A PIGGY BANK #}
|
||||
{{ ExpandedForm.piggyBankList('piggy_bank_id',0) }}
|
||||
{{ PiggyBankForm.piggyBankList('piggy_bank_id',0) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -84,7 +84,7 @@
|
||||
{# end of three buttons#}
|
||||
{{ ExpandedForm.text('transaction_description', array.transactions[0].description) }}
|
||||
{# transaction information (mandatory) #}
|
||||
{{ ExpandedForm.currencyList('transaction_currency_id', array.transactions[0].currency_id) }}
|
||||
{{ CurrencyForm.currencyList('transaction_currency_id', array.transactions[0].currency_id) }}
|
||||
{{ ExpandedForm.amountNoCurrency('amount', array.transactions[0].amount) }}
|
||||
|
||||
{# source account if withdrawal, or if transfer: #}
|
||||
@ -116,7 +116,7 @@
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{# transaction information (optional) #}
|
||||
{{ ExpandedForm.currencyListEmpty('foreign_currency_id', array.transactions[0].foreign_currency_id) }}
|
||||
{{ CurrencyForm.currencyListEmpty('foreign_currency_id', array.transactions[0].foreign_currency_id) }}
|
||||
{{ ExpandedForm.amountNoCurrency('foreign_amount', array.transactions[0].foreign_amount) }}
|
||||
|
||||
{# BUDGET ONLY WHEN CREATING A WITHDRAWAL #}
|
||||
@ -155,7 +155,7 @@
|
||||
{{ ExpandedForm.text('tags', tags) }}
|
||||
|
||||
{# RELATE THIS TRANSFER TO A PIGGY BANK #}
|
||||
{{ ExpandedForm.piggyBankList('piggy_bank_id',piggyBankId) }}
|
||||
{{ PiggyBankForm.piggyBankList('piggy_bank_id',piggyBankId) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -35,7 +35,7 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{{ ExpandedForm.ruleGroupListWithEmpty('move_rules_before_delete',null, {'hidden': ruleGroup.id}) }}
|
||||
{{ RuleForm.ruleGroupListWithEmpty('move_rules_before_delete',null, {'hidden': ruleGroup.id}) }}
|
||||
</p>
|
||||
{% else %}
|
||||
<input type="hidden" name="move_rules_before_delete" value="0"/>
|
||||
|
@ -38,7 +38,7 @@
|
||||
<div class="box-body">
|
||||
{{ ExpandedForm.text('title') }}
|
||||
{{ ExpandedForm.select('trigger',allJournalTriggers()) }}
|
||||
{{ ExpandedForm.ruleGroupList('rule_group_id', ruleGroup.id) }}
|
||||
{{ RuleForm.ruleGroupList('rule_group_id', ruleGroup.id) }}
|
||||
{{ ExpandedForm.checkbox('stop_processing',1,null, {helpText: trans('firefly.rule_help_stop_processing')}) }}
|
||||
{{ ExpandedForm.checkbox('strict',1, null,{helpText: trans('firefly.rule_help_strict')}) }}
|
||||
</div>
|
||||
|
@ -15,7 +15,7 @@
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{ ExpandedForm.text('title') }}
|
||||
{{ ExpandedForm.ruleGroupList('rule_group_id', ruleGroup.id) }}
|
||||
{{ RuleForm.ruleGroupList('rule_group_id', ruleGroup.id) }}
|
||||
{{ ExpandedForm.select('trigger',allJournalTriggers(), primaryTrigger) }}
|
||||
|
||||
{# only correct way to do active checkbox #}
|
||||
|
Loading…
Reference in New Issue
Block a user