|
@@ -29,14 +29,16 @@
|
|
|
<div class="card-header"><strong>{{ __('ویرایش دسته بندی ') }}</strong></div>
|
|
|
|
|
|
<div class="card-body mx-lg-5 px-lg-3">
|
|
|
- <form method="POST" action="{{ route('categories.store') }}">
|
|
|
+ <form method="POST" action="{{ route('categories.update',$category->id) }}">
|
|
|
@csrf
|
|
|
-
|
|
|
+ @if ($category)
|
|
|
+ @method('PUT')
|
|
|
+ @endif
|
|
|
<div class="form-group">
|
|
|
- <label for="title">{{ __('ویرایش نام دسته بندی') }}</label>
|
|
|
+ <label for="title">{{ __(' نام دسته بندی') }}</label>
|
|
|
<input id="title" type="text"
|
|
|
class="form-control @error('title') is-invalid @enderror" name="title"
|
|
|
- value="{{$category->title}}" required autocomplete="title" autofocus>
|
|
|
+ value="{{$category->title}}" autocomplete="title" autofocus>
|
|
|
|
|
|
@error('title')
|
|
|
<span class="invalid-feedback" role="alert">
|
|
@@ -47,10 +49,10 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
|
- <label for="slug"> {{ __('ویرایش نام مستعار دسته بندی ') }}</label>
|
|
|
+ <label for="slug"> {{ __('slug') }}</label>
|
|
|
<input id="slug" type="text"
|
|
|
class="form-control @error('slug') is-invalid @enderror"
|
|
|
- name="slug" value="{{$category->slug}}" required
|
|
|
+ name="slug" value="{{$category->slug}}"
|
|
|
autocomplete="slug" autofocus>
|
|
|
|
|
|
@error('slug')
|
|
@@ -61,10 +63,10 @@
|
|
|
|
|
|
</div>
|
|
|
<div class="form-group">
|
|
|
- <label for="parent"> {{ __('ویرایش کد دسته بندی ') }}</label>
|
|
|
+ <label for="parent"> {{ __(' parent ') }}</label>
|
|
|
<input id="parent" type="text"
|
|
|
class="form-control @error('parent') is-invalid @enderror"
|
|
|
- name="parent" value="{{$category->parent}}" required
|
|
|
+ name="parent" value="{{$category->parent}}"
|
|
|
autocomplete="parent" autofocus>
|
|
|
|
|
|
@error('parent')
|
|
@@ -76,11 +78,11 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
|
- <label for="category_type">{{ __(' ویرایش نوع دسته بندی') }}</label>
|
|
|
+ <label for="category_type">{{ __(' نوع دسته بندی') }}</label>
|
|
|
<select id="category_type" type="text"
|
|
|
class="form-control @error('category_type') is-invalid @enderror"
|
|
|
name="category_type"
|
|
|
- required autocomplete="category_type">
|
|
|
+ autocomplete="category_type">
|
|
|
<option value="1">محصولات</option>
|
|
|
<option value="0">دسته بندی</option>
|
|
|
</select>
|
|
@@ -94,11 +96,11 @@
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
- <label for="discription">{{ __('ویرایش توضیحات دسته بندی') }}</label>
|
|
|
+ <label for="discription">{{ __(' توضیحات دسته بندی') }}</label>
|
|
|
<textarea id="discription" type="text"
|
|
|
class="form-control @error('discription') is-invalid @enderror"
|
|
|
name="discription"
|
|
|
- required
|
|
|
+
|
|
|
autocomplete="discription">{{$category->discription}}</textarea>
|
|
|
|
|
|
@error('discription')
|
|
@@ -107,30 +109,14 @@
|
|
|
</span>
|
|
|
@enderror
|
|
|
</div>
|
|
|
-
|
|
|
-
|
|
|
- <div class="form-group">
|
|
|
- <label for="creator_id">{{ __(' نام ثبت کننده دسته بندی') }}</label>
|
|
|
- <input id="creator_id" type="text"
|
|
|
- class="form-control @error('creator_id') is-invalid @enderror"
|
|
|
- name="creator_id"
|
|
|
- value="{{ auth()->user()->name }}" required autocomplete="creator_id"
|
|
|
- readonly>
|
|
|
-
|
|
|
- @error('creator_id')
|
|
|
- <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 href={{ route('categories.index') }} type="button"
|
|
|
+ class="btn btn-warning">
|
|
|
انصراف</a>
|
|
|
|
|
|
</div>
|