You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
xshop/resources/views/admin/menus/menu-form.blade.php

81 lines
2.7 KiB
PHTML

@extends('admin.templates.panel-form-template')
@section('title')
@if(isset($item))
{{__("Edit menu")}} [{{$item->name}}]
@else
{{__("Add new menu")}}
@endif -
@endsection
@section('form')
<div class="row">
<div class="col-lg-3">
@include('components.err')
<div class="item-list mb-3">
<h3 class="p-3">
<i class="ri-message-3-line"></i>
{{__("Tips")}}
</h3>
<ul>
@if(isset($item))
<li>
{{__("You can add item after create menu")}}
</li>
@else
<li>
{{__("Added items view depends on theme part")}}
</li>
@endif
</ul>
</div>
</div>
<div class="col-lg-9 ps-xl-1 ps-xxl-1">
<div class="general-form ">
<h1>
@if(isset($item))
{{__("Edit menu")}} [{{$item->name}}]
@else
{{__("Add new menu")}}
@endif
</h1>
<div class="row">
<div class="col-md-12 mt-3">
<div class="form-group">
<label for="name">
{{__('Name')}}
</label>
<input name="name" type="text"
id="name"
class="form-control @error('name') is-invalid @enderror"
placeholder="{{__('Name')}}"
value="{{old('name',$item->name??null)}}"/>
</div>
</div>
<div class="col-md-12">
<label> &nbsp;</label>
<input name="" type="submit" class="btn btn-primary mt-2" value="{{__('Save')}}"/>
</div>
</div>
@if(isset($item))
<h4 class="px-4">
{{__("Menu items")}}
</h4>
<menu-item-input
:morphs='@json(\App\Models\Menu::$mrohps)'
morph-search-link="{{route('v1.morph.search')}}"
xlang="{{config('app.locale')}}"
:items='@json($item->items)'
menu-id="{{$item->id}}"
></menu-item-input>
@endif
</div>
</div>
</div>
@endsection