Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

Commit 5f7029d

Browse files
Fixed issue with Review form reset button
1 parent ad44545 commit 5f7029d

File tree

1 file changed

+5
-0
lines changed
  • app/code/Magento/Review/Block/Adminhtml

1 file changed

+5
-0
lines changed

app/code/Magento/Review/Block/Adminhtml/Add.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ protected function _construct()
3030
$this->buttonList->update('save', 'id', 'save_button');
3131

3232
$this->buttonList->update('reset', 'id', 'reset_button');
33+
$this->buttonList->update('reset', 'onclick', 'window.review.formReset()');
3334

3435
$this->_formScripts[] = '
3536
require(["prototype"], function(){
@@ -44,6 +45,7 @@ protected function _construct()
4445
require(["jquery","prototype"], function(jQuery){
4546
window.review = function() {
4647
return {
48+
reviewFormEditSelector: "#edit_form",
4749
productInfoUrl : null,
4850
formHidden : true,
4951
gridRowClick : function(data, click) {
@@ -72,6 +74,9 @@ protected function _construct()
7274
toggleVis("save_button");
7375
toggleVis("reset_button");
7476
},
77+
formReset: function() {
78+
jQuery(review.reviewFormEditSelector).trigger(\'reset\');
79+
},
7580
updateRating: function() {
7681
elements = [$("select_stores"), $("rating_detail").getElementsBySelector("input[type=\'radio\']")].flatten();
7782
$(\'save_button\').disabled = true;

0 commit comments

Comments
 (0)