Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 www 1
<?php
2
 
3
declare(strict_types=1);
4
 
5
namespace LeadersLinked\Form\Transaction;
6
 
7
use Laminas\Form\Form;
8
 
9
class FundsAddForm extends Form
10
{
11
    public function __construct()
12
    {
13
        parent::__construct('form');
14
 
15
        $this->setInputFilter(new FundsAddFilter());
16
        $this->setAttribute('method', 'post');
17
 
18
        $this->add([
19
            'name'   => 'description',
20
            'type' => 'Laminas\Form\Element\Text',
21
            'attributes' => [
22
                'id'            => 'description',
23
                'placeholder'   => 'LABEL_DESCRIPTION',
24
                'required'      => 'required',
25
                'autocomplete'  => 'off',
26
                'maxlength'     => '50',
27
            ],
28
 
29
        ]);
30
 
31
        $this->add([
32
            'name'          => 'amount',
33
            'type' => 'Laminas\Form\Element\Select',
34
            'attributes' => [
35
 
36
                'id'            => 'amount',
37
                'placeholder'   => 'LABEL_AMOUNT',
38
                'class'         => 'form-control',
39
                'required'      => 'required',
40
                'autocomplete'  => 'off',
41
                'maxlength'     => '5',
42
 
43
            ],
44
        ]);
45
 
46
 
47
        $this->add([
48
            'name' => 'amount',
49
            'type' => \Laminas\Form\Element\Select::class,
50
            'options' => [
51
                'empty_option' => 'LABEL_AMOUNT',
52
                'value_options' => [
53
                    '5' => '5 LABEL_USD',
54
                    '10' => '10 LABEL_USD',
55
                    '15' => '15 LABEL_USD',
56
                    '20' => '20 LABEL_USD',
57
                    '25' => '25 LABEL_USD',
58
                    '50' => '50 LABEL_USD',
59
                    '75' => '75 LABEL_USD',
60
                    '100' => '100 LABEL_USD',
61
 
62
                ]
63
            ],
64
            'attributes' => [
65
                'id' => 'type',
66
            ]
67
        ]);
68
    }
69
}