2018-01-04 16:53:33 +09:00
|
|
|
@extends('layouts.base')
|
|
|
|
|
2019-01-08 23:27:48 +09:00
|
|
|
@section('title', 'チェックインの修正')
|
|
|
|
|
2018-01-04 16:53:33 +09:00
|
|
|
@section('content')
|
2019-06-01 00:40:35 +09:00
|
|
|
<div id="app" class="container">
|
2018-01-04 16:53:33 +09:00
|
|
|
<h2>チェックインの修正</h2>
|
|
|
|
<hr>
|
|
|
|
<div class="row justify-content-center mt-5">
|
|
|
|
<div class="col-lg-6">
|
|
|
|
<form method="post" action="{{ route('checkin.update', ['id' => $ejaculation->id]) }}">
|
|
|
|
{{ method_field('PUT') }}
|
|
|
|
{{ csrf_field() }}
|
|
|
|
|
|
|
|
<div class="form-row">
|
|
|
|
<div class="form-group col-sm-6">
|
|
|
|
<label for="date"><span class="oi oi-calendar"></span> 日付</label>
|
|
|
|
<input id="date" name="date" type="text" class="form-control {{ $errors->has('date') || $errors->has('datetime') ? ' is-invalid' : '' }}"
|
|
|
|
pattern="^20[0-9]{2}/(0[1-9]|1[0-2])/(0[1-9]|[12][0-9]|3[01])$" value="{{ old('date') ?? $ejaculation->ejaculated_date->format('Y/m/d') }}" required>
|
|
|
|
|
|
|
|
@if ($errors->has('date'))
|
|
|
|
<div class="invalid-feedback">{{ $errors->first('date') }}</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
<div class="form-group col-sm-6">
|
|
|
|
<label for="time"><span class="oi oi-clock"></span> 時刻</label>
|
|
|
|
<input id="time" name="time" type="text" class="form-control {{ $errors->has('time') || $errors->has('datetime') ? ' is-invalid' : '' }}"
|
|
|
|
pattern="^([01][0-9]|2[0-3]):[0-5][0-9]$" value="{{ old('time') ?? $ejaculation->ejaculated_date->format('H:i') }}" required>
|
|
|
|
|
|
|
|
@if ($errors->has('time'))
|
|
|
|
<div class="invalid-feedback">{{ $errors->first('time') }}</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
@if ($errors->has('datetime'))
|
|
|
|
<div class="form-group col-sm-12" style="margin-top: -1rem;">
|
|
|
|
<small class="text-danger">{{ $errors->first('datetime') }}</small>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
2018-01-08 08:56:17 +09:00
|
|
|
<div class="form-row">
|
|
|
|
<div class="form-group col-sm-12">
|
|
|
|
<label for="tagInput"><span class="oi oi-tags"></span> タグ</label>
|
2019-06-05 00:46:30 +09:00
|
|
|
<tag-input id="tagInput" name="tags" value="{{ old('tags') ?? $ejaculation->textTags() }}" :is-invalid="{{ $errors->has('tags') ? 'true' : 'false' }}"></tag-input>
|
2018-01-08 08:56:17 +09:00
|
|
|
<small class="form-text text-muted">
|
|
|
|
Tab, Enter, 半角スペースのいずれかで入力確定します。
|
|
|
|
</small>
|
|
|
|
|
|
|
|
@if ($errors->has('tags'))
|
|
|
|
<div class="invalid-feedback">{{ $errors->first('tags') }}</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-01-04 16:53:33 +09:00
|
|
|
<div class="form-row">
|
|
|
|
<div class="form-group col-sm-12">
|
|
|
|
<label for="link"><span class="oi oi-link-intact"></span> オカズリンク</label>
|
2019-06-11 22:16:40 +09:00
|
|
|
<input id="link" name="link" type="text" autocomplete="off" class="form-control {{ $errors->has('link') ? ' is-invalid' : '' }}"
|
|
|
|
placeholder="http://..." value="{{ old('link') ?? $ejaculation->link }}"
|
|
|
|
@change="onChangeLink">
|
2018-01-04 16:53:33 +09:00
|
|
|
<small class="form-text text-muted">
|
|
|
|
オカズのURLを貼り付けて登録することができます。
|
|
|
|
</small>
|
2018-01-05 00:26:48 +09:00
|
|
|
@if ($errors->has('link'))
|
|
|
|
<div class="invalid-feedback">{{ $errors->first('link') }}</div>
|
|
|
|
@endif
|
2018-01-04 16:53:33 +09:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-06-28 00:27:31 +09:00
|
|
|
<metadata-preview :metadata="metadata" :state="metadataLoadState"></metadata-preview>
|
2018-01-04 16:53:33 +09:00
|
|
|
<div class="form-row">
|
|
|
|
<div class="form-group col-sm-12">
|
|
|
|
<label for="note"><span class="oi oi-comment-square"></span> ノート</label>
|
|
|
|
<textarea id="note" name="note" class="form-control {{ $errors->has('note') ? ' is-invalid' : '' }}" rows="4">{{ old('note') ?? $ejaculation->note }}</textarea>
|
|
|
|
<small class="form-text text-muted">
|
|
|
|
最大 500 文字
|
|
|
|
</small>
|
|
|
|
@if ($errors->has('note'))
|
|
|
|
<div class="invalid-feedback">{{ $errors->first('note') }}</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-row mt-4">
|
|
|
|
<p>オプション</p>
|
|
|
|
<div class="form-group col-sm-12">
|
2018-06-12 22:44:07 +09:00
|
|
|
<div class="custom-control custom-checkbox mb-3">
|
|
|
|
<input id="isPrivate" name="is_private" type="checkbox" class="custom-control-input" {{ (is_bool(old('is_private')) ? old('is_private') : $ejaculation->is_private) ? 'checked' : '' }}>
|
|
|
|
<label class="custom-control-label" for="isPrivate">
|
|
|
|
<span class="oi oi-lock-locked"></span> このチェックインを非公開にする
|
2018-01-04 16:53:33 +09:00
|
|
|
</label>
|
|
|
|
</div>
|
2019-09-07 19:57:44 +09:00
|
|
|
<div class="custom-control custom-checkbox mb-3">
|
|
|
|
<input id="isTooSensitive" name="is_too_sensitive" type="checkbox" class="custom-control-input" {{ (is_bool(old('is_too_sensitive')) ? old('is_too_sensitive') : $ejaculation->is_too_sensitive) ? 'checked' : '' }}>
|
|
|
|
<label class="custom-control-label" for="isTooSensitive">
|
2019-09-08 02:39:18 +09:00
|
|
|
<span class="oi oi-warning"></span> チェックイン対象のオカズをより過激なオカズとして設定する
|
2019-09-07 19:57:44 +09:00
|
|
|
</label>
|
|
|
|
</div>
|
2018-01-04 16:53:33 +09:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="text-center">
|
|
|
|
<button class="btn btn-primary" type="submit">チェックイン</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endsection
|
|
|
|
|
|
|
|
@push('script')
|
2019-03-05 01:26:17 +09:00
|
|
|
<script src="{{ mix('js/checkin.js') }}"></script>
|
2019-06-11 22:16:40 +09:00
|
|
|
@endpush
|