@extends('layout.app')
@section('content')

    <form action="{{ route('closeTokenStore', $token->id) }}" method="POST" name="editForm">
        {{-- @method('PUT') --}}
        @csrf
        <div class="card">
            <div class="card-body">
                <input type="hidden" name="closeUserId" value="{{ Auth::user()->id }}">
            <div class="row">
                <div class="form-group col-md-4">
                    <label for="status">
                        Status*
                    </label>
                    <select class="form-control bSelect" name="status">
                        <option value="Inactive" selected>Close Token</option>
                    </select>
                </div>
                
                <div class="form-group col-md-4">
                    <label for="shortname">
                        Remarks*
                    </label>
                    <input name="remarks" required placeholder="Enter Remarks" type="text" class="form-control" value="{{ $token->remarks }}">
                   
                </div>
            </div>
                <div class="form-group">
                    <button type="submit" class="btn btn-danger float-right">
                        Close Token
                    </button>
                </div>

            </div>
        </div>
    </form>

    <script>
        //   document.forms['editForm'].elements['status'].value='{{ $token->status }}'
        //  document.forms['editForm'].elements['tokenCode'].value='{{ $token->tokenCode }}'
    </script>

@endsection
