@if(Session::has('success'))
    <div class="alert alert-success alert-dismissible" role="alert">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
        {{ Session::get('success') }}
    </div>
@elseif(Session::has('error'))
    <div class="alert alert-danger alert-dismissible">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
        <h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
        {!! Session::get('error') !!}
    </div>
@elseif(isset($errorMsg))
    <div class="alert alert-danger alert-dismissible">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
        <h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
        {!! $errorMsg !!}
    </div>
@endif
<div class="card-header">
    @if($isInfo)
        <a href="{{route('seal_add')}}" class="btn btn-lg btn-success">{{__('登録')}}</a>
        <a href="{{route('seal_edit',['id'=>$seal_issueid])}}" class="btn btn-lg btn-danger">{{__('編集')}}</a>
    @else
        <button type="submit" class="btn btn-lg btn-danger register" >{{__('保存')}}</button>
    @endIf
</div>
<div class="card-body">
    <div class="row">
        @if($isEdit || $isInfo)
            <div class="form-group col-3">
                <label>{{__('validation.attributes.seal_issueid')}}</label>
            </div>
            <div class="form-group col-9">
                <div class="input-group">
                    <input type="text" class="form-control form-control-lg"
                           placeholder="{{__('validation.attributes.seal_issueid')}}" readonly
                           value="{{$seal_issueid}}">
                </div>
            </div>
        @endIf
        <div class="form-group col-3">
            <label @if(!$isInfo) class="required" @endif>{{__('validation.attributes.contract_id')}}</label>
        </div>
        <div class="form-group col-9">
            <div class="input-group">
                <input type="text" class="form-control form-control-lg"
                       placeholder="{{__('validation.attributes.contract_id')}}"
                       name="contract_id" @if($isInfo) readonly @endif
                       value="{{$contract_id}}">
            </div>
        </div>

        <div class="form-group col-3">
            <label>{{__('validation.attributes.seal_day')}}</label>
        </div>
        <div class="form-group col-9">
            <div class="input-group">
                <input type="date" name="seal_day" value="@if($seal_day){{date('Y-m-d',strtotime($seal_day))}}@endif"
                       @if($isInfo) readonly @endif class="form-control form-control-lg"/>
            </div>
        </div>

        <!-- 発行回数 -->
        <div class="form-group col-3">
            <label>{{__('validation.attributes.contract_seal_issue')}}</label>
        </div>
        <div class="form-group col-9">
            <div class="input-group">
                <input type="text" class="form-control form-control-lg"
                       placeholder="{{__('validation.attributes.contract_seal_issue')}}"
                       name="contract_seal_issue" @if($isInfo) readonly @endif
                       value="{{$contract_seal_issue}}">
            </div>
        </div>


        <div class="form-group col-3">
            <label>{{__('validation.attributes.seal_reason')}}</label>
        </div>
        <div class="form-group col-9">
            <div class="input-group">
                <input type="text" class="form-control form-control-lg"
                       placeholder="{{__('validation.attributes.seal_reason')}}"
                       name="seal_reason" @if($isInfo) readonly @endif
                       value="{{$seal_reason}}">
            </div>
        </div>
    </div>
    @if($isInfo)
        <a href="{{route('seal_add')}}" class="btn btn-lg btn-success">{{__('登録')}}</a>
        <a href="{{route('seal_edit',['id'=>$seal_issueid])}}" class="btn btn-lg btn-danger">{{__('編集')}}</a>
    @else
        <button type="submit" class="btn btn-lg btn-danger register" >{{__('保存')}}</button>
    @endIf
</div>

