@yield('title', lang('master.update'))

@extension('message')
@error()

@section('breadcrumb')
	<h2><a href="{{ route('index') }}">@lang('insurrance_model.name')</a></h2>
	<span>@lang('master.update')</span>
@endsection

@beginForm(route('update', ['id' => $this->id]))
	@model('InsurranceModel', false)
@endForm

@section('script')
<script>
	var expiration_time = "{{$this->expiration_time}}";
$(document).ready(function() {
	var arr = expiration_time.split('-');
	var year = parseInt(arr[0]);
	if(arr.length > 1)
		var month = parseInt(arr[1]);
	else
		var month = 0;

	$("#expiration_year").val(year);
	$("#expiration_month").val(month);
});
</script>
@endsection