OwlCyberSecurity - MANAGER
Edit File: add.blade.php
{{-- Note: User any library only in master/main.blade.php --}} {{-- DO NOT OVERRIDE UNNECESSARY LIBRARIES --}} {{-- Extending main layout --}} @extends('master.main') {{-- Content starts here --}} {{-- This section is already wrapped --}} @section('content') <style> .error_div { background-color: #ffc8c8; border-radius: 4px; padding: 0.4rem; padding-left: 1rem; color: #f11a1a; border: 1px solid #ff2a2a; } .success_div{ background-color: #aedcaf; border-radius: 4px; padding: 0.4rem; padding-left: 1rem; color: #1f6d26; border: 1px solid #248526; } </style> <div class="row p-2"> <div class="col-12"> <h3>Add Slider</h3> </div> </div> <div class="row p-2"> <div class="col-12"> <div class="card"> <div class="card-body"> <div class="row"> @if (!empty($errors->all())) <div class="col-12 error_div"> {{ $errors->first() }} </div> @endif @if (session()->has('message')) <div class="col-12 error_div"> {{ session()->get('message') }} </div> @endif @if (session()->has('success')) <div class="col-12 success_div"> {{ session()->get('success') }} </div> @endif </div> <form action="{{ route('post_sliders_add.add_sliders') }}" method="POST" autocomplete="off" enctype="multipart/form-data"> @csrf <div class="row"> <div class="col-lg-6 col-md-6 col-sm-12"> <label for="heading" class="form-label">Heading</label> <input type="text" name="heading" id="heading" class="form-control" autofocus value="{{ old('heading') ? old('heading') : '' }}"> </div> <div class="col-lg-6 col-md-6 col-sm-12"> <label for="link" class="form-label">Link</label> <input type="text" name="link" id="link" class="form-control" value="{{ old('link') ? old('link') : '' }}"> </div> </div> <div class="row pt-2"> <div class="col-lg-6 col-md-6 col-sm-12"> <label for="price" class="form-label">Price</label> <input type="number" min="0" max="99999" step="any" name="price" id="price" class="form-control" value="{{ old('price') ? old('price') : '' }}"> </div> </div> <div class="row pt-2"> <div class="col-12"> <label for="description" class="form-label">Description</label> <textarea name="description" id="description">@if (old('description')){{ old('description') }}@endif</textarea> </div> </div> <div class="row pt-2"> <div class="col-lg-6 col-md-6 col-sm-12"> <label for="image" class="form-label">Image</label> <div> <input type="file" name="image" id="image"> </div> </div> </div> <div class="row mt-2"> <div class="col-lg-6 col-md-6 col-sm-12"> <label for="status" class="form-label">Status</label> <br> <label><input type="radio" name="status" {{ (old('status') != null && old('status') == 1 ? 'checked' : '') }} value="1" style="vertical-align: middle;" checked> Active </label> <label><input type="radio" name="status" {{ (old('status') != null && old('status') == 0 ? 'checked' : '') }} value="0" style="vertical-align: middle;"> Inactive</label> </div> </div> <div class="row pt-4"> <div class="col-lg-6 col-md-6 col-sm-12"> <button type="submit" class="custom-blue-btn width-5-rem ">Add</button> <a href="{{ route('get_sliders_index.view_sliders') }}"><button type="button" class="custom-grey-btn width-5-rem">Cancel</button></a> </div> </div> </form> </div> </div> </div> </div> <script> // document ready start $(document).ready(function(){ $('#description').summernote({ placeholder: '<small>Description...</small>', tabsize: 2, height: 100, // toolbar: [ // // [groupName, [list of button]] // ['style', ['bold', 'italic', 'underline']], // ['font', ['strikethrough']], // ['fontsize', ['fontsize']], // ['color', ['color']], // ], disableDragAndDrop: false, callbacks: { onImageUpload: function (data) { data.pop(); } }, }); }); // document ready end // error and success div timouts setTimeout(() => { $('.error_div').fadeOut('slow'); $('.success_div').fadeOut('slow'); }, 3000); </script> @endsection {{-- Content ends here --}} {{-- Note: User any library only in master/main.blade.php --}} {{-- DO NOT OVERRIDE UNNECESSARY LIBRARIES --}}