mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-02 11:22:01 -05:00
18 lines
486 B
JavaScript
18 lines
486 B
JavaScript
|
define(['base'], App =>
|
||
|
App.controller('PostGatewayController', function($scope) {
|
||
|
$scope.handleGateway = function() {
|
||
|
const { params } = JSON.parse($('#gateway-data').text())
|
||
|
params.viaGateway = 'true'
|
||
|
Object.keys(params).forEach(param => {
|
||
|
$('<input>')
|
||
|
.attr({
|
||
|
type: 'hidden',
|
||
|
name: param,
|
||
|
value: params[param]
|
||
|
})
|
||
|
.appendTo('#gateway')
|
||
|
})
|
||
|
$('#gateway').submit()
|
||
|
}
|
||
|
}))
|