Skip to content

Commit

Permalink
ENGCOM-2498: magento-engcom/import-export-improvements#58: Fix genera…
Browse files Browse the repository at this point in the history
…tion of import url #111

 - Merge Pull Request magento-engcom/import-export-improvements#111 from dmanners/import-export-improvements:fix-import-url-builder
 - Merged commits:
   1. 10ce88b
  • Loading branch information
magento-engcom-team committed Jul 24, 2018
2 parents d120ac1 + 10ce88b commit de7e84e
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,13 @@ require([
.loader('show');
var form = jQuery('#edit_form')
.one('invalid-form.validate', function(e){jQuery('body').loader('hide')});
newActionUrl = (newActionUrl ? newActionUrl : form.attr('action')) +
(form.attr('action').lastIndexOf('?') != -1 ? '&' : '?')+
'form_key=' + encodeURIComponent(form.find('[name="form_key"]').val());

newActionUrl = (newActionUrl ? newActionUrl : form.attr('action'));
if (newActionUrl.lastIndexOf('form_key') === -1) {
newActionUrl = newActionUrl +
(newActionUrl.lastIndexOf('?') !== -1 ? '&' : '?') +
'form_key=' + encodeURIComponent(form.find('[name="form_key"]').val());
}

form.trigger('save', [{
action: newActionUrl,
Expand Down

0 comments on commit de7e84e

Please sign in to comment.