form improvement

using theme clone
This commit is contained in:
Kevin Papst
2016-11-13 22:19:18 +01:00
parent cc269d3142
commit aaa2fffa08
22 changed files with 411 additions and 60 deletions

View File

@@ -30,6 +30,8 @@ class YesNoType extends AbstractType
{
$resolver->setDefaults([
'choices' => ['yes' => true, 'no' => false],
'multiple' => false,
'expanded' => true,
]);
}

View File

@@ -82,22 +82,23 @@ class Extensions extends \Twig_Extension
$minute = $minute > 9 ? $minute : '0' . $minute;
if (!$includeSeconds) {
return $hour . ':' . $minute;
return $hour . ':' . $minute . ' h';
}
$second = $seconds % 60;
$second = $second > 9 ? $second : '0' . $second;
return $hour . ':' . $minute . ':' . $second . 'h';
return $hour . ':' . $minute . ':' . $second . ' h';
}
/**
* @param float $amount
* @param string $currency
* @return string
*/
public function money($amount)
public function money($amount, $currency = 'EUR')
{
return round($amount) . ' €';
return round($amount) . ' ' . Intl::getCurrencyBundle()->getCurrencySymbol($currency);
}
/**