KOKINIO - MANAGER
Edit File: FormSender.js
var FormSender = function() { return { init: function() { var my_form = $( '#form-actor' ); $( '#send-button', my_form ).click( function(){ var institution = $( 'input:checked', my_form ).length; console.log( institution ); var name = $( '#input-actor-name', my_form ).val() ; var token = $( '#csrf-token', my_form ).val(); console.log( token ); $.ajax({ url: main_path + '/web/actor/create', data: { name: name, type_entity: institution, _token: token }, type: 'POST', success: function( data ){ console.log( data ); $.bootstrapGrowl( data, { type: "success", delay: 4500, allow_dismiss: true }); $( '#input-actor-name', my_form ).val( '' ); $( 'input:checked', my_form ).attr( 'checked', false ) ; },fail: function( data ){ console.log( data ); $.bootstrapGrowl( data, { type: "fail", delay: 7500, allow_dismiss: true }); } }); }); } } }();