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

@section('content')

<div class="within">
  <div class="bar">{{ __('site.sinkitoroku') }}</div>
  <div class="back">
    @if ($err)
    <div class="alert alert-danger" role="alert">
      {{ $err }}
    </div>
    @endif
    <form method="POST" action="/register">
      @csrf
      <div class="row body">
        <div class="col-sm-4"><b>{{ __('site.username') }} <span class="badge badge-danger">{{ __('site.hissu') }}</span></b></div>
        <div class="col"><input name="username" id="username-register" type="text" class="form-control" value="{{ $sav['username'] }}" /></div>
      </div>
      <div class="row body">
        <div class="col-sm-4"><b>{{ __('site.password') }} <span class="badge badge-danger">{{ __('site.hissu') }}</span></b></div>
        <div class="col"><input name="password" id="password-register" type="password" class="form-control" /></div>
      </div>
      <div class="row body">
        <div class="col-sm-4"><b>{{ __('site.passwordkakunin') }} <span class="badge badge-danger">{{ __('site.hissu') }}</span></b></div>
        <div class="col"><input name="password_check" id="confirm-register" type="password" class="form-control" /></div>
      </div>
      <div class="row body">
        <div class="col-sm-4"><b>{{ __('site.densimail') }} <span class="badge badge-danger">{{ __('site.hissu') }}</span></b></div>
        <div class="col"><input name="email" id="email-register" type="text" class="form-control" value="{{ $sav['email'] }}" /></div>
      </div>
      <div class="row body">
        <div class="col-sm-4"><b>{{ __('site.kuni') }}</b></div>
        <div class="col">
          <select name="country" id="country-register" class="custom-select">
            @foreach (getCountries() as $r)
              <option value="{{ ($sav['country'] ?: $r['value']) }}">{{ __($r['label']) }}</option>
            @endforeach
          </select>
        </div>
      </div>
      <div class="row body">
        <div class="col-sm-4"><b>{{ __('site.seibetu') }}</b></div>
        <div class="col">
          <fieldset class="form-group">
            <div tabindex="-1" role="group">
              <div id="gender" role="radiogroup" tabindex="-1">
                <label>
                  <input id="gender0" name="gender" type="radio" autocomplete="off" class="" @if ($sav['gender'] == 0) checked @endif value="0" />
                  <span>不明</span>
                </label>
                <label>
                  <input id="gender1" name="gender" type="radio" autocomplete="off" class="" @if ($sav['gender'] == 1) checked @endif value="1" />
                  <span>男性</span>
                </label>
                <label>
                  <input id="gender2" name="gender" type="radio" autocomplete="off" class="" @if ($sav['gender'] == 2) checked @endif value="2" />
                  <span>女性</span>
                </label>
              </div>
            </div>
          </fieldset>
        </div>
      </div>
      <div class="row body">
        <div class="col-sm-4"></div>
        <div class="col"><input name="submit" type="submit" class="btn btn-success btn-block" value="{{ __('site.toroku') }}" /></div>
      </div>
    </form>
  </div>
</div>

@endsection
