Next major version 2 with PHP 8.1, Symfony 6, Tabler UI, 2FA ... (#2902)

This commit is contained in:
Kevin Papst
2022-12-31 21:19:55 +01:00
committed by GitHub
parent 95e06746bd
commit 90a0fd8a22
2164 changed files with 83700 additions and 86426 deletions

View File

@@ -14,7 +14,6 @@ use App\Form\Type\InvoiceCalculatorType;
use App\Form\Type\InvoiceNumberGeneratorType;
use App\Form\Type\InvoiceRendererType;
use App\Form\Type\LanguageType;
use App\Form\Type\YesNoType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
use Symfony\Component\Form\Extension\Core\Type\NumberType;
@@ -26,66 +25,55 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
/**
* Defines the form used to manipulate invoice templates.
*/
class InvoiceTemplateForm extends AbstractType
final class InvoiceTemplateForm extends AbstractType
{
/**
* {@inheritdoc}
*/
public function buildForm(FormBuilderInterface $builder, array $options)
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('name', TextType::class, [
'label' => 'label.name',
'label' => 'name',
])
->add('title', TextType::class, [
'label' => 'label.title',
'label' => 'title',
])
->add('company', TextType::class, [
'label' => 'label.company',
'label' => 'company',
])
->add('vatId', TextType::class, [
'label' => 'label.vat_id',
'label' => 'vat_id',
'required' => false,
])
->add('address', TextareaType::class, [
'label' => 'label.address',
'label' => 'address',
'required' => false,
])
->add('contact', TextareaType::class, [
'label' => 'label.contact',
'label' => 'contact',
'required' => false,
])
->add('paymentTerms', TextareaType::class, [
'label' => 'label.payment_terms',
'label' => 'payment_terms',
'required' => false,
])
->add('paymentDetails', TextareaType::class, [
'label' => 'label.invoice_bank_account',
'label' => 'invoice_bank_account',
'required' => false,
])
->add('dueDays', IntegerType::class, [
'label' => 'label.due_days',
'label' => 'due_days',
])
->add('vat', NumberType::class, [
'label' => 'label.tax_rate',
'label' => 'tax_rate',
'scale' => 3,
])
->add('renderer', InvoiceRendererType::class)
->add('calculator', InvoiceCalculatorType::class)
->add('numberGenerator', InvoiceNumberGeneratorType::class)
->add('language', LanguageType::class, [
'required' => true,
])
->add('decimalDuration', YesNoType::class, [
'label' => 'label.decimalDuration'
])
->add('language', LanguageType::class)
;
}
/**
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver)
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => InvoiceTemplate::class,
@@ -97,6 +85,7 @@ class InvoiceTemplateForm extends AbstractType
'data-msg-success' => 'action.update.success',
'data-msg-error' => 'action.update.error',
],
'docu_chapter' => 'invoices.html',
]);
}
}