@extends('panel.layouts.layout')
@section('content')
<!-- =====================================
==== Start settings  -->
<br>
<section class="settings">
    <div class="container-fluid">
     <div class="row">
        <div class="col-md-11">
            <div class="wel-text">
                <div class="path">
                 <ul>
                    <a href="{{ URL::to('/admin/home') }}"><i class="icon-home2 position-left"></i> @lang('home.home')</a>
                    <span>/</span>
                    <a href="{{ URL::to('admin/contactus') }}"><i class="icon-home2 position-left"></i> @lang('home.contactus')</a>
                    <span>/</span>
                    @lang('home.ask_reply')

                </ul>
            </div>
        </div>
    </div>

    <div class="col-md-1">
        <div class="dropdown">
          <button class="btn btn-defualt dropdown-toggle" type="button" data-toggle="dropdown">@lang('home.links')
              <span class="caret"></span></button>
              <ul class="dropdown-menu" style="padding: 10px">
                <li  style="padding: 10px"><a href="{{ URL::to('ar/admin/setting') }}"><i class="icon-gear"></i>@lang('home.general_settings')</a></li>
                <li  style="padding: 5px"><a href="{{ URL::to('ar/admin/reports_browsing') }}"><i class="icon-copy"></i> @lang('home.full_report')</a></li>
            </ul>
        </div>
    </div>
</div>

<div class="row">
    <div class="col-lg-12 col-md-6">
        <div class="item">
            <div class="head">
                <h5> @lang('home.ask_reply')</h5>
            </div>
            <form class="form-horizontal form-validate-jquery"  method="POST" action="{{ URL::to('/admin/contact_us/reply') }}" enctype='multipart/form-data'>

                @if ($errors->any())
                @foreach ($errors->all() as $error)
                <div class="alert alert-danger alert-dismissible" >
                    <a href="#" class="close" data-dismiss="alert" aria-label="close" style="right: 5px;">&times;</a>{{ $error }}
                </div>
                @endforeach
                @endif
                @if(Session::has('success'))
                <div class="alert alert-success alert-dismissible">
                    <a href="#" class="close" data-dismiss="alert" aria-label="close" style="right: 5px;">&times;</a>{{ Session::get('success') }}
                </div>
                @endif
                @csrf
                    
                    @include('panel.contactus.form')
               
                <button type="submit" class="btn btn-primary">@lang('home.save') <i class="icon-arrow-left13 position-right"></i></button>

            </form>
        </div>
    </div>
    
</div>
</div>
</section>
@stop
@section('jsCode')

  <script>
    var wrap_email = $(".wrap_email>#space_email");
   var add_new_email = $(".add_new_email");
   $(add_new_email).click(function (e) {
    e.preventDefault();
    $(wrap_email).append('<div class="form-group row" ><label class="control-label col-lg-12">@lang('home.email') </label><div class="col-lg-10"><input type="text" class="full-width" name="email[]" placeholder="@lang('home.email')" ></div><div class="col-lg-2 mt-0 mb-0"><button class="remove_field btn btn-danger fz-14 line-height-24 mt-0 mb-0">-</button></div></div>');
  });

    var wrap_cc = $(".wrap_cc>#space_cc");
   var add_new_cc = $(".add_new_cc");
   $(add_new_cc).click(function (e) {
    e.preventDefault();
    $(wrap_cc).append('<div class="form-group row" ><label class="control-label col-lg-12">CC</label><div class="col-lg-10"><input type="text" class="full-width" name="moreUsers[]" placeholder="CC"  ></div><div class="col-lg-2 mt-0 mb-0"><button class="remove_field btn btn-danger fz-14 line-height-24 mt-0 mb-0">-</button></div></div>');
  });

   var wrap_bcc = $(".wrap_bcc>#space_bcc");
   var add_new_bcc = $(".add_new_bcc");
   $(add_new_bcc).click(function (e) {
    e.preventDefault();
    $(wrap_bcc).append('<div class="form-group row" ><label class="control-label col-lg-12">Bcc</label><div class="col-lg-10"><input type="text" class="full-width" name="evenMoreUsers[]" placeholder="Bcc"  ></div><div class="col-lg-2 mt-0 mb-0"><button class="remove_field btn btn-danger fz-14 line-height-24 mt-0 mb-0">-</button></div></div>');
  });



 $(document).on("click",".remove_field",function(){
    $(this).parent().parent().remove();
  });
// extraPlugins needs to be set too.
// CKEDITOR.replace( 'message');
    </script>
@stop