allow decimals in users hourly rate (#460)

This commit is contained in:
Kevin Papst
2018-12-03 20:23:52 +01:00
committed by GitHub
parent 43b488f21f
commit 589d750e59
2 changed files with 5 additions and 5 deletions

View File

@@ -19,7 +19,7 @@ use App\Form\Type\SkinType;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
use Symfony\Component\Form\Extension\Core\Type\NumberType;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
use Symfony\Component\Validator\Constraints\Range;
@@ -86,7 +86,7 @@ class UserPreferenceSubscriber implements EventSubscriberInterface
(new UserPreference())
->setName(UserPreference::HOURLY_RATE)
->setValue(0)
->setType(IntegerType::class)
->setType(NumberType::class)
->setEnabled($enableHourlyRate)
->addConstraint(new Range(['min' => 0])),