Lager-v3/resources/views/notes/edit.blade.php

49 lines
2.0 KiB
PHP

@extends('Layouts.master')
@section('content')
<div class="main-container pb-4" id="tables">
<form action="{{route('notes.update',['note' => $data->id])}}" method="post">
<div class="mb-3 row">
<label for="type_input" class="col-2 col-form-label fw-bold">@lang('type') : </label>
<div class="col-10 align-middle">
<select name="type" id="type_input" class="form-select" required>
@foreach($types as $type)
<option value="{{$type->id}}"
@if(old('type') !== null)
@if(old('type') == $type->id)
selected
@endif
@elseif(isset($data->note_type_id))
@if($data->note_type_id == $type->id)
selected
@endif
@endif
>
@lang($type->name)
</option>
@endforeach
</select>
</div>
</div>
<div class="mb-3 row">
<label for="note_input" class="col-2 col-form-label fw-bold">@lang('note') : </label>
<div class="col-10 align-middle">
@if(old('note') !== null)
<textarea name="note" id="note_input" class="form-control" required>{{old('note')}}</textarea>
@elseif(isset($data->note))
<textarea name="note" id="note_input" class="form-control" required>{{$data->note}}</textarea>
@endif
</div>
</div>
@include('Partials.Form.Input.Submit.submit_update')
</form>
@can('notes_delete')
@include('Partials.Form.Input.Modal.delete')
@endcan
</div>
@endsection
@section('scripting')
@endsection