add back csrf token for index validation

This commit is contained in:
Kyle Drake 2024-08-20 09:38:40 -05:00
parent c4487af180
commit b50d93f030

View file

@ -30,7 +30,7 @@
}) })
$('input[type=text],input[type=password],input[type=email]').on('change focusout', function(obj) { $('input[type=text],input[type=password],input[type=email]').on('change focusout', function(obj) {
$.post('/create_validate', {field: obj.target.name, value: obj.target.value, is_education: $('input[name=is_education]')[0].value, csrf_token: 'CSRF_TOKEN_HERE'}, function(res) { $.post('/create_validate', {field: obj.target.name, value: obj.target.value, is_education: $('input[name=is_education]')[0].value, csrf_token: '<%= csrf_token %>'}, function(res) {
if(res.result == 'ok') { if(res.result == 'ok') {
return $(obj.target).tooltip('hide') return $(obj.target).tooltip('hide')
} }