File tree Expand file tree Collapse file tree 7 files changed +24
-54
lines changed
AuthorizenetAcceptjs/view/base
Backup/Controller/Adminhtml
Catalog/view/adminhtml/web/catalog/product/edit Expand file tree Collapse file tree 7 files changed +24
-54
lines changed Original file line number Diff line number Diff line change 4
4
*/
5
5
6
6
var config = {
7
- shim : {
8
- acceptjs : {
9
- exports : 'Accept'
10
- } ,
11
- acceptjssandbox : {
12
- exports : 'Accept'
7
+ map : {
8
+ '*' : {
9
+ acceptjssandbox : 'https://jstest.authorize.net/v1/Accept.js' ,
10
+ acceptjs : 'https://js.authorize.net/v1/Accept.js'
13
11
}
14
- } ,
15
- paths : {
16
- acceptjssandbox : 'https://jstest.authorize.net/v1/Accept' ,
17
- acceptjs : 'https://js.authorize.net/v1/Accept'
18
12
}
19
13
} ;
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ define([
16
16
dependency = 'acceptjssandbox' ;
17
17
}
18
18
19
- require ( [ dependency ] , function ( accept ) {
19
+ require ( [ dependency ] , function ( ) {
20
20
var $body = $ ( 'body' ) ;
21
21
22
22
/*
@@ -26,7 +26,16 @@ define([
26
26
* Dynamically-loading-Accept-js-E-WC-03-Accept-js-is-not-loaded/td-p/63283
27
27
*/
28
28
$body . on ( 'handshake.acceptjs' , function ( ) {
29
- deferred . resolve ( accept ) ;
29
+ /*
30
+ * Accept.js doesn't return the library when loading
31
+ * and requirejs "shim" can't be used because it only works with the "paths" config option
32
+ * and we can't use "paths" because require will try to load ".min.js" in production
33
+ * and that doesn't work because it doesn't exist
34
+ * and we can't add a query string to force a URL because accept.js will reject it
35
+ * and we can't include it locally because they check in the script before loading more scripts
36
+ * So, we use the global version as "shim" would
37
+ */
38
+ deferred . resolve ( window . Accept ) ;
30
39
$body . off ( 'handshake.acceptjs' ) ;
31
40
} ) ;
32
41
} ,
Original file line number Diff line number Diff line change 6
6
namespace Magento \Backup \Controller \Adminhtml ;
7
7
8
8
use Magento \Backend \App \Action ;
9
- use Magento \Framework \App \Action \HttpGetActionInterface ;
10
9
use Magento \Backup \Helper \Data as Helper ;
11
10
use Magento \Framework \App \ObjectManager ;
12
11
18
17
* @since 100.0.2
19
18
* @SuppressWarnings(PHPMD.AllPurposeAction)
20
19
*/
21
- abstract class Index extends Action implements HttpGetActionInterface
20
+ abstract class Index extends Action
22
21
{
23
22
/**
24
23
* Authorization level of a basic admin session
Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
- *
4
3
* Copyright © Magento, Inc. All rights reserved.
5
4
* See COPYING.txt for license details.
6
5
*/
7
6
namespace Magento \Backup \Controller \Adminhtml \Index ;
8
7
8
+ use Magento \Framework \App \Action \HttpPostActionInterface ;
9
9
use Magento \Framework \App \Filesystem \DirectoryList ;
10
10
use Magento \Framework \Filesystem ;
11
11
12
- class Create extends \Magento \Backup \Controller \Adminhtml \Index
12
+ /**
13
+ * Create backup controller
14
+ */
15
+ class Create extends \Magento \Backup \Controller \Adminhtml \Index implements HttpPostActionInterface
13
16
{
14
17
/**
15
18
* Create backup action.
Original file line number Diff line number Diff line change 5
5
6
6
define ( [
7
7
'jquery' ,
8
- 'mage/mage'
8
+ 'mage/mage' ,
9
+ 'validation'
9
10
] , function ( $ ) {
10
11
'use strict' ;
11
12
12
13
return function ( config , element ) {
13
-
14
- $ ( element ) . mage ( 'form' ) . mage ( 'validation' , {
14
+ $ ( element ) . mage ( 'form' ) . validation ( {
15
15
validationUrl : config . validationUrl
16
16
} ) ;
17
17
} ;
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments