@extends('layouts.app')

@section('title')
Add New Dealer Type 
@stop

@section('breadcrumb')
<ol class="breadcrumb pull-right">
        <li><a href="{{route('home')}}"><i class="fa fa-dashboard"></i> Home</a></li>
        @role('admin')
        <li ><a href="{{route('dealer.type.all')}}">Dealer Types </a></li>
        @endrole
        <li class="active">Add Dealer Type</li>
      </ol>
@stop
@section('content')

<div class="container-fluid">
                <!--.row-->
                <div class="row">

                    <div class="col-md-12">
                        <div class="white-box">
                            <h3 class="box-title m-b-0" style="font-size: 18px;"><i class="fa fa-users" aria-hidden="true"></i>&nbsp;Add New Dealer Type</h3>
                            <p class="text-muted m-b-30 font-13" style="height: 5px;"> Add the information </p>
                            <hr>
                            <form class="form-horizontal" action="{{route('dealer.type.insert')}}" method="post" style="margin-top: 30px; margin-bottom: 30px;">
                               {{csrf_field()}}
                               
                                <div class="form-group">
                                    <label for="exampleInputuname" class="col-sm-2 control-label"> Name <span style="color: red">*</span></label>
                                    <div class="col-sm-10">
                                        <div class="input-group" style="width:400px">

                                            <input  type="text" class="form-control" name="name" placeholder="Enter Name" value="{{old('name')}}" id="exampleInputuname">
                                        @if ($errors->has('name'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('name') }}</strong>
                                    </span>
                                @endif
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group" >
                                    <label for="inputPassword3" class="col-sm-2 control-label">Status<span style="color: red">*</span></label>
                                    <div class="col-sm-10">
                                        <div class="input-group">
                                            <select class="form-control" style="width:400px" name="status">
                                                @if(old('status'))
                                                @if(old('status') == true)
                                                <option value='1' selected="">Active</option>
                                                <option value="0">InActive</option>
                                                @else
                                                <option value='1' >Active</option>
                                                <option value="0"selected="">InActive</option>
                                                @endif
                                                @else
                                               <option value='1' selected="">Active</option>
                                                <option value="0">InActive</option>
                                                @endif

                                            </select>

                                        @if ($errors->has('status'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('status') }}</strong>
                                    </span>
                                @endif
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group m-b-0">
                                <!-- col-sm-offset-3 col-sm-9 -->
                                    <div class="col-sm-offset-3 col-sm-2" style="margin-left: 215px;">
                                        <button type="submit" class="btn btn-info waves-effect waves-light m-t-10" style="width: 100%;">Save</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
                <!--./row-->
            </div>
            <!-- /.container-fluid -->

@stop