@extends('layouts.AdminLTE.index')

@section('icon_page', 'plus')

@section('title', 'Add Lead')

@section('menu_pagina')


@endsection

@section('content')

    <div class="box box-primary">
        <div class="box-body">
            <div class="row">
                <div class="col-md-12">
                    <form action="{{ route('lead.store') }}" method="post">
                        {{ csrf_field() }}
                        <div class="row">
                            <div class="col-lg-6">

                                <div class="form-group {{ $errors->has('leadsource') ? 'has-error' : '' }}">
                                    <label for="nome">Lead Source</label>
                                    <input type="text" name="leadsource" class="form-control" maxlength="30"
                                        placeholder="Lead Source" required="" value="{{ old('leadsource') }}" autofocus>
                                    @if ($errors->has('leadsource'))
                                        <span class="help-block">
                                            <strong>{{ $errors->first('leadsource') }}</strong>
                                        </span>
                                    @endif
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-group {{ $errors->has('sellertype') ? 'has-error' : '' }}">
                                    <label for="nome">Seller Type</label>
                                    <input type="text" name="sellertype" class="form-control" maxlength="30"
                                        placeholder="Buyer / Seller" required="" value="{{ old('sellertype') }}"
                                        autofocus>
                                    @if ($errors->has('sellertype'))
                                        <span class="help-block">
                                            <strong>{{ $errors->first('sellertype') }}</strong>
                                        </span>
                                    @endif
                                </div>
                            </div>

                        </div>
                        <div class="col-lg-6">
                            <div class="form-group {{ $errors->has('leaddate') ? 'has-error' : '' }}">
                                <label for="nome">Lead Date</label>
                                <input type="text" name="leaddate" class="form-control" maxlength="30"
                                    placeholder="Lead Date" required="" value="{{ old('leaddate') }}" autofocus>
                                @if ($errors->has('leaddate'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('leaddate') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <div class="form-group {{ $errors->has('selling_agent') ? 'has-error' : '' }}">
                                <label for="nome">Selling Agent</label>
                                <input type="text" name="selling_agent" class="form-control" maxlength="30"
                                    placeholder="Selling Agent" required="" value="{{ old('selling_agent') }}"
                                    autofocus>
                                @if ($errors->has('selling_agent'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('selling_agent') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <div class="form-group {{ $errors->has('status') ? 'has-error' : '' }}">
                                <label for="nome">Status</label>
                                <input type="text" name="status" class="form-control" maxlength="30"
                                    placeholder="Selling Agent" required="" value="{{ old('status') }}" autofocus>
                                @if ($errors->has('status'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('status') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <div class="form-group {{ $errors->has('street') ? 'has-error' : '' }}">
                                <label for="nome">Street</label>
                                <input type="text" name="street" class="form-control" maxlength="30"
                                    placeholder="Selling Agent" required="" value="{{ old('street') }}" autofocus>
                                @if ($errors->has('street'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('street') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <div class="form-group {{ $errors->has('city') ? 'has-error' : '' }}">
                                <label for="nome">city</label>
                                <input type="text" name="city" class="form-control" maxlength="30" placeholder="city"
                                    required="" value="{{ old('city') }}" autofocus>
                                @if ($errors->has('city'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('city') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <div class="form-group {{ $errors->has('zip_code') ? 'has-error' : '' }}">
                                <label for="nome">zip_code</label>
                                <input type="text" name="zip_code" class="form-control" maxlength="30"
                                    placeholder="zip_code" required="" value="{{ old('zip_code') }}" autofocus>
                                @if ($errors->has('zip_code'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('zip_code') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <div class="form-group {{ $errors->has('owner') ? 'has-error' : '' }}">
                                <label for="nome">owner</label>
                                <input type="text" name="owner" class="form-control" maxlength="30"
                                    placeholder="owner" required="" value="{{ old('owner') }}" autofocus>
                                @if ($errors->has('owner'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('owner') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <div class="form-group {{ $errors->has('cell_phone') ? 'has-error' : '' }}">
                                <label for="nome">cell_phone</label>
                                <input type="text" name="cell_phone" class="form-control" maxlength="30"
                                    placeholder="cell_phone" required="" value="{{ old('cell_phone') }}" autofocus>
                                @if ($errors->has('cell_phone'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('cell_phone') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <div class="form-group {{ $errors->has('bedrooms') ? 'has-error' : '' }}">
                                <label for="nome">bedrooms</label>
                                <input type="text" name="bedrooms" class="form-control" maxlength="30"
                                    placeholder="bedrooms" required="" value="{{ old('bedrooms') }}" autofocus>
                                @if ($errors->has('bedrooms'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('bedrooms') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <div class="form-group {{ $errors->has('baths') ? 'has-error' : '' }}">
                                <label for="nome">baths</label>
                                <input type="text" name="baths" class="form-control" maxlength="30"
                                    placeholder="baths" required="" value="{{ old('baths') }}" autofocus>
                                @if ($errors->has('baths'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('baths') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <div class="form-group {{ $errors->has('basement') ? 'has-error' : '' }}">
                                <label for="nome">basement</label>
                                <input type="text" name="basement" class="form-control" maxlength="30"
                                    placeholder="basement" required="" value="{{ old('basement') }}" autofocus>
                                @if ($errors->has('basement'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('basement') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <div class="form-group {{ $errors->has('garage') ? 'has-error' : '' }}">
                                <label for="nome">garage</label>
                                <input type="text" name="garage" class="form-control" maxlength="30"
                                    placeholder="garage" required="" value="{{ old('garage') }}" autofocus>
                                @if ($errors->has('garage'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('garage') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <div class="form-group {{ $errors->has('occupancy') ? 'has-error' : '' }}">
                                <label for="nome">occupancy</label>
                                <input type="text" name="occupancy" class="form-control" maxlength="30"
                                    placeholder="occupancy" required="" value="{{ old('occupancy') }}" autofocus>
                                @if ($errors->has('occupancy'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('occupancy') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <div class="form-group {{ $errors->has('rent') ? 'has-error' : '' }}">
                                <label for="nome">rent</label>
                                <input type="text" name="rent" class="form-control" maxlength="30"
                                    placeholder="rent" required="" value="{{ old('rent') }}" autofocus>
                                @if ($errors->has('rent'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('rent') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <div class="form-group {{ $errors->has('mort_bal') ? 'has-error' : '' }}">
                                <label for="nome">mort_bal</label>
                                <input type="text" name="mort_bal" class="form-control" maxlength="30"
                                    placeholder="mort_bal" required="" value="{{ old('mort_bal') }}" autofocus>
                                @if ($errors->has('mort_bal'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('mort_bal') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <div class="form-group {{ $errors->has('prop_taxes') ? 'has-error' : '' }}">
                                <label for="nome">prop_taxes</label>
                                <input type="text" name="prop_taxes" class="form-control" maxlength="30"
                                    placeholder="prop_taxes" required="" value="{{ old('prop_taxes') }}" autofocus>
                                @if ($errors->has('prop_taxes'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('prop_taxes') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <div class="form-group {{ $errors->has('asking_price') ? 'has-error' : '' }}">
                                <label for="nome">asking_price</label>
                                <input type="text" name="asking_price" class="form-control" maxlength="30"
                                    placeholder="asking_price" required="" value="{{ old('asking_price') }}"
                                    autofocus>
                                @if ($errors->has('asking_price'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('asking_price') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <div class="form-group {{ $errors->has('mls_comps') ? 'has-error' : '' }}">
                                <label for="nome">mls_comps</label>
                                <input type="text" name="mls_comps" class="form-control" maxlength="30"
                                    placeholder="mls_comps" required="" value="{{ old('mls_comps') }}" autofocus>
                                @if ($errors->has('mls_comps'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('mls_comps') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <div class="form-group {{ $errors->has('zillow') ? 'has-error' : '' }}">
                                <label for="nome">zillow</label>
                                <input type="text" name="zillow" class="form-control" maxlength="30"
                                    placeholder="zillow" required="" value="{{ old('zillow') }}" autofocus>
                                @if ($errors->has('zillow'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('zillow') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <div class="form-group {{ $errors->has('comments') ? 'has-error' : '' }}">
                                <label for="nome">comments</label>
                                <input type="text" name="comments" class="form-control" maxlength="30"
                                    placeholder="comments" required="" value="{{ old('comments') }}" autofocus>
                                @if ($errors->has('comments'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('comments') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <div class="form-group {{ $errors->has('notes') ? 'has-error' : '' }}">
                                <label for="nome">notes</label>
                                <input type="text" name="notes" class="form-control" maxlength="30"
                                    placeholder="notes" required="" value="{{ old('notes') }}" autofocus>
                                @if ($errors->has('notes'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('notes') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>



                        {{-- <div class="col-lg-6">
                            <div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">
                                <label for="nome">E-mail</label>
                                <input type="email" name="email" class="form-control" placeholder="E-mail"
                                    required="" value="{{ old('email') }}">
                                @if ($errors->has('email'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('email') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <div class="form-group {{ $errors->has('password') ? 'has-error' : '' }}">
                                <label for="nome">Password</label>
                                <input type="password" name="password" class="form-control" placeholder="Password"
                                    minlength="6" required="">
                                @if ($errors->has('password'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('password') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>
                        <div class="col-lg-6">
                            <div class="form-group {{ $errors->has('password-confirm') ? 'has-error' : '' }}">
                                <label for="nome">Confirm Password</label>
                                <input type="password" name="password_confirmation" class="form-control"
                                    placeholder="Confirm Password" minlength="6" required="">
                                @if ($errors->has('password-confirm'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('password-confirm') }}</strong>
                                    </span>
                                @endif
                            </div>
                        </div>
                        <div class="col-lg-12">
                            <div class="form-group {{ $errors->has('roles') ? 'has-error' : '' }}">
                                <label for="nome">Permission Group</label>
                                <select name="roles[]" class="form-control select2" multiple="multiple"
                                    data-placeholder="Permission Group" required="">
                                    @foreach ($roles as $role)
                                        @if ($role->id != 1)
                                            <option value="{{ $role->id }}"> {{ $role->name }} </option>
                                        @endif
                                    @endforeach
                                </select>
                                @if ($errors->has('roles'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('roles') }}</strong>
                                    </span>
                                @endif
                            </div> 
                </div> --}}
                        <div class="col-lg-6"></div>
                        <div class="col-lg-6">
                            <input type="submit" class="btn btn-primary pull-right">
                        </div>

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

@endsection

@section('layout_js')

    {{-- <script>
        $(function() {
            $('.select2').select2({
                "language": {
                    "noResults": function() {
                        return "Nenhum registro encontrado.";
                    }
                }
            });
        });
    </script> --}}

@endsection
