OwlCyberSecurity - MANAGER
Edit File: edit.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>Edit Network</h3> </div> <div class="col" id="networkEditMessageDiv" style="display: none;"></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_networks_edit.edit_networks' , ['id' => $network->id]) }}" 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="name" class="form-label">Name</label> <input type="text" name="name" id="name" class="form-control" autofocus value="{{ old('name') ?? $network->name }}"> </div> <div class="col-lg-6 col-md-6 col-sm-12"> <label for="title" class="form-label">Title</label> <input type="text" name="title" id="title" class="form-control" autofocus value="{{ old('title') ?? $network->meta_title }}"> </div> </div> <div class="row pt-2"> <div class="col-lg-6 col-md-6 col-sm-12"> <label for="keywords" class="form-label">Keywords</label> <select name="keywords[]" id="keywords" class="form-control" multiple> @if (is_array(old('keywords'))) @foreach (old('keywords') as $keyword) <option value="{{ $keyword }}" selected="selected">{{ $keyword }}</option> @endforeach @elseif(is_array(explode(',',$network->meta_keywords)) && !empty($network->meta_keywords)) @foreach (explode(',',$network->meta_keywords) as $keyword) <option value="{{ $keyword }}" selected="selected">{{ $keyword }}</option> @endforeach @endif </select> <small><i>comma separated keywords</i></small> </div> </div> <div class="row pt-2"> <div class="col-12"> <label for="description" class="form-label">Description</label> <textarea name="description" class="form-control" id="description">@if (old('description')){{ old('description') }}@elseif(!empty($network->meta_description)){{ $network->meta_description }}@endif</textarea> </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' : ($network->status == 1 ? 'checked' : '')) }} value="1" style="vertical-align: middle;"> Active </label> <label><input type="radio" name="status" {{ (old('status') != null && old('status') == 0 ? 'checked' : ($network->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 " id="form-submit-button">Save</button> <a href="{{ route('get_networks_index.view_networks') }}"><button type="button" class="custom-grey-btn width-5-rem">Cancel</button></a> </div> </div> </form> </div> </div> </div> </div> <script> // for messages function NetworkEditMessage(type = '' , message = '' , timeout = 3000){ var selectedClass = ''; var holder = $('#networkEditMessageDiv'); if(type.toLowerCase() == 'success'){ selectedClass = 'success_div'; } else { selectedClass = 'error_div'; } var ht = `<div class="${selectedClass}">${message}</div>`; holder.html(ht); holder.hide().show().fadeIn('fast').delay(timeout).fadeOut('slow' , function(){ $(this).stop(true); }); } // 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(); // } // }, // }); $('#tags , #keywords').select2({ tags: true, multiple: true, tokenSeparators: [','] }); }); // 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 --}}