edit.blade.php 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. @component('panel.layouts.component', ['title' => 'ویرایش دسته جدید'])
  2. @slot('style')
  3. <style>
  4. .card-header {
  5. text-align: center !important;
  6. }
  7. .form-control {
  8. background-color: hsl(315, 22%, 86%);
  9. }
  10. .required {
  11. color: red;
  12. }
  13. .py-5 {
  14. padding-top: 0 !important;
  15. }
  16. </style>
  17. @endslot
  18. @slot('subject')
  19. <h1><i class="fa fa-users"></i> ویرایش دسته بندی </h1>
  20. @endslot
  21. @slot('breadcrumb')
  22. <li class="breadcrumb-item">ویرایش دسته بندی محصولات</li>
  23. @endslot
  24. @slot('content')
  25. <div class="auth-background h-auto py-5">
  26. @component('product::components.message')
  27. @endcomponent
  28. <div class="container py-5">
  29. <div class="row align-items-center">
  30. <div class="col-lg-12 col-md-12 mx-auto">
  31. <div class="card">
  32. <div class="card-header"><strong>{{ __('ویرایش دسته بندی ') }}</strong></div>
  33. <div class="card-body mx-lg-5 px-lg-3">
  34. <form method="POST" action="{{ route('categories.update',$category->id) }}">
  35. @csrf
  36. @if ($category)
  37. @method('PUT')
  38. @endif
  39. <div class="form-group">
  40. <label for="title">{{ __('category.title') }}</label><i class="required">&nbsp; *</i>
  41. <input id="title" type="text"
  42. class="form-control @error('title') is-invalid @enderror" name="title"
  43. value="{{$category->title}}" autocomplete="title" autofocus>
  44. @error('title')
  45. <span class="invalid-feedback" role="alert">
  46. <strong>{{ $message }}</strong>
  47. </span>
  48. @enderror
  49. </div>
  50. <div class="form-group">
  51. <label for="slug">{{ __('category.slug') }}</label>
  52. <input id="slug" type="text"
  53. class="form-control @error('slug') is-invalid @enderror"
  54. name="slug" value="{{$category->slug}}"
  55. autocomplete="slug" autofocus>
  56. @error('slug')
  57. <span class="invalid-feedback" role="alert">
  58. <strong>{{ $message }}</strong>
  59. </span>
  60. @enderror
  61. </div>
  62. <div class="form-group">
  63. <label for="parent">{{ __('category.parent') }}</label><i class="required">&nbsp; *</i>
  64. <input id="parent" type="text"
  65. class="form-control @error('parent') is-invalid @enderror"
  66. name="parent" value="{{$category->parent}}"
  67. autocomplete="parent" autofocus>
  68. @error('parent')
  69. <span class="invalid-feedback" role="alert">
  70. <strong>{{ $message }}</strong>
  71. </span>
  72. @enderror
  73. </div>
  74. <div class="form-group">
  75. <label for="category_type">{{ __('category.category_type') }}</label><i class="required">&nbsp; *</i>
  76. <select id="category_type" type="text"
  77. class="form-control @error('category_type') is-invalid @enderror"
  78. name="category_type"
  79. autocomplete="category_type">
  80. <option value="">انتخاب کنید</option>
  81. <option value="0" @if ($category->category_type === 'محصولات') selected='selected'@endif>محصولات</option>
  82. <option value="1" @if ($category->category_type === 'اخبار') selected='selected'@endif>اخبار</option>
  83. <option value="2" @if ($category->category_type === 'مطالب') selected='selected'@endif>مطالب</option>
  84. </select>
  85. @error('category_type')
  86. <span class="invalid-feedback" role="alert">
  87. <strong>{{ $message }}</strong>
  88. </span>
  89. @enderror
  90. </div>
  91. <div class="form-group">
  92. <label for="discription">{{ __('category.discription') }}</label><i class="required">&nbsp; *</i>
  93. <textarea id="discription" type="text"
  94. class="form-control @error('discription') is-invalid @enderror"
  95. name="discription"
  96. autocomplete="discription">{{$category->discription}}</textarea>
  97. @error('discription')
  98. <span class="invalid-feedback" role="alert">
  99. <strong>{{ $message }}</strong>
  100. </span>
  101. @enderror
  102. </div>
  103. <div class="form-group mb-0">
  104. <div class="">
  105. <button type="submit" class="btn btn-primary">
  106. {{ __('ویرایش دسته بندی') }}
  107. </button>
  108. <a href={{ route('categories.index') }} type="button"
  109. class="btn btn-warning">
  110. انصراف</a>
  111. </div>
  112. </div>
  113. </form>
  114. </div>
  115. <div class="card-footer">
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. </div>
  122. @endslot
  123. @slot('script')
  124. @endslot
  125. @endcomponent