edit.blade.php 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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. <div class="container py-5">
  27. <div class="row align-items-center">
  28. <div class="col-lg-8 col-md-10 mx-auto">
  29. <div class="card">
  30. <div class="card-header"><strong>{{ __('ویرایش دسته بندی ') }}</strong></div>
  31. <div class="card-body mx-lg-5 px-lg-3">
  32. <form method="POST" action="{{ route('categories.update',$category->id) }}">
  33. @csrf
  34. @if ($category)
  35. @method('PUT')
  36. @endif
  37. <div class="form-group">
  38. <label for="title">{{ __('category.title') }}</label><i class="required">&nbsp; *</i>
  39. <input id="title" type="text"
  40. class="form-control @error('title') is-invalid @enderror" name="title"
  41. value="{{$category->title}}" autocomplete="title" autofocus>
  42. @error('title')
  43. <span class="invalid-feedback" role="alert">
  44. <strong>{{ $message }}</strong>
  45. </span>
  46. @enderror
  47. </div>
  48. <div class="form-group">
  49. <label for="slug">{{ __('category.slug') }}</label>
  50. <input id="slug" type="text"
  51. class="form-control @error('slug') is-invalid @enderror"
  52. name="slug" value="{{$category->slug}}"
  53. autocomplete="slug" autofocus>
  54. @error('slug')
  55. <span class="invalid-feedback" role="alert">
  56. <strong>{{ $message }}</strong>
  57. </span>
  58. @enderror
  59. </div>
  60. <div class="form-group">
  61. <label for="parent">{{ __('category.parent') }}</label><i class="required">&nbsp; *</i>
  62. <input id="parent" type="text"
  63. class="form-control @error('parent') is-invalid @enderror"
  64. name="parent" value="{{$category->parent}}"
  65. autocomplete="parent" autofocus>
  66. @error('parent')
  67. <span class="invalid-feedback" role="alert">
  68. <strong>{{ $message }}</strong>
  69. </span>
  70. @enderror
  71. </div>
  72. <div class="form-group">
  73. <label for="category_type">{{ __('category.category_type') }}</label><i class="required">&nbsp; *</i>
  74. <select id="category_type" type="text"
  75. class="form-control @error('category_type') is-invalid @enderror"
  76. name="category_type"
  77. autocomplete="category_type">
  78. <option value="1">محصولات</option>
  79. <option value="0">دسته بندی</option>
  80. </select>
  81. @error('category_type')
  82. <span class="invalid-feedback" role="alert">
  83. <strong>{{ $message }}</strong>
  84. </span>
  85. @enderror
  86. </div>
  87. <div class="form-group">
  88. <label for="discription">{{ __('category.discription') }}</label><i class="required">&nbsp; *</i>
  89. <textarea id="discription" type="text"
  90. class="form-control @error('discription') is-invalid @enderror"
  91. name="discription"
  92. autocomplete="discription">{{$category->discription}}</textarea>
  93. @error('discription')
  94. <span class="invalid-feedback" role="alert">
  95. <strong>{{ $message }}</strong>
  96. </span>
  97. @enderror
  98. </div>
  99. <div class="form-group mb-0">
  100. <div class="">
  101. <button type="submit" class="btn btn-primary">
  102. {{ __('ویرایش دسته بندی') }}
  103. </button>
  104. <a href={{ route('categories.index') }} type="button"
  105. class="btn btn-warning">
  106. انصراف</a>
  107. </div>
  108. </div>
  109. </form>
  110. </div>
  111. <div class="card-footer">
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. </div>
  118. @endslot
  119. @slot('script')
  120. @endslot
  121. @endcomponent