fork(1) 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.  
  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.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36. <div id="appCapsule">
  37.  
  38.  
  39. <div class="section mt-2 text-center">
  40. <h1 style="color: white;">Register now</h1>
  41. <h4 style="color: white;">Create an account</h4>
  42. </div>
  43.  
  44.  
  45.  
  46. <section class="section mb-5 p-2 pt-120 pb-120">
  47.  
  48. <div class="card">
  49. <div class="card-body">
  50.  
  51. <div class="row justify-content-center">
  52. <div class="col">
  53. <div class="login-area">
  54.  
  55. <form class="action-form mt-50 loginForm" action="{{ route('user.register') }}" method="post">
  56. @csrf
  57. @if($reference)
  58.  
  59.  
  60. <div class="form-group basic">
  61. <label class="label">@lang('Referred By')</label>
  62. <input type="text" name="referBy" class="form-control" autocomplete="off" autofocus="off" value="{{ $reference }}" readonly>
  63. </div><!-- form-group end -->
  64. @endif
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73. <div class="form-group basic">
  74. <label class="label">E-mail</label>
  75. <input type="email" name="email" placeholder="@lang('Your e-mail')" class="form-control checkUser" value="{{ old('email') }}">
  76. </div><!-- form-group end -->
  77.  
  78.  
  79. <div class="form-group basic">
  80. <label class="label" for="country">{{ __('Country') }}</label>
  81. <select name="country" id="country" class="form-control">
  82. @foreach($countries as $key => $country)
  83. <option data-mobile_code="{{ $country->dial_code }}" value="{{ $country->country }}" data-code="{{ $key }}">{{ __($country->country) }}</option>
  84. @endforeach
  85. </select>
  86. </div>
  87.  
  88.  
  89.  
  90. <div class="form-group basic">
  91. <label class="label">@lang('Username')</label>
  92. <input type="text" name="username" placeholder="@lang('Username')" class="form-control checkUser" value="{{ old('username') }}">
  93. <small class="text-danger usernameExist"></small>
  94. </div><!-- form-group end -->
  95.  
  96. <div class="form-group basic hover-input-popup">
  97. <label class="label">Password</label>
  98. <input type="password" name="password" placeholder="@lang('Password')" class="form-control">
  99. @if($general->secure_password)
  100. <div class="input-popup">
  101. <p class="error lower">@lang('1 small letter minimum')</p>
  102. <p class="error capital">@lang('1 capital letter minimum')</p>
  103. <p class="error number">@lang('1 number minimum')</p>
  104. <p class="error special">@lang('1 special character minimum')</p>
  105. <p class="error minimum">@lang('6 character password')</p>
  106. </div>
  107. @endif
  108. </div><!-- form-group end -->
  109.  
  110. <div class="form-group basic">
  111. <label class="label">@lang('Re-type Password')</label>
  112. <input type="password" name="password_confirmation" placeholder="@lang('Re-type Password')" class="form-control">
  113. </div><!-- form-group end -->
  114. <div class="form-group d-flex justify-content-center">
  115. @php echo recaptcha() @endphp
  116. </div><!-- form-group end -->
  117. @include('partials.custom-captcha')
  118. @if($general->agree)
  119. <div class="form-group">
  120. @php
  121. $links = getContent('footer_link.element');
  122. @endphp
  123. <input type="checkbox" name="agree" required class="mr-2">
  124. @lang('I agree with ')@foreach($links as $link)
  125. <a href="{{ route('links',[$link->id,slug($link->data_values->title)]) }}"> {{ __($link->data_values->title) }} </a>
  126. @if(!$loop->last) , @endif @endforeach
  127. </div><!-- form-group end -->
  128. @endif
  129. <div class="form-button-group text-center transparent">
  130. <button type="submit" class="cmn-btn btn btn-primary btn-block btn-lg">@lang('Register Now')</button>
  131.  
  132.  
  133. </div>
  134. </form>
  135. </div>
  136. </div>
  137. </div>
  138. </div>
  139. </div>
  140.  
  141. </section>
  142.  
  143. </div>
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150. <div class="modal fade" id="existModalCenter" tabindex="-1" role="dialog" aria-labelledby="existModalCenterTitle" aria-hidden="true">
  151. <div class="modal-dialog modal-dialog-centered" role="document">
  152. <div class="modal-content">
  153. <div class="modal-header">
  154. <h5 class="modal-title" id="existModalLongTitle">@lang('You are with us')</h5>
  155. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  156. <span aria-hidden="true">&times;</span>
  157. </button>
  158. </div>
  159. <div class="modal-body">
  160. <h6 class="text-center">@lang('You already have an account please Sign in ')</h6>
  161. </div>
  162. <div class="modal-footer">
  163. <button type="button" class="btn btn-secondary" data-dismiss="modal">@lang('Close')</button>
  164. <a href="{{ route('user.login') }}" class="btn btn-primary">@lang('Login')</a>
  165. </div>
  166. </div>
  167. </div>
  168. </div>
  169. @endsection
  170.  
  171.  
  172. @push('style')
  173. <style>
  174. body{
  175. background-color:#282828 !important;
  176. }
  177. .country-code .input-group-prepend .input-group-text{
  178. background: #fff !important;
  179. }
  180. .country-code select{
  181. border: none;
  182. }
  183. .country-code select:focus{
  184. border: none;
  185. outline: none;
  186. }
  187. .hover-input-popup {
  188. position: relative;
  189. }
  190. .hover-input-popup:hover .input-popup {
  191. opacity: 1;
  192. visibility: visible;
  193. }
  194. .input-popup {
  195. position: absolute;
  196. bottom: 130%;
  197. left: 50%;
  198. width: 280px;
  199. background-color: #1a1a1a;
  200. color: #fff;
  201. padding: 20px;
  202. border-radius: 5px;
  203. -webkit-border-radius: 5px;
  204. -moz-border-radius: 5px;
  205. -ms-border-radius: 5px;
  206. -o-border-radius: 5px;
  207. -webkit-transform: translateX(-50%);
  208. -ms-transform: translateX(-50%);
  209. transform: translateX(-50%);
  210. opacity: 0;
  211. visibility: hidden;
  212. -webkit-transition: all 0.3s;
  213. -o-transition: all 0.3s;
  214. transition: all 0.3s;
  215. }
  216. .input-popup::after {
  217. position: absolute;
  218. content: '';
  219. bottom: -19px;
  220. left: 50%;
  221. margin-left: -5px;
  222. border-width: 10px 10px 10px 10px;
  223. border-style: solid;
  224. border-color: transparent transparent #1a1a1a transparent;
  225. -webkit-transform: rotate(180deg);
  226. -ms-transform: rotate(180deg);
  227. transform: rotate(180deg);
  228. }
  229. .input-popup p {
  230. padding-left: 20px;
  231. position: relative;
  232. }
  233. .input-popup p::before {
  234. position: absolute;
  235. content: '';
  236. font-family: 'Line Awesome Free';
  237. font-weight: 900;
  238. left: 0;
  239. top: 4px;
  240. line-height: 1;
  241. font-size: 18px;
  242. }
  243. .input-popup p.error {
  244. text-decoration: line-through;
  245. }
  246. .input-popup p.error::before {
  247. content: "\f057";
  248. color: #ea5455;
  249. }
  250. .input-popup p.success::before {
  251. content: "\f058";
  252. color: #28c76f;
  253. }
  254. </style>
  255. @endpush
  256.  
  257. @push('script-lib')
  258. <script src="{{ asset('assets/global/js/secure_password.js') }}"></script>
  259. @endpush
  260.  
  261. @push('script')
  262. <script>
  263. (function ($,document) {
  264. "use strict";
  265.  
  266. $('.loginForm').on('submit',function(){
  267.  
  268. var response = grecaptcha.getResponse();
  269. if(response.length == 0) {
  270. document.getElementById('g-recaptcha-error').innerHTML = '<span style="color:red;">Captcha field is required.</span>';
  271. return false;
  272. }
  273. return true;
  274. });
  275.  
  276. function verifyCaptcha() {
  277. document.getElementById('g-recaptcha-error').innerHTML = '';
  278. }
  279.  
  280.  
  281. @if($mobile_code)
  282. $(`option[data-code={{ $mobile_code }}]`).attr('selected','');
  283. @endif
  284. $('select[name=country]').change(function(){
  285. $('input[name=mobile_code]').val($('select[name=country] //:selected').data('mobile_code'));
  286. $('input[name=country_code]').val($('select[name=country] :selected').data('code'));
  287. $('.mobile-code').text('+'+$('select[name=country] :selected').data('mobile_code'));
  288. });
  289. $('input[name=mobile_code]').val($('select[name=country] :selected').data('mobile_code'));
  290. $('input[name=country_code]').val($('select[name=country] :selected').data('code'));
  291. $('.mobile-code').text('+'+$('select[name=country] :selected').data('mobile_code'));
  292. @if($general->secure_password)
  293. $('input[name=password]').on('input',function(){
  294. secure_password($(this));
  295. });
  296. @endif
  297. $('.checkUser').on('focusout',function(e){
  298. var url = '{{ route('user.checkUser') }}';
  299. var value = $(this).val();
  300. var token = '{{ csrf_token() }}';
  301. if ($(this).attr('name') == 'mobile') {
  302. var mobile = `${$('.mobile-code').text().substr(1)}${value}`;
  303. var data = {mobile:mobile,_token:token}
  304. }
  305. if ($(this).attr('name') == 'email') {
  306. var data = {email:value,_token:token}
  307. }
  308. if ($(this).attr('name') == 'username') {
  309. var data = {username:value,_token:token}
  310. }
  311. $.post(url,data,function(response) {
  312. if (response['data'] && response['type'] == 'email') {
  313. $('#existModalCenter').modal('show');
  314. }else if(response['data'] != null){
  315. $(`.${response['type']}Exist`).text(`${response['type']} already exist`);
  316. }else{
  317. $(`.${response['type']}Exist`).text('');
  318. }
  319. });
  320. });
  321. })(jQuery,document);
  322. </script>
  323. @endpush
  324.  
Success #stdin #stdout 0.03s 25452KB
stdin
Standard input is empty
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
                
                
                
                
                
     
                
                
                <div class="form-group basic">
                  <label class="label">E-mail</label>
                  <input type="email" name="email" placeholder="@lang('Your e-mail')" class="form-control checkUser" value="{{ old('email') }}">
                </div><!-- form-group end -->
                

                <div class="form-group basic">
                    <label class="label" for="country">{{ __('Country') }}</label>
                    <select name="country" id="country" class="form-control">
                        @foreach($countries as $key => $country)
                            <option data-mobile_code="{{ $country->dial_code }}" value="{{ $country->country }}" data-code="{{ $key }}">{{ __($country->country) }}</option>
                        @endforeach
                    </select>
                </div>

               

                <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 -->
                
                <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 -->
                
                <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>






<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;
    }
    .country-code .input-group-prepend .input-group-text{
        background: #fff !important;
    }
    .country-code select{
        border: none;
    }
    .country-code select:focus{
        border: none;
        outline: none;
    }
    .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;
    }
    .input-popup::after {
        position: absolute;
        content: '';
        bottom: -19px;
        left: 50%;
        margin-left: -5px;
        border-width: 10px 10px 10px 10px;
        border-style: solid;
        border-color: transparent transparent #1a1a1a transparent;
        -webkit-transform: rotate(180deg);
        -ms-transform: rotate(180deg);
        transform: rotate(180deg);
    }
    .input-popup p {
        padding-left: 20px;
        position: relative;
    }
    .input-popup p::before {
        position: absolute;
        content: '';
        font-family: 'Line Awesome Free';
        font-weight: 900;
        left: 0;
        top: 4px;
        line-height: 1;
        font-size: 18px;
    }
    .input-popup p.error {
        text-decoration: line-through;
    }
    .input-popup p.error::before {
        content: "\f057";
        color: #ea5455;
    }
    .input-popup p.success::before {
        content: "\f058";
        color: #28c76f;
    }
</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($mobile_code)
              $(`option[data-code={{ $mobile_code }}]`).attr('selected','');
              @endif
              $('select[name=country]').change(function(){
                  $('input[name=mobile_code]').val($('select[name=country] //:selected').data('mobile_code'));
                  $('input[name=country_code]').val($('select[name=country] :selected').data('code'));
                  $('.mobile-code').text('+'+$('select[name=country] :selected').data('mobile_code'));
              });
              $('input[name=mobile_code]').val($('select[name=country] :selected').data('mobile_code'));
              $('input[name=country_code]').val($('select[name=country] :selected').data('code'));
              $('.mobile-code').text('+'+$('select[name=country] :selected').data('mobile_code'));
              @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') == 'mobile') {
                      var mobile = `${$('.mobile-code').text().substr(1)}${value}`;
                      var data = {mobile:mobile,_token:token}
                  }
                  if ($(this).attr('name') == 'email') {
                      var data = {email:value,_token:token}
                  }
                  if ($(this).attr('name') == 'username') {
                      var data = {username:value,_token:token}
                  }
                  $.post(url,data,function(response) {
                    if (response['data'] && response['type'] == 'email') {
                      $('#existModalCenter').modal('show');
                    }else if(response['data'] != null){
                      $(`.${response['type']}Exist`).text(`${response['type']} already exist`);
                    }else{
                      $(`.${response['type']}Exist`).text('');
                    }
                  });
              });
        })(jQuery,document);
    </script>
@endpush