@extends('layouts.layout-2')

@section('content')

    @if ($errors->any())
        <div class="row">
            <div class="col-sm-12">
                <div class="alert alert-danger">
                    <ul>
                        @foreach ($errors->all() as $error)
                            <li>{{ $error }}</li>
                        @endforeach
                    </ul>
                </div>
            </div>
        </div>
    @endif


    <h4 class="font-weight-bold mb-4">
        Content Tools: Insert
    </h4>


    <div class="card mb-4">

        <div class="card-body">
            <!-- Controls -->
            {!! Form::open(['url' => route('sysadmin_tools_media_insert'), 'class' => '']) !!}
            <div class="form-group mb-1">
                <label class="form-label" for="description">Description</label>
                {{ Form::textarea('text', $text,  array('class'=>'form-control', 'rows'=>20)) }}
            </div>
            <button type="submit" class="btn btn-primary" name="action" value="insert"><i class="ion"></i> Insert Media</button>
            <button type="submit" class="btn btn-primary" name="action" value="youtube_ids"><i class="ion"></i> Youtube IDs from TGuide</button>
            <button type="submit" class="btn btn-primary" name="action" value="replace_youtube_links"><i class="ion"></i> Replace Youtube Links in TGuide</button>
            <button type="submit" class="btn btn-primary" name="action" value="replace_youtube_div"><i class="ion"></i> Replace Youtube DIV</button>

            {!! Form::close() !!}
        </div>

        @if(count($values)>0)
            <div class="card-body">
                <!-- Controls -->
                @foreach($values as $key=>$value)
                    {{$value}}<br>
                @endforeach
            </div>
        @endif
    </div>

@endsection

