member-unlock.blade.php 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. @extends('views.layouts.master')
  2. <link rel="stylesheet" href="{{ csset('/themes/kbgolf/pro/resources/css/user-auth.css') }}">
  3. @section('content')
  4. <!--=====================================
  5. USER FORM PART START
  6. =======================================-->
  7. <section class="user-form-part">
  8. <div class="container">
  9. <form class="row justify-content-center form-prevent-multiple-submits" action="{{ route('member-unlock.store') }}" method="POST">
  10. @csrf
  11. <input type="hidden" id="email-txt" name="email" value="{{ $email }}">
  12. <div class="col-12 col-sm-10 col-md-12 col-lg-12 col-xl-6">
  13. <!--
  14. <div class="user-form-logo">
  15. <a href="index.html"><img src="images/logo.png" alt="logo"></a>
  16. </div>
  17. -->
  18. <div class="user-form-card agree_form">
  19. <div class="user-form-title">
  20. <h2>계정잠금 해제</h2>
  21. </div>
  22. <div class="form-check all_agree mb-4">
  23. <input class="form-check-input" type="checkbox" id="phone-identity-verifiy-ck">
  24. <label class="form-check-label" for="phone-identity-verifiy-ck">휴대폰 본인 확인</label>
  25. </div>
  26. <div class="form-group mb-2 d-flex">
  27. <button type="button" class="btn btn-danger border-danger text-white w-100" onclick="send_verify_code(this)">
  28. 등록된 번호로 인증번호 발송
  29. </button>
  30. </div>
  31. <div class="form-group mb-0 d-flex">
  32. <input type="text" class="form-control certi-txt rounded-right-0" name="cert_number" placeholder="인증번호" required>
  33. <span class="btn_wrap js_btn_wrapper mt-0">
  34. <button type="submit" class="btn bg-black border-black btn-block text-white certi-btn button-prevent-multiple-submits">
  35. <i class="spinner fa fa-spinner fa-spin"></i>
  36. 확인
  37. </button>
  38. </span>
  39. </div>
  40. <div class="form-group mt-2">
  41. <input type="checkbox" name="single_use" value="1" id="single-use-ck">
  42. <label class="form-check-label text-danger" for="single-use-ck">
  43. 1회 사용(사용후 반드시 로그아웃 필요)
  44. </label>
  45. </div>
  46. </div>
  47. </div>
  48. </form>
  49. </div>
  50. </section>
  51. <!--=====================================
  52. USER FORM PART END
  53. =======================================-->
  54. @endsection
  55. @push('js')
  56. <script>
  57. async function send_verify_code($this) {
  58. let all_check = true
  59. $('#required-div input').each(function () {
  60. if (! $(this).is(':checked')) {
  61. all_check = false
  62. }
  63. })
  64. if (all_check && $('#phone-identity-verifiy-ck').is(':checked')) {
  65. const response = await call_local_api('{{ route("member-unlock.send") }}', {email: $('#email-txt').val()})
  66. const data = response.data
  67. if (data['Success']) {
  68. $($this).prop('disabled', true)
  69. // iziToast.success({ title: 'Success', message: $('#action-completed').text() })
  70. } else {
  71. iziToast.error({ title: 'Error', message: data['Message'] })
  72. }
  73. return
  74. }
  75. iziToast.info({ title: 'Info', message: '이용약관에 동의하셔야 합니다' });
  76. }
  77. $('#all-ck').click(function(){
  78. const checked = $(this).is(':checked');
  79. if (checked) {
  80. $('#required-div input:checkbox').prop('checked', true);
  81. }
  82. });
  83. </script>
  84. @endpush