@extends('modal_pages.base')
<style>
    .listFlag{
        height: 20px;
        border-radius: 50%;
        width: 20px;
        margin-right: 5px;
    }
    .btn1{
    background-color: #141639c4 !important;
    color:white !important;
    border-radius: 20px;
    box-shadow:none !important;
    }
    .btn1:hover{
        background: #ffff !important;
        color: #141639c4 !important;
        border-radius: 20px;
        border: 1px solid #141639c4;
    }
</style>
@section('main')

    <div class="container" style="background-color: white; border-radius: 6px;">
        <div class="row">
            <div class="co-md-12 p-3">
                <form class="modal-form" action="{{ url()->current() }}" method="POST" enctype="multipart/form-data">
                {{ csrf_field() }}
                <input type="hidden" name="id" value="{{$std_proposal->id}}">
                    <div class="row">
                        <div class="col-md-12"> 
                            <ul>
                                @if(count($feedback_reasons) > 0)
                                @foreach($feedback_reasons as $row)
                                <li style="list-style-type: none;">
                                    <div class="pretty p-default p-round">
                                        <input class="feedback" type="radio" name="feedback" value="{{$row->reasons}}" />
                                        <div class="state p-success-o">
                                            <label>{{$row->reasons}}</label>
                                        </div>
                                    </div>
                                </li>
                                @endforeach
                                @endif
                                <li style="list-style-type: none;">
                                    <div class="pretty p-default p-round">
                                        <input class="feedback" type="radio" name="feedback" value="others"/>
                                        <div class="state p-success-o">
                                            <label>Others</label>
                                        </div>
                                    </div>
                                </li>
                            </ul>
                            
                           
                        </div> 
                        <div class="col-md-12" id="feedback_msg" style="display: none;"> 
                            <label class="form-label">Feedback</label>
                            <div class="form-icon position-relative"> 
                                <textarea class="form-control" name="feedback_msg" id="message"></textarea>
                            </div> 
                        </div> 
                        <div class="col-md-12">
                            <div class="mt-2 text-center">
                                <button type="submit" class="btn btn1" style="padding: 3px 18px;">
                                    {{ __('Submit') }}
                                </button>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>

   <script>
    $(function(){
        $('#modal_page_footer').hide();
        
        $('.feedback').on('click', function(){   
            var value =$(this).val(); 
            if(value=="others"){ 
                $('#feedback_msg').show(); 
            }else{
                $('#feedback_msg').hide();  
            }

        });
    }); 
    </script>  
@endsection
