<!DOCTYPE html>
<html lang="en">
<head>
        <meta charset="utf-8" />
        <title>Research Admission</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="Information & Guidance on the PhD Process, Connect with Supervisor and Many" />
        <meta name="keywords" content="" />

         <!-- facebook tags -->
         <meta property="og:url" content="http://www.facebook.com/researchadmission"/>
         <meta property="og:type" content="website"/>
         <meta property="og:title" content="Research Admission"/>
         <meta property="og:description" content="Information & Guidance on the PhD Process, Connect with Supervisor and Many"/>
          <!-- Linkedin tags -->
         <meta property="og:url" content="https://www.linkedin.com/company/researchadmission"/>
         <meta property="og:type" content="website"/>
         <meta property="og:title" content="Research Admission"/>
         <meta property="og:description" content="Information & Guidance on the PhD Process, Connect with Supervisor and Many"/>

        <!-- favicon -->
        <link rel="shortcut icon" href="{{asset('web/images/logo.png') }}">
        <!-- Bootstrap -->
        <link href="{{ asset('web/css/bootstrap.min.css') }}" rel="stylesheet" type="text/css" />
        <!-- tobii css -->
        <link href="{{asset('web/css/tobii.min.css')}}" rel="stylesheet" type="text/css" />
        <!-- Icons -->
        <link href="{{asset('web/css/materialdesignicons.min.css')}}" rel="stylesheet" type="text/css" />
        <link rel="stylesheet" type="text/css" href="{{ asset('web/stylesheets/font-awesome.min.css') }}" />
        <link rel="stylesheet" href="https://unicons.iconscout.com/release/v3.0.6/css/line.css">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css">

        <!-- Slider -->
        <link rel="stylesheet" href="{{asset('web/css/tiny-slider.css')}}"/>
        <!-- Main Css -->
        <link href="{{asset('web/css/style.css')}}" rel="stylesheet" type="text/css" id="theme-opt" />
        <link href="{{asset('web/css/colors/default.css')}}" rel="stylesheet" id="color-opt">

        <link rel="preconnect" href="https://fonts.googleapis.com">
        <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
        <link rel="stylesheet" href="{{asset('web/css/datepicker.min.css')}}">
        <link rel="preconnect" href="https://fonts.googleapis.com">
        <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
        <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@200;300&display=swap" rel="stylesheet">
        <link rel="preconnect" href="https://fonts.googleapis.com">
        <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
        <link href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@700&display=swap" rel="stylesheet">
        <link href="{{ asset('css/flatpickr/dist/flatpickr.min.css') }}" rel="stylesheet" type="text/css">
        <link rel="stylesheet" href="{{ asset('css/pnotify/pnotify.min.css') }}">
        <link href="{{ asset('css/noty/lib/noty.css') }}" rel="stylesheet" type="text/css">
        <link href="{{ asset('css/noty/lib/themes/sunset.css') }}" rel="stylesheet" type="text/css">
        <link href="{{ asset('css/wait-me/waitMe.min.css') }}" rel="stylesheet" type="text/css">
    </head>
    <style>
    body {
        font-family: 'Oswald', sans-serif;
        font-family: 'Quicksand', sans-serif;
    }
    h1, h2, h3, h4, h6 {
        font-family:Ubuntu !important;
    }
    h5{
        font-family: 'Montserrat Alternates', sans-serif !important;
    }
    .form-control:focus {
        box-shadow: 0 0 0 0.25rem #8492a61f !important;
        border-color: #8492a61f !important;
    }
    .btn1{
        background-color: #191e38 !important;
        color: #ffff !important;
        border-radius: 20px;
        box-shadow:none !important;
    }
    .btn1:hover{
        background: #ffff !important;
        color: #191e38 !important;
        border-radius: 20px;
        border: 1px solid #191e38 !important;
    }
    .bg-left{
        background-color: #191e38;
        border:none;
        padding:4.5rem;
    }
    .head-line{
        font-size: 39px !important;
        font-weight: bold;
        line-height: 1.2;
        color:#ffff;
    }
    .sub-line1{
        font-size: 18px !important;
        font-weight: 400;
        color:#ffff !important;
        font-family:Poppins !important;
    }
    .sub-line2{
        font-size: 17px !important;
        font-weight: bold;
        color:#ffff !important;
    }
    .bg-white{
        background-color: #72809f33 !important;
        height: 160px;
        border: 1px solid #ffff;
    }
    .box-head{
        font-size:15px !important;
        color:#ffff;
    }
    .box-sub{
        font-size:14px;
        color:#ffff;
    }
    .d-flex{
        display: grid !important;
    }
    </style>
    <body>

        <section class="cover-user">
            <div class="container-fluid px-0">
                <div class="row g-0 position-relative">
                    <div class="col-lg-8 padding-less bg-left">
                        <div>
                            <h2 class="ps-4 mt-5 pt-5 sub-line1" style="margin-bottom:0px !important;">Save Time and Stay Organized</h2>
                            <h3 class="ps-4 head-line">Discover the hassle-free solution to manage proposals from your doctoral applicants</h3>
                            <h2 class="ps-4 mt-5 pt-5 sub-line1" style="font-weight:bold !important;">Are you feeling overwhelmed by the abundance of proposals from doctoral applicants flooding your inbox? Say goodbye to the chaos and hello to a stress-free solution that saves you time and keeps you organized?</h2>
                            <p class="ps-4 mt-4" style="color:white; font-family: poppins !important;">Our free tool is here to help. With our effortless proposal management system, students can submit their proposals with ease, and you'll receive email notifications for each new submission. Say goodbye to the chaos and hello to a stress-free solution that saves you time and keeps you organized. </p>
                            <h2 class="ps-4 mt-4 sub-line1" style="font-weight:bold !important;">Try it today and see the difference it can make for you.</h2>
                        </div>
                    </div>
                    <div class="col-lg-4 cover-my-30 ">
                        <div class="cover-user-img d-flex align-items-center p-5">
                            <div class="row">
                                <div class="col-12 wait">
                                    <div class="card login-page border-0" style="z-index: 1">
                                        <div class="card border-0">
                                            <div class="card-body" style="padding: 0px;">
                                                <h1 class="mb-4 pb-1 mt-2" style="color: #141639c4; font-size:48px !important;">Register, To Start</h1>
                                                <input type="hidden" name="teacher_id" value="{{ $hash_ids[0] }}" id="teacher_id">
                                                <div class="row mb-4">
                                                    <div class="col-md-6">
                                                        <input type="text" class="form-control" name="first_name" value="{{ old('first_name') }}" id="first_name" required  autofocus placeholder="Given Name">
                                                    </div>
                                                    <div class="col-md-6">
                                                        <input type="text" class="form-control" name="last_name" value="{{ old('last_name') }}" id ="last_name" required  placeholder="Family Name">
                                                    </div>
                                                </div>

                                                <div class="row mb-4">
                                                    <div class="col-md-12">
                                                        <input type="email" class="form-control" name="email" value="{{ $user->email}}" id="email" required disabled placeholder="Email">

                                                    </div>
                                                </div>

                                                <div class="row mb-4">
                                                    <div class="col-md-12">
                                                        <input type="text" class="form-control" name="university" value="{{ old('university') }}" id ="university" required  placeholder="University">
                                                        {{-- <select class="form-control" name="university" id="university">
                                                            <option selected disabled>Select University</option>
                                                            @foreach($universities as $row)
                                                                <option value="{{$row->id}}">{{$row->name}}</option>
                                                            @endforeach
                                                        </select> --}}
                                                    </div>
                                                </div>

                                                <div class="row mb-3">
                                                    <div class="col-md-12">
                                                        <input type="text" class="form-control" name="others_department" value="{{ old('others_department') }}" id ="others_department" required  placeholder="Department">
                                                        {{-- <select class="form-control" name="department" id="department">
                                                            <option selected disabled>Select department</option>
                                                            @foreach($departments as $row)
                                                                <option value="{{$row->id}}">{{$row->name}}</option>
                                                            @endforeach
                                                            <option value="">Others</option>
                                                        </select> --}}
                                                    </div>
                                                </div>
                                                {{-- <div class="row mb-3">
                                                <div class="col-md-12 others_department" style="display:none;">
                                                        <div class="form-icon position-relative">
                                                            <input type="text" class="form-control" name="others_department" id="others_department" placeholder="Others department name">
                                                        </div>
                                                    </div>
                                                </div> --}}
                                                <div class="row mb-4">
                                                    <div class="col-md-12">
                                                        <input type="text" class="form-control" name="designation" id="designation" placeholder="Please enter your designation here" required="" autocomplete="off">
                                                    </div>
                                                </div>
                                                <div class="row mb-4">
                                                    <div class="col-md-12">
                                                        <input type="website" class="form-control" name="universitywebsite" placeholder="website" id="website" required="">
                                                    </div>
                                                </div>
                                                <div class="row mb-4">
                                                    <div class="col-md-12">
                                                        <input  type="password" class="form-control " name="password" id="password" required autocomplete="new-password" placeholder="Set a password">
                                                    </div>
                                                </div>

                                                <div class="row mb-4">
                                                    <div class="col-md-12">
                                                        <input  type="password" class="form-control" name="password_confirmation" id="password_confirmation" required autocomplete="new-password" placeholder="Confirm password">
                                                    </div>
                                                </div>

                                                <div class="row mb-0">
                                                    <div class="col-md-12">
                                                        <button class="btn btn1 pull-right" id="invited_registration">
                                                            {{ __('Submit') }}
                                                        </button>
                                                    </div>
                                                </div>
                                                <p class="text-center mt-2 pb-4"><span> Already registered ?</span><a href="{{ url('login-v2') }}" class="ps-2"><span>Login Here</span></a></p>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
      <script src="{{asset('web/js/bootstrap.bundle.min.js')}}"></script>
      <!-- tobii js -->
      <script src="{{asset('web/js/tobii.min.js')}}"></script>
      <!-- SLIDER -->
      <script src="{{asset('web/js/tiny-slider.js')}}"></script>
      <!-- Icons -->
      <script src="{{asset('web/js/feather.min.js')}}"></script>
      <!-- Main Js -->
      {{-- <script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.slim.min.js"></script> --}}
      {{-- <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.bundle.min.js"></script> --}}
      <script src="{{asset('web/js/plugins.init.js')}}"></script>
      <script src="{{asset('web/js/app.js')}}"></script>
      <script src="{{ asset('css/jquery.min.js') }}"></script>
      <script src="{{ asset('css/jquery-form/dist/jquery.form.min.js') }}"></script>
      <script src="{{ asset('css/pnotify/pnotify.js') }}"></script>
      <script src="{{ asset('css/noty/lib/noty.min.js') }}"></script>
      <script src="{{ asset('css/flatpickr/dist/flatpickr.min.js') }}"></script>
      <script src="{{ asset('css/wait-me/waitMe.min.js') }}"></script>
      <script>

          function pop_up_msg(msg='No message specified', type='success', callback=null){
              new Noty({
              theme:'sunset',
              text: msg,
              type: type,
              timeout:1500,
              callbacks:{
                  afterClose: callback
              }
              }).show();
          }

          function err_msg(err){

              var msg="Request failed to process, try again later.";

              if(err.responseJSON && err.responseJSON.msg){
              msg=err.responseJSON.msg;
              }

              return msg;

          }

        $(function(){

            $('#invited_registration').on('click', function(){

                $('.wait').waitMe({effect : 'facebook', text : 'Please wait...'});

                  var id =$('#teacher_id').val();
                  var first_name =$('#first_name').val();
                  var last_name =$('#last_name').val();
                  var email =$('#email').val();
                  var university =$('#university').val();
                  var department =$('#department').val();
                  var others_department =$('#others_department').val();
                  var designation =$('#designation').val();
                  var website =$('#website').val();
                  var password =$('#password').val();
                  var password_confirmation =$('#password_confirmation').val();


                  var form_data={
                      _token: "{{ csrf_token() }}",
                      id: id,
                      first_name: first_name,
                      last_name: last_name,
                      email: email,
                      university: university,
                      department: department,
                      others_department: others_department,
                      designation: designation,
                      website: website,
                      password: password,
                      password_confirmation: password_confirmation,
                  }

                  $.post("{{ route('ajax-post', ['name'=>'invitation_register_save']) }}", form_data, function(res){
                        $('.wait').waitMe("hide");
                        $('#first_name').val('');
                        $('#last_name').val('');
                        $('#university').val('');
                        $('#department').val('');
                        $('#others_department').val('');
                        $('#designation').val('');
                        $('#website').val('');
                        $('#password').val('');
                        $('#password_confirmation').val('');
                        
                      if(res.action=='redirect'){
                          window.location.href = "{{ url('/login-v2') }}";
                        }else{
                            window.location.href = "{{ url('/login-v2') }}";
                        }
                      pop_up_msg(res.msg);


                  }).fail(function(err){
                    $('.wait').waitMe("hide");
                    pop_up_msg(err_msg(err), 'error');

                  });
              });

              $('.wait-me').on('click', function(){
                    $('.wait').waitMe({effect : 'facebook', text : 'Please wait...'});
                });
        });
    </script>
</body>
</html>
