File tree Expand file tree Collapse file tree 12 files changed +23
-17
lines changed
dev/tests/functional/tests/app/Magento
CheckoutAgreements/Test/Block/Adminhtml/Block/Agreement/Edit
Newsletter/Test/Block/Adminhtml/Queue/Edit
Reports/Test/Block/Adminhtml/Sales
Review/Test/Block/Adminhtml/Rating/Edit
Sales/Test/Block/Adminhtml/Report/Filter
Widget/Test/Block/Adminhtml
Widget/Instance/Edit/Tab/ParametersType Expand file tree Collapse file tree 12 files changed +23
-17
lines changed Original file line number Diff line number Diff line change 18
18
<input >select</input >
19
19
</mode >
20
20
<stores >
21
- <selector >[name="stores[]"]</selector >
21
+ <selector >[name="stores[0 ]"]</selector >
22
22
<input >multiselectgrouplist</input >
23
23
</stores >
24
24
<checkbox_text />
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ class CustomerForm extends Form
29
29
*
30
30
* @var string
31
31
*/
32
- protected $ customerAttribute = "[name='%s[]'] " ;
32
+ protected $ customerAttribute = "[orig- name='%s[]'] " ;
33
33
34
34
/**
35
35
* Validation text message for a field.
Original file line number Diff line number Diff line change 11
11
<selector >input[name='start_at']</selector >
12
12
</queue_start_at >
13
13
<stores >
14
- <selector >select[name="stores[]"]</selector >
14
+ <selector >select[name="stores[0 ]"]</selector >
15
15
<input >multiselectgrouplist</input >
16
16
</stores >
17
17
<newsletter_subject >
Original file line number Diff line number Diff line change 29
29
<input >select</input >
30
30
</price_rule_type >
31
31
<order_statuses >
32
- <selector >[name="order_statuses[]"]</selector >
32
+ <selector >[name="order_statuses[0 ]"]</selector >
33
33
<input >multiselect</input >
34
34
</order_statuses >
35
35
<rules_list >
Original file line number Diff line number Diff line change 23
23
<input >select</input >
24
24
</show_order_statuses >
25
25
<order_statuses >
26
- <selector >[name="order_statuses[]"]</selector >
26
+ <selector >[name="order_statuses[0 ]"]</selector >
27
27
<input >multiselect</input >
28
28
</order_statuses >
29
29
<show_empty_rows >
Original file line number Diff line number Diff line change 12
12
<strategy >css selector</strategy >
13
13
<fields >
14
14
<stores >
15
- <selector >[name="stores[]"]</selector >
15
+ <selector >[name="stores[0 ]"]</selector >
16
16
<input >multiselectgrouplist</input >
17
17
</stores >
18
18
<is_active >
Original file line number Diff line number Diff line change 26
26
<input >select</input >
27
27
</show_order_statuses >
28
28
<order_statuses >
29
- <selector >[name="order_statuses[]"]</selector >
29
+ <selector >[name="order_statuses[0 ]"]</selector >
30
30
<input >multiselect</input >
31
31
</order_statuses >
32
32
<show_actual_columns >
Original file line number Diff line number Diff line change 12
12
</page_size >
13
13
<show_attributes >
14
14
<selector >
15
- .control [name="parameters[show_attributes][]"]
15
+ .control [name="parameters[show_attributes][1 ]"]
16
16
</selector >
17
17
<input >multiselect</input >
18
18
</show_attributes >
19
19
<show_buttons >
20
20
<selector >
21
- .control [name="parameters[show_buttons][]"]
21
+ .control [name="parameters[show_buttons][2 ]"]
22
22
</selector >
23
23
<input >multiselect</input >
24
24
</show_buttons >
Original file line number Diff line number Diff line change 12
12
</page_size >
13
13
<show_attributes >
14
14
<selector >
15
- .control [name="parameters[show_attributes][]"]
15
+ .control [name="parameters[show_attributes][1 ]"]
16
16
</selector >
17
17
<input >multiselect</input >
18
18
</show_attributes >
19
19
<show_buttons >
20
20
<selector >
21
- .control [name="parameters[show_buttons][]"]
21
+ .control [name="parameters[show_buttons][2 ]"]
22
22
</selector >
23
23
<input >multiselect</input >
24
24
</show_buttons >
Original file line number Diff line number Diff line change 32
32
<page_size />
33
33
<show_attributes >
34
34
<selector >
35
- .control [name="parameters[show_attributes][]"]
35
+ .control [name="parameters[show_attributes][1 ]"]
36
36
</selector >
37
37
<input >multiselect</input >
38
38
</show_attributes >
39
39
<show_buttons >
40
40
<selector >
41
- .control [name="parameters[show_buttons][]"]
41
+ .control [name="parameters[show_buttons][2 ]"]
42
42
</selector >
43
43
<input >multiselect</input >
44
44
</show_buttons >
Original file line number Diff line number Diff line change 1945
1945
* Before submitting the actual form, remove the previously assigned indices
1946
1946
* @param {Object } form
1947
1947
*/
1948
- this . options . submitHandler = function ( form , event ) {
1948
+ this . options . submitHandler = function ( form ) {
1949
1949
originalElements . forEach ( function ( element ) {
1950
1950
element . element . attr ( 'name' , element . name ) ;
1951
1951
element . element . removeAttr ( 'orig-name' ) ;
1952
1952
} ) ;
1953
1953
1954
- console . error ( this . submit )
1954
+ console . error ( this . submit ) ;
1955
+
1955
1956
/* Call the originalSubmitHandler if it's a function */
1956
1957
typeof originalSubmitHandler === 'function' ? originalSubmitHandler ( form ) : form . submit ( ) ;
1957
1958
} ;
1960
1961
1961
1962
/**
1962
1963
* Validation listening.
1964
+ *
1963
1965
* @protected
1964
1966
*/
1965
1967
_listenFormValidate : function ( ) {
Original file line number Diff line number Diff line change 50
50
function ( value , element , params ) {
51
51
var checkedCount = 0 ,
52
52
selector ,
53
- container ;
53
+ container ,
54
+ origNameSelector ,
55
+ nameSelector ;
54
56
55
57
if ( element . type === 'checkbox' ) {
56
58
/* If orig-name attribute is present, use it for validation. Else use name */
57
- selector = element . getAttribute ( 'orig-name' ) ? '[orig-name="' + element . getAttribute ( 'orig-name' ) + '"]' : '[name="' + element . name + '"]' ;
59
+ origNameSelector = '[orig-name="' + element . getAttribute ( 'orig-name' ) + '"]' ;
60
+ nameSelector = '[name="' + element . name + '"]' ;
61
+ selector = element . getAttribute ( 'orig-name' ) ? origNameSelector : nameSelector ;
58
62
$ ( selector ) . each ( function ( ) {
59
63
if ( $ ( this ) . is ( ':checked' ) ) {
60
64
checkedCount += 1 ;
You can’t perform that action at this time.
0 commit comments