Fix all views.

This commit is contained in:
James Cole
2019-08-10 16:50:37 +02:00
parent 0d9bae6ec2
commit 3daddd690f
20 changed files with 207 additions and 28 deletions

View File

@@ -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);

View File

@@ -27,7 +27,7 @@ use Illuminate\Support\Facades\Facade;
/**
* @codeCoverageIgnore
* Class ExpandedForm.
* Class AccountForm.
*
*/
class AccountForm extends Facade

View 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';
}
}

View File

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

View 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';
}
}

View 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';
}
}

View File

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

View File

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