@extends('layouts.app')

@section('title')

Register

@parent

@stop

<script src='https://www.recaptcha.net/recaptcha/api.js'></script>

<link href="{{ asset('assets/vendors/select2/css/select2.min.css') }}" type="text/css" rel="stylesheet">

<link href="{{ asset('assets/vendors/select2/css/select2-bootstrap.css') }}" rel="stylesheet">

@section('content')

<div class="container">

    <div class="row justify-content-center">

        <div class="col-md-8 py-4">

            <div class="card">

                <div class="card-header h4 text-center bg-primary-light text-white">{{ __('Register') }}</div>



                <div class="card-body">

                    <p>

                        Thank you for your interest in registering yourself with Bentham Science. Registration is necessary to purchase any pay per view article from Bentham Science. Filling in this form does not commit you making a purchase. Information you provide will not be passed on to any third party. Fields marked with an asterisk * are compulsory. When finished, click continue to proceed with registration. Full volume access is also available for corporate and academic institutions. Please click here for corporate or academic purchase of entire volume of the Journal(s) or eBook(s).

                    </p>

                    <form method="POST" action="{{ route('register') }}" aria-label="{{ __('Register') }}">

                        @csrf



                        <div class="form-row">

                          <div class="form-group col-md-6">

                            <label for="name" class="col-form-label text-md-right">{{ __('User Name') }}</label>



                            

                                <input id="name" type="text" class="form-control{{ $errors->has('name') ? ' is-invalid' : '' }}" name="name" value="{{ old('name') }}" required autofocus>



                                @if ($errors->has('name'))

                                    <span class="invalid-feedback" role="alert">

                                        <strong>{{ $errors->first('name') }}</strong>

                                    </span>

                                @endif

                            </div>

						

                         <div class="form-group col-md-6">

                            <label for="display_name" class="col-form-label text-md-right">{{ __('Display Name') }}</label>

						

                            

                                <input id="display_name" type="text" class="form-control{{ $errors->has('display_name') ? ' is-invalid' : '' }}" name="display_name" value="{{ old('display_name') }}" required autofocus>



                                @if ($errors->has('display_name'))

                                    <span class="invalid-feedback" role="alert">

                                        <strong>{{ $errors->first('display_name') }}</strong>

                                    </span>

                                @endif

                            </div>

                         

                        </div>



                        <div class="form-row">

                          <div class="form-group col-md-6">

                            <label for="email" class="col-form-label text-md-right">{{ __('E-Mail Address') }}</label>



                            

                                <input id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" name="email" value="{{ old('email') }}" required>



                                @if ($errors->has('email'))

                                    <span class="invalid-feedback" role="alert">

                                        <strong>{{ $errors->first('email') }}</strong>

                                    </span>

                                @endif

                            </div>

					

							 

							<div class="form-group col-md-6">

								<label for="user_type" class="col-form-label text-md-right">{{ __('Register As') }}</label>

								

									<select name="user_type" onchange="javascript: testUtype();return false;" class="form-select form-control" id="user_type">

										<option title="New User" value="user">New User</option>

										<option title="New Organization" value="Org">New Organization</option>

									</select>

								</div>

							

                        </div>

                        

						

                        <div class="form-row mb-0">

                        <div class="col-md-6 mb-3" id="org-name-wrapper" style="display: none;">

                            <label for="org_name" class="col-form-label text-md-right">{{ __('Organization Name') }}</label>



                            

                                <input id="org_name" type="text" class="form-control{{ $errors->has('org_name') ? ' is-invalid' : '' }}" name="org_name" value="{{ old('org_name') }}" autofocus>



                                @if ($errors->has('org_name'))

                                    <span class="invalid-feedback" role="alert">

                                        <strong>{{ $errors->first('org_name') }}</strong>

                                    </span>

                                @endif

                            </div>

                        

                        <div class="col-md-6 mb-3" id="contact-no-wrapper" style="display: none;">

                            <label for="contact_no" class="col-form-label text-md-right">{{ __('Organization Contact Number') }}</label>



                            

                                <input id="contact_no" type="text" class="form-control{{ $errors->has('org_name') ? ' is-invalid' : '' }}" name="contact_no" value="{{ old('contact_no') }}" autofocus>



                                @if ($errors->has('contact_no'))

                                    <span class="invalid-feedback" role="alert">

                                        <strong>{{ $errors->first('contact_no') }}</strong>

                                    </span>

                                @endif

                            </div>

                        </div>

                        <div class="form-row">

                            <div class="form-group col-md-6">

                            <label for="password" class="col-form-label text-md-right">{{ __('Password') }}</label>



                            

                                <input id="password" type="password" class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" name="password" required>



                                @if ($errors->has('password'))

                                    <span class="invalid-feedback" role="alert">

                                        <strong>{{ $errors->first('password') }}</strong>

                                    </span>

                                @endif

                            </div>

                        <div class="form-group col-md-6">

                            <label for="password-confirm" class="col-form-label text-md-right">{{ __('Confirm Password') }}</label>



                          

                                <input id="password-confirm" type="password" class="form-control" name="password_confirmation" required>

                            </div>

                        </div>



                        <div class="form-row">                            

                            <div class="form-group col-md-6">

                            <label for="password-confirm" class=" col-form-label text-md-right">{{ __('Country') }}</label>



                               <?php $country=isset($input['country'])? $input['country']:'';?>

							   

								{!! Form::select('country', getCountrires(), $country,['class' => 'form-control select2', 'id' => 'countries']) !!}

                            </div>

                        </div>

                        <hr>



                        <div class="form-row mt-2">

                            <div class="col-md-8 offset-md-3">      



                                <div for="terms-conditions" class="text-md-left custom-control custom-checkbox ">                          

                                      <input type="checkbox" class="custom-control-input" name="ebook_reviewer_flag" id="ebook_reviewer_flag" value="1">

                                

                                      <label class="custom-control-label" for="ebook_reviewer_flag">

                                        <span class="ml-4 text-left d-block">

                                     {{ __("I would like to register as a book reviewer.") }}</span></label>

                                        

                                </div>

                            </div>

                        </div>



                        <div class="form-row mt-2">

                            <div class="col-md-8 offset-md-3">

                                        <a class="btn btn-info ml-md-5 font-weight-bold btn-sm font-12 my-2" href="javascript:void(0);"  data-toggle="modal" data-target="#TermCondition">View Terms & Conditons</a>

                                <div for="terms-conditions" class="text-md-left custom-control custom-checkbox">                          

                                      <input type="checkbox" class="custom-control-input" name="tc" id="tc" required="required">

                                

                                      <label class="custom-control-label" for="tc">

                                        <span class="ml-4 text-left d-block">

                                     {{ __("I agree to Bentham Science's Terms & Conditions *") }}</span></label>

                                        

                                </div>

                            </div>



                        </div>

              <div class="form-group row mt-3 w-100"> 

                      <div class="col-auto mx-auto w-100 d-flex ">
                          <div class="col-md-6 text-right">
                                        <div class="captcha">                                       
                                            <span>{!! captcha_img() !!}</span>             
                                        </div>
                                    </div>
                          <div class="col-md-6">                                        
                                        <button type="button" class="btn btn-danger" class="refresh-captcha" id="refresh-captcha">
                                            &#x21bb;
                                        </button> 
                                    </div>
                                </div>
                      <div class="form-group my-2 mx-auto">
                                    <input id="captcha" type="text" class="form-control" placeholder="Enter Captcha" name="captcha">
                                  @if ($errors->has('captcha'))

                                      <span class="invalid-feedback" style="display: block;">

                                          <strong>{{ $errors->first('captcha') }}</strong>

                                      </span>

                                  @endif

                              </div>

                        </div>

<hr>

                        <div class="form-group row mb-0">

                            <div class="text-center m-auto col-md-6 offset-md-4">

                                <button type="submit" class="btn bg-primary-light btn-block text-white">

                                    {{ __('Register') }}

                                </button>

                            </div>

                        </div>

                    </form>

                </div>

            </div>

        </div>

    </div>

</div>



<!-- Terms & Conditions Window Start-->

<div class="modal fade" id="TermCondition" role="dialog">

<div class="modal-dialog modal-lg">

    <div class="modal-content ">

        <div class="modal-header bg-siteblue text-white">

            <h4 class="modal-title">Website Terms and Conditions</h4>

            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true" class="text-white">&times;</span></button>

        </div>

        <div class="modal-body text-justify ">    

            <div class="row"> 

                <div class="col-md-3">

                    <img class="img-fluid" src="/images/handshake.png" alt="">

                </div>

                <div class="col-md-9">

                    <p> These Terms and Conditions apply to the users of Bentham Science Publishers website.</p>



                    <p>By using this website, you agree to be bound by these terms and conditions. If you do not agree to these terms and conditions, then please do not use this website.</p>

            <p>All contents on our website including but not limited to text, graphics, user interfaces, photographs, trademarks, logos, videos, images, applications, design and layout, are owned by Bentham Science Publishers and are protected by copyright, trademark and other intellectual property laws.</p>



            <p><strong>Change</strong></p>



            <p>Contents of the website and terms and conditions may be altered by Bentham Science Publishers at any time and without notice. Your continued use of our website following any such change means that you agree to abide by the terms and conditions as amended.</p>



            <p><strong>Restrictions on use</strong></p>



            <p>You may view, download, save and print single copy of any material accessed through this website for your own personal, non-commercial, informational, educational or scholarly use or scientific research or study, provided that you keep intact all copyright and other proprietary notices.</p>



            <p>However, you may not copy, display, distribute, disseminate, modify, publish, reproduce, store, transmit, post, share, upload, sell, rent, loan, license, translate or create other derivative works from whole or any part of the content obtained from our website, in any medium to anyone, except as otherwise expressly permitted under these terms and conditions, relevant license or subscription agreement or authorization by us.</p>



            <p>Systematic retrieval of contents from our website to create or compile, directly or indirectly, a collection, compilation, database or directory without our prior written permission is strictly prohibited. Take printouts of multiple copies of any content from our website for commercial, non-profit, free or any other use will also be considered as an illegal act.</p>



            <p><strong>Warranty disclaimer</strong></p>



            <p>Bentham Science Publishers aims to keep the website available for 24 hours a day. However, we do not guarantee that the website will be uninterrupted, error free or virus free. We shall not be liable for lost, altered, or corrupted information or non-availability of the website. Under no circumstances shall Bentham Science Publishers, its staff, editors and authors, be liable for any special or consequential damages that result from the use of, or the inability to use the materials on this site. No responsibility is assumed by Bentham Science Publishers, for any injury and/or damage to persons or property as a matter of products liability, negligence or otherwise, or from any use or operation of any methods, products instruction, advertisements or ideas contained in this website.</p>

                </div>

            </div>          

            





            

        </div>

    </div>

</div>

</div>

<!-- Terms & Conditions Window End-->



@endsection

<script src="/js/jquery.min.js" type="text/javascript"></script>

<script type="text/javascript">

    function testUtype()

    {   

        var test = $('#user_type').val();

            

        if(test=="user"){

            

            $('#org-name-wrapper').hide();

            $('#contact-no-wrapper').hide();

            

        }

        

        if(test=="Org"){



            $('#org-name-wrapper').show();

            $('#contact-no-wrapper').show();



        }



    }



        $("#countries").select2({

            templateResult: formatState,

            templateSelection: formatState,

            placeholder: "select a country",

            theme:"bootstrap"

        });

</script>