Current File : //home/tradevaly/text.tradevaly.com.bd/resources/views/backend/pages/news/discount_edit.blade.php
@extends('backend.ayaan.master')

@section('title') Add Categories @endsection
@section('css')
    <!-- select2 css -->
    <link href="{{ asset('/assets/libs/select2/select2.min.css') }}" rel="stylesheet" type="text/css" />

    <!-- dropzone css -->
    <link href="{{ asset('/assets/libs/dropzone/dropzone.min.css') }}" rel="stylesheet" type="text/css" />
    <style>
        .image_preview_container {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 280px));
  justify-content: center;
  padding: 25px;
}
.image_preview_container img {
  width: 100%;
  border: 1px solid #0001;
  box-shadow: 0 2px 15px #0001, 0 2px 8px #0001;
  border-radius: 4px;
  aspect-ratio: 1/1;
  object-fit: cover;
}
    </style>
@endsection
@section('content')

    @component('components.breadcrumb')
        @slot('li_1') Dashboards @endslot
        @slot('title') Edit Discount @endslot
    @endcomponent

    <div class="row">
    <div class="col-md-12">
       <div class="card">
                <div class="card-body">

                    <h4 class="card-title">Edit Discount Section</h4>
                    <p class="card-title-desc">Fill all information below</p>

                     <form action="{{route('admin.news.discount_update')}}" method="POST" enctype="multipart/form-data">
                         @csrf
                        <div class="row">
                            
                            
                            <div class="col-sm-12">
                                <div class="mb-3">
                                    <div class="0 box">
                                    <label for="metadescription">{{translate('Link')}}</label>
                                     <input id="metatitle" name="discount_link" type="text" class="form-control" value="{{ settings()->discount_link }}" >
                                     </div>
                                     <img src="{{asset('storage/images/admin/discount/'.settings()->discount_img)}}" style='height:200px; width:100%; background:linear-gradient(to right,#cba800,#1f5c81,#5ca300) !important;' class="img-fluid p-3 mt-5 mb-5"/>
                                     <div class="1 box"> 
                                     
                                    <label for="metadescription">{{translate('Discount Images')}}</label>
                                     <input id="metatitle" name="discount_img" type="file" class="form-control" >
                                     </div>
                                </div>
                            </div>
                            
                            
                           
                        
                            <div class="col-sm-12">
                                <div class="mb-3">
                                    <label for="metadescription">{{translate('Status')}}</label>
                                     <select name="discount_status" class="form-control">
                                         <option {{ settings()->status == 0 ?? "selected" }} value="0">Inactive</option>
                                         <option {{ settings()->status == 1 ?? "selected" }} value="1" selected>Active</option>
                                     </select>
                                </div>
                            </div>
                        
                        </div>

                        <div class="d-flex flex-wrap gap-2">
                            <button type="submit" class="btn btn-primary waves-effect waves-light">Save Changes</button>
                            <a href="{{ route('admin.news.index') }}" class="btn btn-secondary waves-effect waves-light">Cancel</a>
                        </div>
                    </form>

                </div>
            </div> 
        
    </div>
  </div>
      
@stop

@section('script')
<script src="{{ asset('/assets/libs/select2/select2.min.js') }}"></script>
     <script src="{{ asset('assets/libs/tinymce/tinymce.min.js') }}"></script>
    
    <!-- dropzone plugin -->
    <script src="{{ asset('/assets/libs/dropzone/dropzone.min.js') }}"></script>
    <script src="{{ asset('assets/js/pages/form-editor.init.js') }}"></script>
    <!-- init js -->
    <script src="{{ asset('/assets/js/pages/ecommerce-select2.init.js') }}"></script>

@endsection