overleaf/services/web/frontend/js/main/post-gateway.js

19 lines
471 B
JavaScript
Raw Normal View History

import App from '../base'
export default 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()
}
})