@extends('layouts.master')
@section('page_title')
@if(isset($page_title))
{{ $page_title }}
@endif
@endsection
@section('content')
<div class="">
    <div class="page-title">
        <div class="title_left" style="width:800px !important;">
            <ol class="breadcrumb">
                <li><a href="{!! url('dashboard') !!}">Dashboard</a></li>
                <li class="active">Edit App</li>
            </ol>
        </div>
    </div>
    <div class="clearfix"></div>
    <div class="row">
        <div class="col-md-12 col-sm-12 col-xs-12">
            <div class="x_panel">
                <div class="x_title">
                    @include('commons.notifications')
                    <div class="clearfix"></div>
                </div>
                {{-- start of content --}}
                <div class="x_content">
                    <br>
                    {!! Form::model($clickapp, [
                    'method' => 'PATCH',
                    'url' => ['clickapps', $clickapp],
                    'class' => 'form-horizontal form-label-left'
                    ]) !!}
                    <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="app_name">App name</label>
                        <div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('app_name') ? 'has-error' : ''}}">
                            {!! Form::text('app_name', old('app_name'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter App Name' , 'id' => 'app_name']) !!}
                            {!! $errors->first('app_name', '<p class="help-block">:message</p>') !!}
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="app_type">App Type</label>
                        <div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('app_type') ? 'has-error' : ''}}">
                            {!! Form::text('app_type', old('app_type'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter App Type' , 'id' => 'app_type']) !!}
                            {!! $errors->first('app_type', '<p class="help-block">:message</p>') !!}
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="client">Client</label>
                        <div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('client') ? 'has-error' : ''}}">
                            {!! Form::text('client', old('client'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter App Type' , 'id' => 'client']) !!}
                            {!! $errors->first('client', '<p class="help-block">:message</p>') !!}
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="code">Code</label>
                        <div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('code') ? 'has-error' : ''}}">
                            {!! Form::text('code', old('code'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter CODE' , 'id' => 'code']) !!}
                            {!! $errors->first('code', '<p class="help-block">:message</p>') !!}
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="country">Country</label>
                        <div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('country') ? 'has-error' : ''}}">
                            {!! Form::select('country', $countries ,old('country'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Select Country ' , 'id' => 'country']) !!}
                            {!! $errors->first('country', '<p class="help-block">:message</p>') !!}
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="country">Operator</label>
                        <div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('operator') ? 'has-error' : ''}}">
                            {!! Form::select('operator', $net_ops ,old('operator'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Select Operator ' , 'id' => 'country']) !!}
                            {!! $errors->first('operator', '<p class="help-block">:message</p>') !!}
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="country">Toll Type</label>
                        <div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('tollfree') ? 'has-error' : ''}}">
                            {!! Form::select('tollfree', $toll_types ,old('tollfree'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Select Toll Option ' , 'id' => 'country']) !!}
                            {!! $errors->first('tollfree', '<p class="help-block">:message</p>') !!}
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="app_name">App Path</label>
                        <div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('app_path') ? 'has-error' : ''}}">
                            {!! Form::text('app_path', old('app_path'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter App Name' , 'id' => 'app_path']) !!}
                            {!! $errors->first('app_path', '<p class="help-block">:message</p>') !!}
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="launch_date">Launch Date</label>
                        <div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('launch_date') ? 'has-error' : ''}}">
                            {!! Form::date('launch_date', old('launch_date'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Enter App Name' , 'id' => 'launch_date']) !!}
                            {!! $errors->first('launch_date', '<p class="help-block">:message</p>') !!}
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="status">Status</label>
                        <div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('status') ? 'has-error' : ''}}">
                            {!! Form::select('status', $status_types ,old('status'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Set status ' , 'id' => 'country']) !!}
                            {!! $errors->first('status', '<p class="help-block">:message</p>') !!}
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="other_info">Other Info</label>
                        <div class="col-md-6 col-sm-6 col-xs-12 {{ $errors->has('other_info') ? 'has-error' : ''}}">
                            {!! Form::textarea('other_info', old('other_info'), ['class' => 'form-control col-md-7 col-xs-12', 'placeholder'=>'Specify other information...' , 'id' => 'other_info']) !!}
                            {!! $errors->first('other_info', '<p class="help-block">:message</p>') !!}
                        </div>
                    </div>


                    <div class="ln_solid"></div>
                    <div class="form-group">
                        <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
                            <button type="submit" class="btn btn-success"><i class="fa fa-save"></i> Submit</button>
                        </div>
                    </div>
                    {!! Form::close() !!}
                </div>
                {{-- end of x_content --}}
            </div>
            {{-- end of x_panel --}}
        </div>
    </div>

</div>

@endsection

@section('javascript')
<script type="text/javascript">
    $(function() {
        $('select').select2();

    });
</script>
@endsection