@extends('theme.'.env('THEME').'.site')

@section('content')

<div class="within">
  <div class="bar">動画の編集</div>
  <div class="back">
    @if ($err)
      <div class="alert alert-danger" role="alert">
        {{ $err }}
      </div>
    @endif
    <form method="POST" action="/video/{{ $frm->vid }}/edit">
      @csrf
      <div class="row body">
        <div class="col-md-3"><b>件名</b></div>
        <div class="col"><input id="title" name="title" type="text" class="form-control" value="{{ $frm->title }}" /></div>
      </div>
      <div class="col"><input id="vid" name="vid" type="hidden" class="form-control" value="{{ $frm->vid }}" /></div>
      <div class="row body">
        <div class="col-md-3"><b>ゲーム</b></div>
        <div class="col">
          <select id="game_id" name="game_id" class="form-control">
            <option value="0"></option>
            @foreach ($game as $g)
            <option value="{{ $g->id }}" @if ($frm->game_id == $g->id) selected @endif>{{ $g->name }}</option>
            @endforeach
          </select>
        </div>
      </div>
      <div class="row body">
        <div class="col-md-3"><b>URL</b></div>
        <div class="col"><input id="url" name="url" type="text" class="form-control" value="{{ $frm->url }}" /></div>
      </div>
      <div class="row body">
        <div class="col-md-3"><b>サムネ</b></div>
        <div class="col"><input id="thumbnail" name="thumbnail" type="text" class="form-control" value="{{ $frm->thumbnail }}" /></div>
      </div>
      <div class="row body">
        <div class="col-md-3"><b>076</b></div>
        <div class="col"><input id="kerotube" name="kerotube" type="text" class="form-control" value="{{ $frm->kerotube }}" /></div>
      </div>
      <div class="row body">
        <div class="col-md-3"><b>オディシー</b></div>
        <div class="col"><input id="odysee" name="odysee" type="text" class="form-control" value="{{ $frm->odysee }}" /></div>
      </div>
      <div class="row body" style="margin-top: 24px;">
        <div class="col"><input name="submit" type="submit" class="btn btn-success btn-block" value="送信" /></div>
      </div>
    </form>
  </div>
</div>

@endsection
