Skip to content

Commit

Permalink
#82 add the slags and the status to the form
Browse files Browse the repository at this point in the history
  • Loading branch information
SaintAngeLs committed Jul 3, 2024
1 parent 8d6ee23 commit 432b7ec
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ protected function validateMenuItem(Request $request)
'visibility_end' => 'nullable|date',
'banner' => 'required|string',
'menu_permissions' => 'nullable|array',
'slug' => 'required|string|max:255',
'status' => 'required|boolean',
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
<input type="text" id="name" name="name" value="{{ $isEdit ? $menuItem->name : '' }}" required>
</div>

<div class="form-group">
<label for="slug">Tagi (oddzielone przecinkami):</label>
<input type="text" id="slug" name="slug" value="{{ $isEdit ? $menuItem->slug : '' }}" required>
</div>

<div class="form-group">
<label for="parent_id">Element nadrzędny:</label>
<select id="parent_id" name="parent_id">
Expand Down Expand Up @@ -60,6 +65,15 @@
</select>
<div class="invalid-feedback"></div>
</div>

<div class="form-group">
<label for="status">Status:</label>
<select id="status" name="status" required>
<option value="1" @if($isEdit && $menuItem->status == 1) selected @endif>Aktywny</option>
<option value="0" @if($isEdit && $menuItem->status == 0) selected @endif>Nieaktywny</option>
</select>
<div class="invalid-feedback"></div>
</div>
</div>
</div>

Expand Down

0 comments on commit 432b7ec

Please sign in to comment.