@extends('layout.main')
@section('title') @if( ! empty($title)) {{ $title }} | @endif @parent @endsection

@section('main')






<div class="row">
    <div class="send-msg">
        <div class="text-center" style="padding-bottom: 30px">
            <h2>Contact The Provider to Receive More Information</h2>
            <p>Please feel free to get in touch with us by filling in the form below.</p>
        </div>
            
            <form method='post' action='{{route('send-to-provider')}}'>
                @csrf
                <div class="row">
                    <div class="contact-form">
                        <div class="row">
                            <input type="text" class="form-control" name="id" value="{{ $provider->id }}" hidden readonly style='display:none;'/>
                            <div class="col-md-6 form-group contacts{{ $errors->has('name')? 'has-error':'' }} ">
                                {{ Form::label('fname','First Name*',['class'=>'control-label'])}}
                                <i class="fa fa-user con-icon"></i>
                                <input type="text" class="form-control" id="name" name="name" placeholder="First name" value="{{ old('name') }}" required="required" />
                                {!! $errors->has('name')? '<p class="help-block">'.$errors->first('name').'</p>':'' !!}
                            </div>
                            <div class="col-md-6 form-group contacts {{ $errors->has('name')? 'has-error':'' }} ">
                                {{ Form::label('lname','Last Name*',['class'=>'control-label'])}}
                                <i class="fa fa-user con-icon"></i>
                                <input type="text" class="form-control" id="name" name="lname" placeholder="Last name" value="{{ old('name') }}" required="required" />
                                {!! $errors->has('name')? '<p class="help-block">'.$errors->first('name').'</p>':'' !!}
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-6 form-group contacts {{ $errors->has('email')? 'has-error':'' }}">
                                {{ Form::label('email','Email*',['class'=>'control-label'])}}
                                <i class="fas fa-envelope con-icon"></i>
                                    <input type="email" class="form-control" id="email" placeholder="Enter email" name="email" value="{{ old('email') }}" required="required" />
                                {!! $errors->has('email')? '<p class="help-block">'.$errors->first('email').'</p>':'' !!}

                            </div>
                            <div class="col-md-6 form-group contacts {{ $errors->has('name')? 'has-error':'' }} ">
                                {{ Form::label('phone','Phone',['class'=>'control-label'])}}
                                <i class="fa fa-phone con-icon"></i>
                                <input type="text" class="form-control" id="name" name="phone" placeholder="Enter phone" value="{{ old('phone') }}" />
                                {!! $errors->has('phone')? '<p class="help-block">'.$errors->first('phone').'</p>':'' !!}
                            </div>
                        </div>
                        <div class="form-group contacts {{ $errors->has('message')? 'has-error':'' }}">
                            {{ Form::label('message','Message*',['class'=>'control-label'])}}
                            
                            <textarea name="message" id="message" class="form-control" required style="height: 150px;"></textarea>
                            {!! $errors->has('message')? '<p class="help-block">'.$errors->first('message').'</p>':'' !!}
                        </div>
                        <div class="row text-center">
                            <button type="submit" class="btn btn-lg btn-learn"><strong>@lang('app.send_message')</strong></button>
                        </div>
                    </div>
                </div>
            </form>
            </div>
        </div>



@endsection

@section('page-js')


    <script>
        @if(session('success'))
            toastr.success('{{ session('success') }}', '<?php echo trans('app.success') ?>', toastr_options);
        @endif
    </script>
@endsection