@extends('backend.layouts.master')
@section('title','Unit Edit')
@push('css')

@endpush
<!-- page content -->
@section('content')
    <div class="right_col" role="main">
        <div class="">
            <div class="row">
                <div class="col-md-12 col-sm-12 col-xs-12">
                    <div class="x_panel">
                        <div class="x_title">
                            <h2>Edit Unit</h2>
                            <ul class="nav navbar-right panel_toolbox">
                                <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                                </li>
                                <li class="dropdown">
                                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-wrench"></i></a>
                                    <ul class="dropdown-menu" role="menu">
                                        <li><a href="#">Settings 1</a></li>
                                        <li><a href="#">Settings 2</a></li>
                                    </ul>
                                </li>
                                <li><a class="close-link"><i class="fa fa-close"></i></a></li>
                            </ul>
                            <div class="clearfix"></div>
                        </div>
                        <div class="x_content">
                            <div class="row">
                                <div class="col-sm-4"></div>
                                <div class="col-sm-4">
                                     <form action="{{route('unit.update',$unit->id)}}" method="post">
                                        {{ csrf_field()}}
                                        <div class="form-group">
                                            <label for="name">Name*</label>
                                            <input type="text" class="form-control" id="name" value="{{$unit->name}}" name="name" placeholder="Enter name">
                                            <span class="error"><b>{{$errors->first('name')}}</b></span>
                                        </div>
                                        <div class="form-group">
                                            <label for="description">Description</label>
                                            <input type="text" class="form-control" value="{{$unit->description}}" id="description" name="description" placeholder="Description">
                                            <span class="error"><b> {{$errors->first('description')}} </b></span>
                                        </div>
                                        <div class="box-footer">
                                            <button type="submit" name="btnCreate" class="btn btn-primary btn-block">Update Unit</button>
                                        </div>
                                    </form>
                                </div>
                                <div class="col-sm-4"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- /page content -->
@endsection

@section('script')
    <script type="text/javascript">

    </script>
@endsection