Server : Apache System : Linux host44.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64 User : vapecompany ( 2719) PHP Version : 7.4.33 Disable Function : NONE Directory : /proc/thread-self/root/home/vapecompany/demo.vapecompany.com.bd/resources/views/backend/document/ |
Upload File : |
@extends('backend.layout.app') @section('content') <!-- ============================================================== --> <!-- Page wrapper --> <!-- ============================================================== --> <div class="page-wrapper"> <!-- ============================================================== --> <!-- Bread crumb and right sidebar toggle --> <!-- ============================================================== --> <div class="page-breadcrumb"> <div class="row"> <div class="col-5 align-self-center"> <h4 class="page-title">Customer Type Edit</h4> <div class="d-flex align-items-center"> <nav aria-label="breadcrumb"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="#">Home</a></li> <li class="breadcrumb-item active" aria-current="page">Customer Type</li> </ol> </nav> </div> </div> </div> </div> <!-- ============================================================== --> <!-- End Bread crumb and right sidebar toggle --> <!-- ============================================================== --> <!-- ============================================================== --> <!-- Container fluid --> <!-- ============================================================== --> <div class="container-fluid"> <!-- ============================================================== --> <!-- Start Page Content --> <!-- ============================================================== --> <div class="row"> <div class="col-12"> <div class="card"> <div class="card-body"> <form id="addBrand"> @csrf <h4 class="card-title">Edit Type</h4> @include('backend.layout.verror_message') <div class="form-group row"> <label for="address" class="col-sm-3 text-right control-label col-form-label">Brand</label> <div class="col-sm-9 error_select"> <select name="document_type" class="form-control select2"> <option value="">Select</option> <option @if($documents->document_type == "Customer") Selected @endif value="Customer">Customer</option> <option @if($documents->document_type == "Brand") Selected @endif value="Brand">Brand</option> <option @if($documents->document_type == "Model") Selected @endif value="Model">Model</option> </select> </div> </div> <div class="form-group row"> <label for="com1" class="col-sm-3 text-right control-label col-form-label">Docuemnt Name</label> <div class="col-sm-6"> <input value="{{$documents->document_name}}" name="document_name" type="text" class="form-control" id="com1" placeholder="Brand Name"> </div> </div> <div class="form-group row"> <label class="col-sm-3 text-right control-label col-form-label">Docuement</label> <div class="col-sm-9"> <div class="input-group mb-3"> <!-- <div class="input-group-prepend"> <span class="input-group-text">Upload</span> </div> --> <div class="custom-file"> <input name="company_logo_text" type="file" class="custom-file-input" id="company_logo_text"> <label class="custom-file-label" for="company_logo_text">Choose file</label> </div> </div> </div> </div> <div class="form-group mb-0 text-right"> <button type="submit" class="btn btn-info waves-effect waves-light">Save</button> <button type="submit" class="btn btn-dark waves-effect waves-light">Cancel</button> </div> </form> </div> </div> </div> </div> <!-- ============================================================== --> <!-- End PAge Content --> <!-- ============================================================== --> <!-- ============================================================== --> <!-- Right sidebar --> <!-- ============================================================== --> <!-- .right-sidebar --> <!-- ============================================================== --> <!-- End Right sidebar --> <!-- ============================================================== --> </div> <!-- ============================================================== --> <!-- End Container fluid --> @endsection @section('script') <script src="{{url('public/backend/js/jquery.validate.min.js')}}"></script> <script> jQuery(document).ready(function(){ $("#addBrand").validate({ rules: { customer_type_name: { required: true, maxlength: 150, }, customer_type_name: { required: true, maxlength: 150, }, customer_type_name: { required: true, maxlength: 150, }, }, submitHandler: submitForm }); function submitForm() { var data = $("#addBrand").serialize(); $.ajax({ type : 'POST', url : "{{url('edit_customer_type')}}", data : data, dataType : 'json', success : function (data) { //console.log(data); if(data.errors=='0'){ $('.alert-success').show(); $('.alert-danger').hide(); $('.alert-success').append('<p>'+data.success+'</p>'); }else{ var val=""; $.each(data.errors, function(key, value){ $('.alert-danger').show(); $('.alert-success').hide(); val+= '<p>'+value+'</p>'; }); $('.alert-danger').html(val); } },error: function(response) { //console.log(response); } }); return false; } }); </script> @endsection