@@ -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