@extends('layout.main')
@section('title', config('app.name') . ' | Add Customer')
@section('content')
        <!-- main content start-->
<!-- main content start-->

{{--<!--footer-->--}}
<div id="page-wrapper">

    <div class="main-page">

        <div class="forms">
            <div class="form-grids row widget-shadow" data-example-id="basic-forms"
                 style="position: relative;top:-3.2em;">
                <div class="form-title">
                    <h4>Create Customer</h4>
                </div>
                <div class="form-body">
                    <div class="form-three" style="position: relative;margin-top: -1em;">
                        <div class="widget-shadow">
                            @include('partials.errors')
                            @include('partials.success')
                            <div class="alert alert-danger error_div" style="display: none">
                                <button type="button" class="close" data-dismiss="alert">×</button>
                                <strong>Whoops!</strong>
                                <p class="err_msg"></p>
                            </div>
                            <div class="alert alert-success success_div" style="display: none">
                                <button type="button" class="close" data-dismiss="alert">×</button>
                                <strong>Success!</strong>
                                <p class="suucess_msg"></p>
                            </div>
                        </div>
                        <form class="form-horizontal" name="customer_create" action="/add-customer" method="post">
                            <input type="hidden" name="_token" value="{{csrf_token()}}">
                            <input type="hidden" name="_method" value="post">
                            <div class="form-group">
                                <label for="selector1" class="col-sm-2 control-label">Category</label>
                                <span class="err_category" style="color:#c9302c;font-size: 15px;"></span>
                                <div class="col-sm-8"><select id="cus_category" name="category"
                                                              class="form-control1">
                                        <option value="1">Indivdual</option>
                                        <option value="2">Company</option>
                                        <option value="3">Enterprices</option>

                                    </select></div>
                            </div>
                            <div class="form-group">
                                <label for="focusedinput" class="col-sm-2 control-label"> Name</label>
                                <div class="col-sm-8">
                                    <span class="err_name" style="color:#c9302c;font-size: 15px;"></span>
                                    <input type="text" class="form-control1" id="cus_name" name="customer_name"
                                           placeholder="Name">
                                </div>


                            </div>
                            <div class="form-group" id="company_lists">
                                <label for="focusedinput" class="col-sm-2 control-label">Choose Company </label>
                                <div class="col-sm-7">

                                    <select data-placeholder="Choose a Company" class="chosen-select  form-control1"
                                            required
                                            tabindex="2" id="cus_company" name="company">


                                    </select>
                                </div>
                                <div class="col-sm-1"><a href="javascript:void('0')"
                                                         class="btn btn-success add-company"><i
                                                class="fa fa-plus" aria-hidden="true"></i> Add</a></div>
                            </div>
                            <div class="form-group">
                                <label for="focusedinput" class="col-sm-2 control-label">Customer ID</label>
                                <div class="col-sm-8">
                                    <span class="err_customer_id" style="color:#c9302c;font-size: 15px;"></span>
                                    <input type="text" class="form-control1" id="customer_id" name="customer_id"
                                           autocomplete="off"
                                           placeholder="Customer Id">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="focusedinput" class="col-sm-2 control-label">Address</label>
                                <div class="col-sm-8">
                                    <span class="err_address" style="color:#c9302c;font-size: 15px;"></span>
                                    <input type="text" class="form-control1" id="cus_address" name="address"
                                           placeholder="Address">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="focusedinput" class="col-sm-2 control-label">Mobile</label>
                                <div class="col-sm-8">
                                    <span class="err_mobile" style="color:#c9302c;font-size: 15px;"></span> <span
                                            id="errmsg" style="color:#c9302c;font-size: 15px;"></span>
                                    <input type="text" class="form-control1 number_fileds" maxlength="10"
                                           id="cus_mobile" name="mobile"
                                           placeholder="Your Mobile No">
                                </div>
                                <div class="col-lg-2">

                                </div>
                            </div>
                            <div class="form-group">
                                <label for="focusedinput" class="col-sm-2 control-label">Email</label>
                                <div class="col-sm-8">
                                    <span class="err_email" style="color:#c9302c;font-size: 15px;"></span>
                                    <input type="text" class="form-control1" id="cus_email" name="email"
                                           placeholder="Your Email">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="radio" class="col-sm-2 control-label">Gender</label>
                                <div class="col-sm-8">
                                    <div class="radio block col-lg-2 col-md-4"><label><input type="radio"
                                                                                             name="gender"
                                                                                             class="cus_gender_male"
                                                                                             value="1"
                                                                                             checked="">
                                            Male</label></div>
                                    <div class="radio block col-lg-2 col-md-4"><label><input type="radio"
                                                                                             name="gender"
                                                                                             class="cus_gender_female"
                                                                                             value="2">
                                            Female</label></div>
                                    <div class="radio block col-lg-2 col-md-4"><label><input type="radio"
                                                                                             name="gender"
                                                                                             class="cus_gender_trans"
                                                                                             value="3">
                                            Transgender</label></div>

                                </div>
                            </div>


                            <div class="form-group">
                                <label for="selector1" class="col-sm-2 control-label">Referred by</label>
                                <div class="col-sm-8">
                                    <span class="err_refer" style="color:#c9302c;font-size: 15px;"></span>
                                    <input type="text" class="form-control1" id="cus_referred_by"
                                           name="referred_by"
                                           placeholder="Referrer Info"></div>
                            </div>


                            <div align="center">


                                <input type="submit" class="btn btn-info theme-btn customer_create" value="Submit">
                                <a href="/create-customer" class="btn  btn-default theme-btn2">Reset</a>


                            </div>
                        </form>
                    </div>


                </div>
            </div>


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

<div class="modal" id="loading" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
     aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-body text-center">
                <img src="/images/loading.gif" style="width:20%;" class="center-block">
                <span class="badge badge-warning">Please Wait</span>
            </div>
        </div>
    </div>
</div>

<div class="modal" id="add_company" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel">Add Company</h5>
                <button type="button" class="close company_close" data-dismiss="modal" aria-label="Close"
                        style="position: relative;top:-1em;">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="row">
                    <form name="add_company" action="" method="post">
                        <input type="hidden" name="_token" value="{{csrf_token()}}">
                        <input type="hidden" name="_method" value="post">
                        <div class="form-group">
                            <label for="focusedinput" class="control-label"> Company Name</label>
                            <span class="err_name" style="color:#c9302c;font-size: 15px;"></span>
                            <input type="text" class="form-control1" id="add_company_name" name="add_company_name"
                                   placeholder="Enter Company Name">
                        </div>
                    </form>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary company_close" data-dismiss="modal">Close</button>
                <button type="button" class="btn btn-primary save_add_company">Save</button>
            </div>
        </div>
    </div>
</div>

<!--footer-->
@endsection