Nav apraksta
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. $(document).ready(function () {
  2. $.ajaxSetup({
  3. headers: {
  4. 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  5. }
  6. });
  7. $('.form-global-handle').submit(function (event) {
  8. event.preventDefault();
  9. // var title = global_locale == 'en' ? 'Are you sure?' : 'Apakah anda yakin?';
  10. // var mes = global_locale == 'en' ? 'Are you sure untuk melanjutkannya?' : 'Apakah anda yakin untuk melanjutkan?';
  11. var title = 'Apakah anda yakin ?'
  12. var mes = 'Apakah anda yakin untuk melanjutkannya ?'
  13. Swal.fire({
  14. title: title,
  15. text: mes,
  16. icon: "warning",
  17. showCancelButton: true,
  18. confirmButtonColor: '#DD6B55',
  19. confirmButtonText: 'Yes',
  20. }).then((result) => {
  21. $('body').css('padding', '0');
  22. if (result.value) {
  23. $.blockUI();
  24. $(this).off('submit').submit();
  25. }
  26. });
  27. });
  28. $('.cek_email').change(function (e) {
  29. var email = $(this).val();
  30. var route = $(this).data('route');
  31. var id = $(this).data('id') == 'undefined' ? '' : $(this).data('id');
  32. console.log(id);
  33. e.preventDefault();
  34. $.ajax({
  35. type: "POST",
  36. url: route,
  37. data: {
  38. 'email': email,
  39. 'id': id,
  40. },
  41. dataType: "json",
  42. success: function (response) {
  43. if (response.status == true) {
  44. $('.cek_email').addClass('border-danger');
  45. var html = '<small class="text-danger">' + response.message + '</small>';
  46. $('.email-notification').html(html);
  47. } else {
  48. $('.cek_email').removeClass('border-danger');
  49. $('.email-notification').html('');
  50. }
  51. }
  52. });
  53. });
  54. });