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

                                <!-- Email Field -->
                                <div class="form-group basic">
                                    <label class="label">@lang('Email')</label>
                                    <input type="email" name="email" placeholder="@lang('Your Email')" class="form-control" value="{{ old('email') }}" required>
                                </div><!-- form-group end -->

                                <!-- 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') }}" required>
                                    <small class="text-danger usernameExist"></small>
                                </div><!-- form-group end -->

                                <!-- Password Field -->
                                <div class="form-group basic hover-input-popup">
                                    <label class="label">@lang('Password')</label>
                                    <input type="password" name="password" placeholder="@lang('Password')" class="form-control" required>
                                    @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 -->

                                <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