houdini/app/javascript/legacy/events/show/event_donation.js
2020-04-23 14:09:14 -05:00

27 lines
732 B
JavaScript

// License: LGPL-3.0-or-later
$('.ticket-level').click(function(e) {
wiz.model.set('single_amount', $(this).data('dollars'))
wiz.model.set('designation', $(this).data('name'))
wiz.model.set('description', $(this).data('desc'))
wiz.ticket_level_id = $(this).data('id')
wiz.donation.set({
amount: $(this).data('amount'),
designation: $(this).data('name')
})
})
$('.nonprofit-donate-button').click(function() {
wiz.model.set('single_amount', undefined)
wiz.model.set('designation', undefined)
wiz.model.set('description', undefined)
wiz.ticket_level_id = undefined
wiz.donation.set({
amount: undefined,
designation: undefined
})
})
$('.anon-wrapper').hide()
$('.info-submit').text('Submit')
module.exports = wiz