Various code to fix checkboxes.

This commit is contained in:
James Cole
2018-06-18 21:07:09 +02:00
parent 0374c32236
commit 56bc79d64e
21 changed files with 97 additions and 24 deletions

View File

@@ -247,6 +247,33 @@ class ExpandedForm
return $res;
}
/**
* @param string $name
* @param null $value
* @param array $options
*
* @return string
* @throws \Throwable
*/
public function currencyListEmpty(string $name, $value = null, array $options = []): string
{
/** @var CurrencyRepositoryInterface $currencyRepos */
$currencyRepos = app(CurrencyRepositoryInterface::class);
// get all currencies:
$list = $currencyRepos->get();
$array = [
0 => trans('firefly.no_currency')
];
/** @var TransactionCurrency $currency */
foreach ($list as $currency) {
$array[$currency->id] = $currency->name . ' (' . $currency->symbol . ')';
}
$res = $this->select($name, $array, $value, $options);
return $res;
}
/**
* @param string $name
* @param null $value