123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164 |
- @component('panel.layouts.component', ['title' => 'ویرایش دسته جدید'])
- @slot('style')
- <style>
- .card-header {
- text-align: center !important;
- }
- .form-control {
- background-color: hsl(315, 22%, 86%);
- }
- .required {
- color: red;
- }
- .py-5 {
- padding-top: 0 !important;
- }
- </style>
- @endslot
- @slot('subject')
- <h1><i class="fa fa-users"></i> ویرایش دسته بندی </h1>
- @endslot
- {{-- @slot('breadcrumb')--}}
- {{-- <a href=""><li class="breadcrumb-item"> دسته بندی / </li></a>--}}
- {{-- <a href=""><li class="breadcrumb-item"> ویرایش دسته بندی/ </li></a>--}}
- {{-- <li class="breadcrumb-item"> {{$category->title}} </li>--}}
- {{-- @endslot--}}
- @slot('breadcrumb')
- <li class="breadcrumb-item"> {{$category->title}} </li>
- <li class="breadcrumb-item"> ویرایش دسته بندی / </li>
- <a href="{{ route('categories.index') }}" ><li class="breadcrumb-item"> دسته بندی </li></a>
- @endslot
- @slot('content')
- <div class="auth-background h-auto py-5">
- @component('product::components.message')
- @endcomponent
- <div class="container py-5">
- <div class="row align-items-center">
- <div class="col-lg-12 col-md-12 mx-auto">
- <div class="card">
- <div class="card-header"><strong>{{ __('ویرایش دسته بندی ') }}</strong></div>
- <div class="card-body mx-lg-5 px-lg-3">
- <form method="POST" action="{{ route('categories.update',$category->id) }}">
- @csrf
- @if ($category)
- @method('PUT')
- @endif
- <div class="form-group">
- <label for="title">{{ __('category.title') }}</label><i class="required"> *</i>
- <input id="title" type="text"
- class="form-control @error('title') is-invalid @enderror" name="title"
- value="{{$category->title}}" autocomplete="title" autofocus>
- @error('title')
- <span class="invalid-feedback" role="alert">
- <strong>{{ $message }}</strong>
- </span>
- @enderror
- </div>
- <div class="form-row">
- <div class="form-group col-lg-4">
- <label for="slug">{{ __('category.slug') }}</label>
- <input id="slug" type="text"
- class="form-control @error('slug') is-invalid @enderror"
- name="slug" value="{{$category->slug}}"
- autocomplete="slug" autofocus>
- @error('slug')
- <span class="invalid-feedback" role="alert">
- <strong>{{ $message }}</strong>
- </span>
- @enderror
- </div>
- <div class="col-lg-4">
- <label>دسته بندی والد:</label>
- <select name="parent_id"
- class="form-control select2 @error('parent_id') is-invalid @enderror" >
- <option value="0">--</option>
- {!! category_select_options( $categories, $category->parent_id ) !!}
- </select>
- @error('parent_id')
- <span class="invalid-feedback" role="alert">
- <strong>{{ $message }}</strong>
- </span>
- @enderror
- </div>
- <div class="form-group col-lg-4">
- <label for="category_type">{{ __('category.category_type') }}</label><i class="required"> *</i>
- <select id="category_type" type="text"
- class="form-control @error('category_type') is-invalid @enderror"
- name="category_type"
- autocomplete="category_type">
- <option value="">انتخاب کنید</option>
- <option value="0" @if ($category->category_type === 'محصولات') selected='selected'@endif>محصولات</option>
- <option value="1" @if ($category->category_type === 'اخبار') selected='selected'@endif>اخبار</option>
- <option value="2" @if ($category->category_type === 'مطالب') selected='selected'@endif>مطالب</option>
- </select>
- @error('category_type')
- <span class="invalid-feedback" role="alert">
- <strong>{{ $message }}</strong>
- </span>
- @enderror
- </div>
- </div>
- <div class="form-group">
- <label for="discription">{{ __('category.discription') }}</label><i class="required"> *</i>
- <textarea id="discription" type="text"
- class="form-control editor @error('discription') is-invalid @enderror"
- name="discription"
- autocomplete="discription">{{$category->discription}}</textarea>
- @error('discription')
- <span class="invalid-feedback" role="alert">
- <strong>{{ $message }}</strong>
- </span>
- @enderror
- </div>
- <div class="form-group mb-0">
- <div class="">
- <button type="submit" class="btn btn-primary">
- {{ __('ویرایش دسته بندی') }}
- </button>
- <a href={{ route('categories.index') }} type="button"
- class="btn btn-warning">
- انصراف</a>
- </div>
- </div>
- </form>
- </div>
- <div class="card-footer">
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- @endslot
- @slot('script')
- @endslot
- @endcomponent
|