Skip to content
Snippets Groups Projects
Commit 3b31c48c authored by Serhiy Shkolyarenko's avatar Serhiy Shkolyarenko
Browse files

MAGETWO-19331: Impossible add to the shopping cart product with Custom option type="file"

changes from Ievgen Shakhsuvarov
static test fixes
(cherry picked from commit ec03baa)
parent 85691195
Branches
No related merge requests found
...@@ -38,6 +38,16 @@ define([ ...@@ -38,6 +38,16 @@ define([
}, },
submitForm: function(form) { submitForm: function(form) {
var self = this;
if (form.has('input[type="file"]').length) {
self.element.off('submit');
form.submit();
} else {
self.ajaxSubmit(form);
}
},
ajaxSubmit: function(form) {
var self = this; var self = this;
$.ajax({ $.ajax({
url: form.attr('action'), url: form.attr('action'),
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
namespace Magento\Sales\Controller\Download; namespace Magento\Sales\Controller\Download;
use Magento\Sales\Model\Download; use Magento\Sales\Model\Download;
use \Magento\Framework\App\Action\Context; use Magento\Framework\App\Action\Context;
use Magento\Catalog\Model\Product\Type\AbstractType; use Magento\Catalog\Model\Product\Type\AbstractType;
use \Magento\Framework\Controller\Result\ForwardFactory; use Magento\Framework\Controller\Result\ForwardFactory;
class DownloadCustomOption extends \Magento\Framework\App\Action\Action class DownloadCustomOption extends \Magento\Framework\App\Action\Action
{ {
......
...@@ -115,6 +115,7 @@ return [ ...@@ -115,6 +115,7 @@ return [
['Magento\Sales\Block\Adminhtml\Order\Shipment\View', 'Magento\Shipping\Block\Adminhtml\View'], ['Magento\Sales\Block\Adminhtml\Order\Shipment\View', 'Magento\Shipping\Block\Adminhtml\View'],
['Magento\Sales\Block\Order\Shipment\Items', 'Magento\Shipping\Block\Items'], ['Magento\Sales\Block\Order\Shipment\Items', 'Magento\Shipping\Block\Items'],
['Magento\Sales\Controller\Adminhtml\Order\Shipment', 'Magento\Shipping\Controller\Adminhtml\Order\Shipment'], ['Magento\Sales\Controller\Adminhtml\Order\Shipment', 'Magento\Shipping\Controller\Adminhtml\Order\Shipment'],
['Magento\Sales\Controller\Download'],
['Magento\Sales\Block\Order\Shipment', 'Magento\Shipping\Block\Order\Shipment'], ['Magento\Sales\Block\Order\Shipment', 'Magento\Shipping\Block\Order\Shipment'],
['Mage_Adminhtml_Block_Sales_Order_Create_Customer_Grid'], ['Mage_Adminhtml_Block_Sales_Order_Create_Customer_Grid'],
['Mage_Adminhtml_Block_Sales_Order_Create_Search_Grid_Renderer_Giftmessage'], ['Mage_Adminhtml_Block_Sales_Order_Create_Search_Grid_Renderer_Giftmessage'],
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment