Skip to content

Commit 116af3e

Browse files
vpaladiychukDooffy
authored andcommitted
MAGETWO-36030: Add attributes for form elements
1 parent 82109a5 commit 116af3e

File tree

11 files changed

+44
-11
lines changed

11 files changed

+44
-11
lines changed

app/code/Magento/Theme/Block/Adminhtml/System/Design/Theme/Edit/Form/Element/Links.php

100644100755
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ public function getHtmlAttributes()
110110
'onmouseup',
111111
'onkeydown',
112112
'onkeypress',
113-
'onkeyup'
113+
'onkeyup',
114+
'data-role',
115+
'data-action'
114116
];
115117
}
116118
}

lib/internal/Magento/Framework/Data/Form/Element/AbstractElement.php

100644100755
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,9 @@ public function getHtmlAttributes()
239239
'readonly',
240240
'tabindex',
241241
'placeholder',
242-
'data-form-part'
242+
'data-form-part',
243+
'data-role',
244+
'data-action'
243245
];
244246
}
245247

lib/internal/Magento/Framework/Data/Form/Element/Checkbox.php

100644100755
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ public function getHtmlAttributes()
4646
'onchange',
4747
'disabled',
4848
'tabindex',
49-
'data-form-part'
49+
'data-form-part',
50+
'data-role',
51+
'data-action'
5052
];
5153
}
5254

lib/internal/Magento/Framework/Data/Form/Element/Checkboxes.php

100644100755
Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,20 @@ public function __construct(
3838
*/
3939
public function getHtmlAttributes()
4040
{
41-
return ['type', 'name', 'class', 'style', 'checked', 'onclick', 'onchange', 'disabled'];
41+
return [
42+
'type',
43+
'name',
44+
'class',
45+
'style',
46+
'checked',
47+
'onclick',
48+
'onchange',
49+
'disabled',
50+
'data-role',
51+
'data-action',
52+
'data-role',
53+
'data-action'
54+
];
4255
}
4356

4457
/**

lib/internal/Magento/Framework/Data/Form/Element/Link.php

100644100755
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ public function getHtmlAttributes()
8080
'onmouseup',
8181
'onkeydown',
8282
'onkeypress',
83-
'onkeyup'
83+
'onkeyup',
84+
'data-role',
85+
'data-action'
8486
];
8587
}
8688
}

lib/internal/Magento/Framework/Data/Form/Element/Multiline.php

100644100755
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ public function getHtmlAttributes()
4646
'onchange',
4747
'disabled',
4848
'maxlength',
49-
'data-form-part'
49+
'data-form-part',
50+
'data-role',
51+
'data-action'
5052
];
5153
}
5254

lib/internal/Magento/Framework/Data/Form/Element/Multiselect.php

100644100755
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ public function getHtmlAttributes()
105105
'disabled',
106106
'size',
107107
'tabindex',
108-
'data-form-part'
108+
'data-form-part',
109+
'data-role',
110+
'data-action'
109111
];
110112
}
111113

lib/internal/Magento/Framework/Data/Form/Element/Obscure.php

100644100755
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ public function getHtmlAttributes()
5252
'readonly',
5353
'maxlength',
5454
'tabindex',
55-
'data-form-part'
55+
'data-form-part',
56+
'data-role',
57+
'data-action'
5658
];
5759
}
5860
}

lib/internal/Magento/Framework/Data/Form/Element/Select.php

100644100755
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ public function getHtmlAttributes()
152152
'disabled',
153153
'readonly',
154154
'tabindex',
155-
'data-form-part'
155+
'data-form-part',
156+
'data-role',
157+
'data-action'
156158
];
157159
}
158160
}

lib/internal/Magento/Framework/Data/Form/Element/Text.php

100644100755
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ public function getHtmlAttributes()
6363
'maxlength',
6464
'tabindex',
6565
'placeholder',
66-
'data-form-part'
66+
'data-form-part',
67+
'data-role',
68+
'data-action'
6769
];
6870
}
6971
}

0 commit comments

Comments
 (0)