Skip to content

Commit

Permalink
fix(form): delete question does not reset preview tab
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Oct 26, 2022
1 parent 691d8f9 commit ad87ddc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions js/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,7 @@ var plugin_formcreator = new function() {
if (typeof(id) === 'undefined') {
return;
}
var that = this;
if (confirm(i18n.textdomain('formcreator').__('Are you sure you want to delete this question?', 'formcreator'))) {
jQuery.ajax({
url: formcreatorRootDoc + '/ajax/question_delete.php',
Expand All @@ -697,6 +698,7 @@ var plugin_formcreator = new function() {
var gridstack = container.gridstack;
var row = $(item).attr('data-gs-y');
gridstack.removeWidget(item);
that.resetTabs();
});
}
};
Expand Down

0 comments on commit ad87ddc

Please sign in to comment.