Easier creation of Tasks/Projects/User (#230)

This commit is contained in:
Kevin Papst
2018-07-22 23:18:47 +02:00
committed by GitHub
parent 2cf7d976d3
commit f41eea2768
13 changed files with 297 additions and 10 deletions

View File

@@ -14,6 +14,7 @@ use App\Form\Type\ProjectType;
use App\Form\Type\YesNoType;
use App\Repository\ProjectRepository;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
@@ -59,6 +60,14 @@ class ActivityEditForm extends AbstractType
'label' => 'label.visible',
])
;
if ($entry->getId() === null) {
$builder->add('create_more', CheckboxType::class, [
'label' => 'label.create_more',
'required' => false,
'mapped' => false,
]);
}
}
/**

View File

@@ -15,6 +15,7 @@ use App\Form\Type\CustomerType;
use App\Form\Type\YesNoType;
use App\Repository\CustomerRepository;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\MoneyType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
@@ -66,6 +67,14 @@ class ProjectEditForm extends AbstractType
'required' => false,
])
;
if ($entry->getId() === null) {
$builder->add('create_more', CheckboxType::class, [
'label' => 'label.create_more',
'required' => false,
'mapped' => false,
]);
}
}
/**

View File

@@ -9,6 +9,7 @@
namespace App\Form;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
use Symfony\Component\Form\FormBuilderInterface;
@@ -37,6 +38,12 @@ class UserCreateType extends UserEditType
]);
parent::buildForm($builder, $options);
$builder->add('create_more', CheckboxType::class, [
'label' => 'label.create_more',
'required' => false,
'mapped' => false,
]);
}
/**