/*globals jQuery, ajaxurl, icl_ajx_url, wpml_end_user_data */ var WPML_End_User_Send_Request = function ($) { "use strict"; var wpml_endpoint = wpml_end_user_data.endpoint; var get_info = function (success_callback) { $.ajax({ url: ajaxurl, type: 'GET', data: { action: 'end_user_get_info' }, beforeSend: function () { $("body").addClass("AJAXwait"); }, success: success_callback, error: display_error }); }; var handle_response = function (callback) { return function (response) { if (response.success) { callback(response); } else { display_error(response); } }; }; var build_form = function (data) { var form = $("