@extends('layouts.master')

@section('content')
<div class="content">
    <div class="row" style="min-height: 500px">
        <form action="{{ url('admin/designation/update/'.$designation->id) }}" enctype="multipart/form-data" method="POST" role="form">
        <div class="col-md-8 col-md-offset-2">
            <header class="panel-heading" style="height:50px;">
                <div class="pull-left">
                    {{$title}}
                </div>
                <div>
                     @if(\Auth::user()->utype==1)
                        <a style="margin-left: 3px" href="{{ url('admin/designation') }}" class="btn btn-sm btn-info pull-right"><i class="fa fa-list"></i> Designation List</a>
                        <a style="margin-left: 3px" href="{{ url('admin/designation/add') }}" class="btn btn-sm btn-info pull-right"><i class="fa fa-plus"></i> Designation Add</a> <br><br>
                    @endif
                </div>
            </header>
        </div>
        <div class="col-md-8 col-md-offset-2">
            <div class="panel panel-default">
                <div class="panel-body">
                    {{ csrf_field() }}
                    <div class="col-md-10 col-md-offset-1">
                        <div class="form-group {{ $errors->has('name') ? 'has-error' : '' }}">
                            <label for="name">Designation Name <i class="text-danger">*</i></label>
                            <input type='text' name="name" id="name" class="form-control" value="{{ $designation->name }}">
                            <lebel class="text-danger"> {{ $errors->first('name') }}</lebel>
                        </div>
                    </div>
                    <div class="col-md-10 col-md-offset-1" style="margin-top: 30px;">
                        <a href="{{ url('admin/designation') }}" class="btn btn-default pull-left">
                            <span class="btn-icon"> 
                                <i class="fa fa-times"></i>
                            </span>
                            Cancel
                        </a>
                        <button type="submit" class="btn btn-inline btn-success pull-right">
                            <span class="btn-icon"> 
                                <i class="fa fa-save"></i>
                            </span>
                            Update
                        </button>
                    </div>
                </div>
            </div>
        </div>

        </form>
    </div>
</div>
@stop


@section('script')

@if(Session::has('msg'))
    <div class="alert alert-success center-block msg_alt" >
        <a class="close" data-dismiss="alert" href="#">&times;</a>
        <strong><i class="fa fa-check"></i></strong>&nbsp;
    {{Session::get('msg')}}
    </div>
@endif
@stop