Skip to content
Snippets Groups Projects
Select Git revision
  • e9ccb7aeac31baa4769047c2c46b62c36a07d5e6
  • master default protected
  • b24
  • ll-workflow
  • alc-scindage-donnees-pj
  • FJ_LL_Tbl_Contrat
  • alc-docker-node
  • ll-apiplatform
  • php84
  • ll-rgpd
  • b23
  • alc-filtre-type-intervenant
  • ll-sans-mdb5
  • formules-ancienne-infra
  • ll-formules
  • alc-intervenant-dmep
  • ll-suppr-v_vol-s
  • b20
  • ll-postgresql
  • b23.0.1
  • b22
  • 24.8
  • 24.7
  • 24.6
  • 24.5
  • 24.4
  • 24.3
  • 24.2
  • 24.1
  • 24.0
  • 23.15
  • 24.0-beta19
  • 24.0-beta18
  • 24.0-beta17
  • 24.0-beta16
  • 24.0-beta15
  • 24.0-beta14
  • 24.0-beta13
  • 23.14
  • 24.0-beta12
  • 24.0-beta11
41 results

init_autoloader.php

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    ValidationInstanceForm.php 2.08 KiB
    <?php
    
    namespace UnicaenValidation\Form\ValidationInstance;
    
    use UnicaenValidation\Service\ValidationType\ValidationTypeServiceAwareTrait;
    use Laminas\Form\Element\Button;
    use Laminas\Form\Element\Select;
    use Laminas\Form\Element\Text;
    use Laminas\Form\Form;
    use Laminas\InputFilter\Factory;
    
    class ValidationInstanceForm extends Form {
        use ValidationTypeServiceAwareTrait;
    
        public function init() {
    
            //type
            $this->add([
                'type' => Select::class,
                'name' => 'type',
                'options' => [
                    'label' => "Type de validation* :",
                    'empty_option' => "Choisir un type de validation",
                    'value_options' => $this->getValidationTypeService()->getValidationsTypesAsOptions(),
                ],
                'attributes' => [
                    'id'                => 'type',
                    'class'             => 'bootstrap-selectpicker show-tick',
                    'data-live-search'  => 'true',
                ],
            ]);
            //valeur
            $this->add([
                'name' => 'valeur',
                'type' => Text::class,
                'options' => [
                    'label' => 'Refus (laisser vide si acceptation) : ',
                    'label_attributes' => [
                        'class' => 'control-label',
                    ],
                ],
                'attributes' => [
                    'id'                => 'valeur',
                ]
            ]);
            //submit
            $this->add([
                'type' => Button::class,
                'name' => 'creer',
                'options' => [
                    'label' => '<i class="fas fa-save"></i> Enregistrer' ,
                    'label_options' => [
                        'disable_html_escape' => true,
                    ],
                ],
                'attributes' => [
                    'type' => 'submit',
                    'class' => 'btn btn-primary',
                ],
            ]);
    
            //inputfilter
            $this->setInputFilter((new Factory())->createInputFilter([
                'type'               => [ 'required' => true,  ],
                'valeur'             => [ 'required' => false,  ],
            ]));
        }
    }