-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedit_note.blade.php
More file actions
59 lines (52 loc) · 2.43 KB
/
Copy pathedit_note.blade.php
File metadata and controls
59 lines (52 loc) · 2.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
@extends('layouts.main_layout')
@section('content')
<div class="container mt-5">
<div class="row justify-content-center">
<div class="col">
@include('top_bar')
<!-- label and cancel -->
<div class="row">
<div class="col">
<p class="display-6 mb-0">EDIT NOTE</p>
</div>
<div class="col text-end">
<a href="{{ route('home') }}" class="btn btn-outline-danger">
<i class="fa-solid fa-xmark"></i>
</a>
</div>
</div>
<!-- form -->
<form action="{{ route('editNoteSubmit') }}" method="post">
@csrf
<input type="hidden" name="note_id" value="{{ Crypt::encrypt($note->id) }}">
<div class="row mt-3">
<div class="col">
<div class="mb-3">
<label class="form-label">Note Title</label>
<input type="text" class="form-control bg-primary text-white" name="text_title" value="{{ old('text_title', $note->title) }}">
{{-- show error --}}
@error('text_title')
<div class="text-danger">{{ $message }}</div>
@enderror
</div>
<div class="mb-3">
<label class="form-label">Note Text</label>
<textarea class="form-control bg-primary text-white" name="text_note" rows="5">{{ old('text_note', $note->text) }}</textarea>
{{-- show error --}}
@error('text_note')
<div class="text-danger">{{ $message }}</div>
@enderror
</div>
</div>
</div>
<div class="row mt-3">
<div class="col text-end">
<a href="{{ route('home') }}" class="btn btn-primary px-5"><i class="fa-solid fa-ban me-2"></i>Cancel</a>
<button type="submit" class="btn btn-secondary px-5"><i class="fa-regular fa-circle-check me-2"></i>Update</button>
</div>
</div>
</form>
</div>
</div>
</div>
@endsection