PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.9.1
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.9.1
2.13.0 2.13.1 2.12.0 2.11.1 2.11.0 2.10.0 2.9.0 2.7.4 2.7.5 2.7.6 2.7.7 2.8.0 2.8.1 2.9.1 trunk 1.0 1.0-beta1 1.0-beta2 1.0-beta3 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 All 80 releases
ablocks / includes / blocks / form-password / attributes.php

attributes.php in aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder 2.9.1, at includes/blocks/form-password/attributes.php

120 lines 3.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace ABlocks\Blocks\FormBuilder;
3
4 use ABlocks\Controls\Icon;
5 use ABlocks\Controls\Border;
6 use ABlocks\Controls\Range;
7 use ABlocks\Components\ButtonGroup;
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit;
10 }
11
12 $attributes = [
13 'block_id' => array(
14 'type' => 'string',
15 'default' => ''
16 ),
17 'inputWidth' => [
18 'type' => 'number',
19 'default' => 100
20 ],
21 'label' => [
22 'type' => 'string',
23 'default' => ''
24 ],
25 'name' => [
26 'type' => 'string',
27 'default' => ''
28 ],
29 'placeholder' => [
30 'type' => 'string',
31 'default' => '*******'
32 ],
33 'formType' => [
34 'type' => 'string',
35 'default' => ''
36 ],
37 'inputType' => [
38 'type' => 'string',
39 'default' => ''
40 ],
41 'isRequired' => [
42 'type' => 'boolean',
43 'default' => true
44 ],
45 'nameChangeable' => [
46 'type' => 'boolean',
47 'default' => true,
48 ],
49 'isPasswordVisible' => [
50 'type' => 'boolean',
51 'default' => false
52 ],
53 'showIcon' => [
54 'type' => 'boolean',
55 'default' => false
56 ],
57 'passwordShowHideToggle' => [
58 'type' => 'boolean',
59 'default' => false
60 ],
61 'passwordIconColor' => [
62 'type' => 'string',
63 'default' => ''
64 ],
65 'errorMsg' => [
66 'type' => 'string',
67 'default' => 'This field is required'
68 ],
69 'helperText' => [
70 'type' => 'string',
71 'default' => ''
72 ],
73 'iconColor' => [
74 'type' => 'string',
75 'default' => ''
76 ],
77 ];
78
79 $attributes = array_merge(
80 $attributes,
81 Border::get_attribute( 'border', true ),
82 Icon::get_attribute('icon', [
83 'size' => 28,
84 'hasNoSelectorOrSource' => true,
85 ]),
86 Icon::get_attribute( 'passwordShow', [
87 'path' => 'M634 471L36 3.51A16 16 0 0 0 13.51 6l-10 12.49A16 16 0 0 0 6 41l598 467.49a16 16 0 0 0 22.49-2.49l10-12.49A16 16 0 0 0 634 471zM296.79 146.47l134.79 105.38C429.36 191.91 380.48 144 320 144a112.26 112.26 0 0 0-23.21 2.47zm46.42 219.07L208.42 260.16C210.65 320.09 259.53 368 320 368a113 113 0 0 0 23.21-2.46zM320 112c98.65 0 189.09 55 237.93 144a285.53 285.53 0 0 1-44 60.2l37.74 29.5a333.7 333.7 0 0 0 52.9-75.11 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64c-36.7 0-71.71 7-104.63 18.81l46.41 36.29c18.94-4.3 38.34-7.1 58.22-7.1zm0 288c-98.65 0-189.08-55-237.93-144a285.47 285.47 0 0 1 44.05-60.19l-37.74-29.5a333.6 333.6 0 0 0-52.89 75.1 32.35 32.35 0 0 0 0 29.19C89.72 376.41 197.08 448 320 448c36.7 0 71.71-7.05 104.63-18.81l-46.41-36.28C359.28 397.2 339.89 400 320 400z',
88 'viewBox' => '0 0 640 512',
89 'className' => 'far fa-eye-slash',
90 'hasNoSelectorOrSource' => true,
91 ] ),
92 Icon::get_attribute( 'passwordHide', [
93 'path' => 'M288 144a110.94 110.94 0 0 0-31.24 5 55.4 55.4 0 0 1 7.24 27 56 56 0 0 1-56 56 55.4 55.4 0 0 1-27-7.24A111.71 111.71 0 1 0 288 144zm284.52 97.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400c-98.65 0-189.09-55-237.93-144C98.91 167 189.34 112 288 112s189.09 55 237.93 144C477.1 345 386.66 400 288 400z',
94 'viewBox' => '0 0 576 512',
95 'className' => 'far fa-eye',
96 'hasNoSelectorOrSource' => true,
97 ] ),
98 ButtonGroup::get_attribute( 'passwordType', false, [
99 'value' => 'password',
100 ] ),
101 Range::get_attribute( [
102 'attributeName' => 'passwordShowHideIconSize',
103 'isResponsive' => false,
104 'defaultValue' => 18,
105 ] ),
106 Range::get_attribute( [
107 'attributeName' => 'inputIconSize',
108 'isResponsive' => false,
109 'defaultValue' => 28,
110 ] ),
111 Range::get_attribute( [
112 'attributeName' => 'inputIconSpace',
113 'isResponsive' => false,
114 'defaultValue' => 38,
115 ] ),
116 );
117
118 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
119
120