@extends('backend.layouts.master')

@section('title', 'Sms Information')

@push('css')

@endpush

@section('content')
	<div class="right_col" role="main">
        <div class="">
            <div class="clearfix"></div>
            @if(Session::has('success'))
                <div class="alert alert-success">
                    {{ Session::get('success') }}
                </div>
            @endif
            @if(Session::has('error'))
                <div class="alert alert-danger">
                    {{ Session::get('error') }}
                </div>
            @endif
            <div class="row">
                <div class="col-md-12 col-sm-12 col-xs-12">
                    <div class="x_panel">
                        <div class="x_title">
                            <h2>SMS Information </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">
							<form id="demo-form2" action="{{ route('sms.update',$sms->id)}}" method="post" data-parsley-validate class="form-horizontal form-label-left" enctype="multipart/form-data" >
								{{ csrf_field() }}
								{{ method_field('PUT') }}
								<div class="form-group">
									<label class="control-label col-md-4 col-sm-4 col-xs-12" for="sms_balance">SMS Balance <span class="required">*</span></label>
									<div class="col-md-4 col-sm-4 col-xs-12">
										<input type="text" id="sms_balance" name="sms_balance" required="required" class="form-control" value="{{$sms->sms_balance}}">
										<p class="error-sms">{{ $errors->first('sms_balance') }}</p>
									</div>
								</div>
								<div class="form-group">
									<label class="control-label col-md-4 col-sm-4 col-xs-12" for="expire_date">Expired Date <span class="required">*</span></label>
									<div class="col-md-4 col-sm-4 col-xs-12">
										<input type="text" id="expire_date" name="expire_date" required="required" class="form-control" value="{{date('d-m-Y',strtotime($sms->expire_date))}}" required>
										<p class="error-sms">{{ $errors->first('expire_date') }}</p>
									</div>
								</div>
								<hr/>	
								<div class="form-group">
									<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-5">
										<a href="{{ route('sms.edit')}}" class="btn btn-danger">Cancel</a>
										<button class="btn btn-warning" type="reset">Reset</button>
										<button type="submit" class="btn btn-success">Update</button>
									</div>
								</div>	
							</form>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
@endsection

@push('js')
<script>
	$(document).ready(function(){
		
		
	})
</script>
@endpush									