text: function updateUser(a,e){var t=BASE+"/admin/members/"+a,l="";l="ban"===e?are_you_ready_to_ban:"unban"===e?are_you_ready_to_unban:"activate"===e?are_you_ready_to_activate:"addMonth"===e?"Are you sure want to add one month?":"Are you sure want to do this?",bootbox.confirm({message:l,buttons:{confirm:{label:'<i class="fa fa-check"></i> Sure',className:"btn-primary"},cancel:{label:'<i class="fa fa-times"></i> Cancel',className:"btn-warning"}},callback:function(a){a&&$.ajax({type:"PUT",url:t,data:"_token="+Token+"&status="+e,success:function(a){"success"===a&&(location.href=href_url)}})}})}function deleteUser(a){var e=BASE+"/admin/members/"+a;bootbox.confirm({message:are_you_ready_to_delete,buttons:{confirm:{label:'<i class="fa fa-check"></i> Sure',className:"btn-primary"},cancel:{label:'<i class="fa fa-times"></i> Cancel',className:"btn-warning"}},callback:function(a){a&&$.ajax({type:"DELETE",url:e,data:"_token="+Token,success:function(a){"success"===a&&(location.href=href_url)}})}})}!function(){$(function(){function a(a){var e=JSON.parse(a),t=[];for(var l in e){var n={id:e[l].plan_id,text:e[l].plan_name};t.push(n)}return t}function e(a){var e=JSON.parse(a),t=[];for(var l in e){var n={id:e[l].id,text:e[l].name};t.push(n)}return t}$("#plan").select2({placeholder:"~~ Select a plan ~~",allowClear:!0,data:a(plans)}),$("#activated").select2({placeholder:"~~ Select a status ~~",allowClear:!0}),$("#group_name").select2({placeholder:"~~ Select a group ~~",allowClear:!0,data:e(group_str)}),$("#user_banned").select2({placeholder:"~~ Select a status ~~",allowClear:!0}),$("#plan_status").select2({placeholder:"~~ Select a status ~~",allowClear:!0})})}();