Code Duplication    Length = 69-70 lines in 2 locations

module/Admin/src/Admin/Form/AclresourceForm.php 1 location

@@ 20-88 (lines=69) @@
17
18
use Zend\Form\Form;
19
20
class AclresourceForm extends Form
21
{
22
    public function __construct($name = null)
23
    {
24
        // we want to ignore the name passed
25
        parent::__construct('aclresource');
26
        $this->setAttribute('method', 'post');
27
        
28
        $this->add(
29
            array(
30
            'name' => 'aclresources_id',
31
            'attributes' => array(
32
            'type'  => 'hidden',
33
            ),
34
            )
35
        );
36
        $this->add(
37
            array(
38
            'name' => 'resourceslug',
39
            'type' => 'text',
40
            'attributes' => array(
41
            'type'  => 'text',
42
            ),
43
            'options' => array(
44
            'label' => 'resource slug',
45
            ),
46
            )
47
        );
48
        $this->add(
49
            array(
50
            'name' => 'resourcename',
51
            'type' => 'text',
52
            'attributes' => array(
53
            'type'  => 'text',
54
            ),
55
            'options' => array(
56
            'label' => 'resource name',
57
            ),
58
            )
59
        );
60
61
        $this->add(
62
            array(
63
            'name' => 'reset',
64
            'attributes' => array(
65
            'type'  => 'reset',
66
            'value' => 'reset',
67
            'id' => 'resetbutton',
68
            ),
69
            'options' => array(
70
            'label' => 'reset',
71
            ),
72
            )
73
        );
74
        $this->add(
75
            array(
76
            'name' => 'submit',
77
            'attributes' => array(
78
            'type'  => 'submit',
79
            'value' => 'save',
80
            'id' => 'submitbutton',
81
            ),
82
            'options' => array(
83
            'label' => 'save',
84
            ),
85
            )
86
        );
87
    }
88
}

module/Admin/src/Admin/Form/AclroleForm.php 1 location

@@ 20-89 (lines=70) @@
17
18
use Zend\Form\Form;
19
20
class AclroleForm extends Form
21
{
22
    public function __construct($name = null)
23
    {
24
        // we want to ignore the name passed
25
        parent::__construct('aclrole');
26
        $this->setAttribute('method', 'post');
27
        
28
        $this->add(
29
            array(
30
            'name' => 'aclroles_id',
31
            'attributes' => array(
32
            'type'  => 'hidden' ,
33
            ),
34
            )
35
        );
36
        $this->add(
37
            array(
38
            'name' => 'roleslug',
39
            'type' => 'text',
40
            'attributes' => array(
41
            'type'  => 'text',
42
            ),
43
            'options' => array(
44
            'label' => 'role slug',
45
            ),
46
            )
47
        );
48
        $this->add(
49
            array(
50
            'name' => 'rolename',
51
            'type' => 'text',
52
            'attributes' => array(
53
            'type'  => 'text',
54
            ),
55
            'options' => array(
56
            'label' => 'role name',
57
            ),
58
            )
59
        );
60
61
        $this->add(
62
            array(
63
            'name' => 'submit',
64
            'attributes' => array(
65
            'type'  => 'submit',
66
            'value' => 'save',
67
            'id' => 'submitbutton',
68
            ),
69
            'options' => array(
70
            'label' => 'save',
71
            ),
72
            )
73
        );
74
75
        $this->add(
76
            array(
77
            'name' => 'reset',
78
            'attributes' => array(
79
                   'type'  => 'reset',
80
                  'value' => 'reset',
81
                  'id' => 'resetbutton',
82
               ),
83
            'options' => array(
84
            'label' => 'reset',
85
            ),
86
            )
87
        );
88
    }
89
}