fork download
  1. @php
  2. $registerCaption = getContent('register.content',true);
  3. @endphp
  4. @extends($activeTemplate .'layouts.master')
  5. @section('content')
  6. @include($activeTemplate.'breadcrumb')
  7.  
  8. <!-- App Header -->
  9. <div class="appHeader no-border transparent position-absolute">
  10. <div class="left">
  11. <a href="#" class="headerButton goBack">
  12. <ion-icon name="chevron-back-outline"></ion-icon>
  13. </a>
  14. </div>
  15. <div class="pageTitle"></div>
  16. <div class="right">
  17. <a href="{{ route('user.login') }}" style="background-image: -webkit-linear-gradient(229.45deg,#ffeb3a,#4def8e); padding:6px 15px; font-size: 14px; border-radius: 10px; color: black; font-weight: 500;">
  18. Login
  19. </a>
  20. </div>
  21. </div>
  22. <!-- * App Header -->
  23.  
  24. <div id="appCapsule">
  25. <div class="section mt-2 text-center">
  26. <h1 style="color: white;">Register now</h1>
  27. <h4 style="color: white;">Create an account</h4>
  28. </div>
  29.  
  30. <section class="section mb-5 p-2 pt-120 pb-120">
  31. <div class="card">
  32. <div class="card-body">
  33. <div class="row justify-content-center">
  34. <div class="col">
  35. <div class="login-area">
  36. <form class="action-form mt-50 loginForm" action="{{ route('user.register') }}" method="post">
  37. @csrf
  38.  
  39. @if($reference)
  40. <div class="form-group basic">
  41. <label class="label">@lang('Referred By')</label>
  42. <input type="text" name="referBy" class="form-control" autocomplete="off" autofocus="off" value="{{ $reference }}" readonly>
  43. </div><!-- form-group end -->
  44. @endif
  45.  
  46. <!-- Username Field -->
  47. <div class="form-group basic">
  48. <label class="label">@lang('Username')</label>
  49. <input type="text" name="username" placeholder="@lang('Username')" class="form-control checkUser" value="{{ old('username') }}">
  50. <small class="text-danger usernameExist"></small>
  51. </div><!-- form-group end -->
  52.  
  53. <!-- Password Field -->
  54. <div class="form-group basic hover-input-popup">
  55. <label class="label">Password</label>
  56. <input type="password" name="password" placeholder="@lang('Password')" class="form-control">
  57. @if($general->secure_password)
  58. <div class="input-popup">
  59. <p class="error lower">@lang('1 small letter minimum')</p>
  60. <p class="error capital">@lang('1 capital letter minimum')</p>
  61. <p class="error number">@lang('1 number minimum')</p>
  62. <p class="error special">@lang('1 special character minimum')</p>
  63. <p class="error minimum">@lang('6 character password')</p>
  64. </div>
  65. @endif
  66. </div><!-- form-group end -->
  67.  
  68. <!-- Confirm Password Field -->
  69. <div class="form-group basic">
  70. <label class="label">@lang('Re-type Password')</label>
  71. <input type="password" name="password_confirmation" placeholder="@lang('Re-type Password')" class="form-control">
  72. </div><!-- form-group end -->
  73.  
  74. <div class="form-group d-flex justify-content-center">
  75. @php echo recaptcha() @endphp
  76. </div><!-- form-group end -->
  77.  
  78. @include('partials.custom-captcha')
  79.  
  80. @if($general->agree)
  81. <div class="form-group">
  82. @php
  83. $links = getContent('footer_link.element');
  84. @endphp
  85. <input type="checkbox" name="agree" required class="mr-2">
  86. @lang('I agree with ')@foreach($links as $link)
  87. <a href="{{ route('links',[$link->id,slug($link->data_values->title)]) }}"> {{ __($link->data_values->title) }} </a>
  88. @if(!$loop->last) , @endif @endforeach
  89. </div><!-- form-group end -->
  90. @endif
  91.  
  92. <div class="form-button-group text-center transparent">
  93. <button type="submit" class="cmn-btn btn btn-primary btn-block btn-lg">@lang('Register Now')</button>
  94. </div>
  95. </form>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. </section>
  102. </div>
  103.  
  104. <!-- Modal for Existing User -->
  105. <div class="modal fade" id="existModalCenter" tabindex="-1" role="dialog" aria-labelledby="existModalCenterTitle" aria-hidden="true">
  106. <div class="modal-dialog modal-dialog-centered" role="document">
  107. <div class="modal-content">
  108. <div class="modal-header">
  109. <h5 class="modal-title" id="existModalLongTitle">@lang('You are with us')</h5>
  110. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  111. <span aria-hidden="true">&times;</span>
  112. </button>
  113. </div>
  114. <div class="modal-body">
  115. <h6 class="text-center">@lang('You already have an account please Sign in ')</h6>
  116. </div>
  117. <div class="modal-footer">
  118. <button type="button" class="btn btn-secondary" data-dismiss="modal">@lang('Close')</button>
  119. <a href="{{ route('user.login') }}" class="btn btn-primary">@lang('Login')</a>
  120. </div>
  121. </div>
  122. </div>
  123. </div>
  124.  
  125. @endsection
  126.  
  127. @push('style')
  128. <style>
  129. body{
  130. background-color:#282828 !important;
  131. }
  132. .hover-input-popup {
  133. position: relative;
  134. }
  135. .hover-input-popup:hover .input-popup {
  136. opacity: 1;
  137. visibility: visible;
  138. }
  139. .input-popup {
  140. position: absolute;
  141. bottom: 130%;
  142. left: 50%;
  143. width: 280px;
  144. background-color: #1a1a1a;
  145. color: #fff;
  146. padding: 20px;
  147. border-radius: 5px;
  148. -webkit-border-radius: 5px;
  149. -moz-border-radius: 5px;
  150. -ms-border-radius: 5px;
  151. -o-border-radius: 5px;
  152. -webkit-transform: translateX(-50%);
  153. -ms-transform: translateX(-50%);
  154. transform: translateX(-50%);
  155. opacity: 0;
  156. visibility: hidden;
  157. -webkit-transition: all 0.3s;
  158. -o-transition: all 0.3s;
  159. transition: all 0.3s;
  160. }
  161. </style>
  162. @endpush
  163.  
  164. @push('script-lib')
  165. <script src="{{ asset('assets/global/js/secure_password.js') }}"></script>
  166. @endpush
  167.  
  168. @push('script')
  169. <script>
  170. (function ($, document) {
  171. "use strict";
  172.  
  173. $('.loginForm').on('submit', function () {
  174.  
  175. var response = grecaptcha.getResponse();
  176. if (response.length == 0) {
  177. document.getElementById('g-recaptcha-error').innerHTML = '<span style="color:red;">Captcha field is required.</span>';
  178. return false;
  179. }
  180. return true;
  181. });
  182.  
  183. function verifyCaptcha() {
  184. document.getElementById('g-recaptcha-error').innerHTML = '';
  185. }
  186.  
  187. @if($general->secure_password)
  188. $('input[name=password]').on('input', function () {
  189. secure_password($(this));
  190. });
  191. @endif
  192.  
  193. $('.checkUser').on('focusout', function (e) {
  194. var url = '{{ route('user.checkUser') }}';
  195. var value = $(this).val();
  196. var token = '{{ csrf_token() }}';
  197. if ($(this).attr('name') == 'username') {
  198. var data = { username: value, _token: token };
  199. }
  200. $.post(url, data, function (response) {
  201. if (response['data'] != null) {
  202. $(`.${response['type']}Exist`).text(`${response['type']} already exists`);
  203. } else {
  204. $(`.${response['type']}Exist`).text('');
  205. }
  206. });
  207. });
  208. })(jQuery, document);
  209. </script>
  210. @endpush
  211.  
Success #stdin #stdout 0.03s 25876KB
stdin
H
stdout
@php
    $registerCaption = getContent('register.content',true);
@endphp
@extends($activeTemplate .'layouts.master')
@section('content')
@include($activeTemplate.'breadcrumb')

<!-- App Header -->
<div class="appHeader no-border transparent position-absolute">
    <div class="left">
        <a href="#" class="headerButton goBack">
            <ion-icon name="chevron-back-outline"></ion-icon>
        </a>
    </div>
    <div class="pageTitle"></div>
    <div class="right">
        <a href="{{ route('user.login') }}" style="background-image: -webkit-linear-gradient(229.45deg,#ffeb3a,#4def8e); padding:6px 15px; font-size: 14px; border-radius: 10px; color: black; font-weight: 500;">
            Login
        </a>
    </div>
</div>
<!-- * App Header -->

<div id="appCapsule">
    <div class="section mt-2 text-center">
        <h1 style="color: white;">Register now</h1>
        <h4 style="color: white;">Create an account</h4>
    </div>

    <section class="section mb-5 p-2 pt-120 pb-120">
        <div class="card">
            <div class="card-body">
                <div class="row justify-content-center">
                    <div class="col">
                        <div class="login-area">
                            <form class="action-form mt-50 loginForm" action="{{ route('user.register') }}" method="post">
                                @csrf
                                
                                @if($reference)
                                <div class="form-group basic">
                                    <label class="label">@lang('Referred By')</label>
                                    <input type="text" name="referBy" class="form-control" autocomplete="off" autofocus="off" value="{{ $reference }}" readonly>
                                </div><!-- form-group end -->
                                @endif

                                <!-- Username Field -->
                                <div class="form-group basic">
                                    <label class="label">@lang('Username')</label>
                                    <input type="text" name="username" placeholder="@lang('Username')" class="form-control checkUser" value="{{ old('username') }}">
                                    <small class="text-danger usernameExist"></small>
                                </div><!-- form-group end -->
                                
                                <!-- Password Field -->
                                <div class="form-group basic hover-input-popup">
                                    <label class="label">Password</label>
                                    <input type="password" name="password" placeholder="@lang('Password')" class="form-control">
                                    @if($general->secure_password)
                                    <div class="input-popup">
                                        <p class="error lower">@lang('1 small letter minimum')</p>
                                        <p class="error capital">@lang('1 capital letter minimum')</p>
                                        <p class="error number">@lang('1 number minimum')</p>
                                        <p class="error special">@lang('1 special character minimum')</p>
                                        <p class="error minimum">@lang('6 character password')</p>
                                    </div>
                                    @endif
                                </div><!-- form-group end -->

                                <!-- Confirm Password Field -->
                                <div class="form-group basic">
                                    <label class="label">@lang('Re-type Password')</label>
                                    <input type="password" name="password_confirmation" placeholder="@lang('Re-type Password')" class="form-control">
                                </div><!-- form-group end -->
                                
                                <div class="form-group d-flex justify-content-center">
                                    @php echo recaptcha() @endphp
                                </div><!-- form-group end -->

                                @include('partials.custom-captcha')

                                @if($general->agree)
                                <div class="form-group">
                                    @php
                                    $links = getContent('footer_link.element');
                                    @endphp
                                    <input type="checkbox" name="agree" required class="mr-2">
                                    @lang('I agree with ')@foreach($links as $link) 
                                    <a href="{{ route('links',[$link->id,slug($link->data_values->title)]) }}"> {{ __($link->data_values->title) }} </a>
                                    @if(!$loop->last) , @endif @endforeach
                                </div><!-- form-group end -->
                                @endif

                                <div class="form-button-group text-center transparent">
                                    <button type="submit" class="cmn-btn btn btn-primary btn-block btn-lg">@lang('Register Now')</button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
</div>

<!-- Modal for Existing User -->
<div class="modal fade" id="existModalCenter" tabindex="-1" role="dialog" aria-labelledby="existModalCenterTitle" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="existModalLongTitle">@lang('You are with us')</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <h6 class="text-center">@lang('You already have an account please Sign in ')</h6>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">@lang('Close')</button>
                <a href="{{ route('user.login') }}" class="btn btn-primary">@lang('Login')</a>
            </div>
        </div>
    </div>
</div>

@endsection

@push('style')
<style>
    body{
        background-color:#282828 !important;
    }
    .hover-input-popup {
        position: relative;
    }
    .hover-input-popup:hover .input-popup {
        opacity: 1;
        visibility: visible;
    }
    .input-popup {
        position: absolute;
        bottom: 130%;
        left: 50%;
        width: 280px;
        background-color: #1a1a1a;
        color: #fff;
        padding: 20px;
        border-radius: 5px;
        -webkit-border-radius: 5px;
        -moz-border-radius: 5px;
        -ms-border-radius: 5px;
        -o-border-radius: 5px;
        -webkit-transform: translateX(-50%);
        -ms-transform: translateX(-50%);
        transform: translateX(-50%);
        opacity: 0;
        visibility: hidden;
        -webkit-transition: all 0.3s;
        -o-transition: all 0.3s;
        transition: all 0.3s;
    }
</style>
@endpush

@push('script-lib')
<script src="{{ asset('assets/global/js/secure_password.js') }}"></script>
@endpush

@push('script')
<script>
  (function ($, document) {
        "use strict";

        $('.loginForm').on('submit', function () {

            var response = grecaptcha.getResponse();
            if (response.length == 0) {
                document.getElementById('g-recaptcha-error').innerHTML = '<span style="color:red;">Captcha field is required.</span>';
                return false;
            }
            return true;
        });

        function verifyCaptcha() {
            document.getElementById('g-recaptcha-error').innerHTML = '';
        }

        @if($general->secure_password)
            $('input[name=password]').on('input', function () {
                secure_password($(this));
            });
        @endif

        $('.checkUser').on('focusout', function (e) {
            var url = '{{ route('user.checkUser') }}';
            var value = $(this).val();
            var token = '{{ csrf_token() }}';
            if ($(this).attr('name') == 'username') {
                var data = { username: value, _token: token };
            }
            $.post(url, data, function (response) {
                if (response['data'] != null) {
                    $(`.${response['type']}Exist`).text(`${response['type']} already exists`);
                } else {
                    $(`.${response['type']}Exist`).text('');
                }
            });
        });
    })(jQuery, document);
</script>
@endpush