diff --git a/src/Bundle/ChillMainBundle/Form/WorkflowSignatureMetadataType.php b/src/Bundle/ChillMainBundle/Form/WorkflowSignatureMetadataType.php new file mode 100644 index 000000000..923f8da55 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Form/WorkflowSignatureMetadataType.php @@ -0,0 +1,62 @@ +parameterBag->get('chill_main.document_type_choices'); + $locale = $this->requestStack->getCurrentRequest()->getLocale(); + + $choices = []; + + foreach ($documentTypeChoices as $documentType) { + foreach ($documentType['labels'] as $label) { + if ($label['lang'] === $locale) { + $choices[$label['label']] = $documentType['key']; + break; + } + } + } + + $builder + ->add('documentType', ChoiceType::class, [ + 'label' => 'workflow.signature_zone.metadata.docType', + 'expanded' => false, + 'required' => true, + 'choices' => $choices, + ]) + ->add('documentNumber', TextType::class, [ + 'required' => true, + 'label' => 'workflow.signature_zone.metadata.docNumber', + ]) + ->add('expirationDate', ChillDateType::class, [ + 'required' => true, + 'input' => 'datetime_immutable', + 'label' => 'workflow.signature_zone.metadata.docExpiration', + ]); + } + +/* public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'data_class' => EntityWorkflowStepSignature::class, + ]); + }*/ +} diff --git a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_signature_metadata.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_signature_metadata.html.twig new file mode 100644 index 000000000..5b828832d --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_signature_metadata.html.twig @@ -0,0 +1,24 @@ +{% extends '@ChillMain/layout.html.twig' %} + +{% block title %} + {{ 'Signature'|trans }} +{% endblock %} + +{% block content %} +