globalThis.Smsapi = { content: `

Api menggunakan Twillio

untuk mendaftar Twillio silahakan klik link berikut Twillio

Setting

`, action: function(){ setTimeout(function(){ function __id(a){ return document.getElementById(a); } $.ajax({ url: '/json-setting-get', success: function(response){ response = JSON.parse(response); Object.keys(response).forEach(function(elm){ __id(elm).value = response[elm]; }) } }) document.getElementById('simpan-setting').addEventListener('click', function(){ var data = { number: __id('number').value, sid: __id('sid').value, token: __id('token').value } $.ajax({ url: '/json-setting', method: "post", dataType: "text", data: { _token: $('meta[name=csrf-token]').attr('content'), data: JSON.stringify(data) }, success: function(response){ alert('api token disimpan') } }) }, false) }) } }