Skip to content

Commit

Permalink
emulate user click
Browse files Browse the repository at this point in the history
  • Loading branch information
Bohdan Berezhniy committed Jul 17, 2024
1 parent cfe2398 commit 5298a5a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions view/adminhtml/templates/form/versionsManager.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ if ($getModuleVersion->execute('Magefan_AutoRelatedProductExtra')) {
'[name="block_position"]',
'[name="sort_by"]',
'[name="apply_same_as_condition"]',
'[name="autorp_rule_formrule_same_as_conditions_fieldset_"]'
'[name="autorp_rule_formrule_same_as_conditions_fieldset_"]',
'[data-index="add_product_to"]',
'[name="template"]'
]
<?php } ?>
},
Expand All @@ -66,11 +68,13 @@ if ($getModuleVersion->execute('Magefan_AutoRelatedProductExtra')) {
var selectedOptionText = this.options[this.selectedIndex].text;
if (selectedOptionText.includes("("+ plan +")")) {
versionsManager.showAlert(plan);
this.selectedIndex = 0
this.selectedIndex = 0;
this.dispatchEvent(new Event('change', { bubbles: true }));
}
});
} else {
element.addEventListener('click', function (event) {
this.value = '';
event.preventDefault();
event.stopPropagation();

Expand Down

0 comments on commit 5298a5a

Please sign in to comment.