Backups Created:
/home/japatmex/public_html/wp-content/edit-wolf.php
Savvy
W
olf -
MANAGER
Edit File: orders_status.php
<style> .page-title { padding: 2rem 0 !important;} .onoffswitch { position: relative; width: 56px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; } .onoffswitch-checkbox { display: none; } .onoffswitch-label { display: block; overflow: hidden; cursor: pointer; border: 2px solid #FFFFFF; border-radius: 20px; } .onoffswitch-inner { display: block; width: 200%; margin-left: -100%; transition: margin 0.3s ease-in 0s; } .onoffswitch-inner:before, .onoffswitch-inner:after { display: block; float: left; width: 50%; height: 22px; padding: 0; line-height: 22px; font-size: 12px; color: black; font-family: Trebuchet, Arial, sans-serif; font-weight: bold; box-sizing: border-box; } .onoffswitch-inner:before { content: "ON"; padding-left: 0; background-color: #26a69a; color: #FFFFFF; } .onoffswitch-inner:after { content: "OFF"; padding-right: 6px; background-color: rgb(38 50 56); color: #FFFFFF; text-align: right; } .onoffswitch-switch { display: block; width: 12px; margin: 5px; background: #FFFFFF; position: absolute; top: 0; bottom: 0; right: 30px; border: 2px solid #FFFFFF; border-radius: 20px; transition: all 0.3s ease-in 0s; } .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner { margin-left: 0; } .onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch { right: 0px; } </style> <!-- Page header --> <div class="page-header border-bottom-0 mt-3 service_top_links ml-2"></div> <div class="page-header border-bottom-0 services_header"> <div class="page-header-content header-elements-md-inline"> <div class="page-title d-flex"> <h4><a href="javascript:void(0)" class="BackButton-Link" onclick="goBack()"><i class="icon-arrow-left52 mr-2"></i></a> <?=$page_title?></h4> </div> <div class="actions"> <a href="javascript:;" data-toggle="modal" data-target="#AddStatus">+ Add Status</a> </div> </div> </div> <!-- /page header --> <!-- Content area --> <div class="content pt-0"> <div class="card"> <div class="row"> <div class="col-12 col-sm-12 col-md-12 col-lg-12 col-12"> <div class="card-body"> <?php if($this->session->flashdata('response_msg')) { $message = $this->session->flashdata('response_msg'); ?> <div class="<?=$message['class']?>" role="alert"> <?=$message['message']?> </div> <?php } ?> <div class="form-group row"> <div class="col-lg-12"> <div class="table-responsive"> <table class="table table-striped table-bordered table-advance table-hover" width="100%"> <thead> <tr> <th>#</th> <th>Title</th> <th>Status</th> <th class="cat_action_list">Action</th> </tr> </thead> <tbody> <?php $i = 0; foreach ($order_statuses as $key => $row) { ?> <tr class="item_holder"> <td align="center"><?= ($i+1) ?></td> <td align="center"> <?php echo $row->title;?> </td> <td align="center"> <?php switch ($row->status) { case '1': $_bnt_class='label-primary'; break; case '0': $_bnt_class='label-warning'; break; } ?> <span class="label <?=$_bnt_class?>"><?=($row->status == 1 ? 'Active' : 'In-Active')?></span> </td> <td align="center"> <a href="javascript:void(0)" class="btn btn-warning btn_edit btn_status" data-toggle="modal" data-target="#editStatus_<?php echo $row->id; ?>"> <i class="fa fa-wrench"></i></a> <div id="editStatus_<?php echo $row->id; ?>" class="modal fade text-left" role="dialog" style=""> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <div style="text-align: justify;" class="w-100"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Update Status</h4> </div> </div> <form action="<?php echo base_url($this->config->item('apanel_name').'/ecomm/orders/order_status').get_query_string(); ?>" method="post" class="form form-horizontal" enctype="multipart/form-data"> <div class="modal-body" style="padding-top: 20px; height: 200px;"> <div class="col-md-12"> <div class="form-group" style="margin-bottom: 1.25rem;"> <label for="bank_name">Title</label> <input type="text" placeholder="Status Title" id="name_edit" name="name_edit" value="<?php echo $row->title; ?>" class="form-control" required> <input type="hidden" id="status_id" name="status_id" value="<?php echo $row->id; ?>" class="form-control" required> </div> </div> <div class="col-md-12"> <div class="form-group" style="margin-bottom: 1.25rem;"> <label for="bank_name">Status</label> <?php $htmlSizes = ''; $htmlSizes.='<select name="status_edit" id="status_edit" class="form-control">'; $htmlSizes.= '<option value="1" '.($row->status == 1 ? 'selected=selected' : '').'>Active</option>'; $htmlSizes.= '<option value="0" '.($row->status == 0 ? 'selected=selected' : '').'>In-Active</option>'; $htmlSizes.= '</select>'; echo $htmlSizes; ?> </div> </div> </div> <div class="modal-footer"> <button type="submit" class="btn btn-primary ThemeColorButton">Update</button> </div> </form> </div> </div> </div> </td> </tr> <?php $i++; } ?> <?php if(empty($order_statuses)) { ?> <tr> <td colspan="99" align="center">Sorry! no records found...</td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> </div> </div> </div> </div> </div> <div id="AddStatus" class="modal fade" role="dialog" style=""> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <div style="text-align: justify;" class="w-100"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Add New Status</h4> </div> </div> <form action="<?php echo base_url($this->config->item('apanel_name').'/ecomm/orders/order_status').get_query_string(); ?>" method="post" class="form form-horizontal" enctype="multipart/form-data"> <div class="modal-body" style="padding-top: 20px; height: 200px;"> <div class="col-md-12"> <div class="form-group"> <label for="bank_name">Title</label> <input type="text" placeholder="Status Title" id="name" name="name" value="" class="form-control" required> </div> </div> <div class="col-md-12"> <div class="form-group"> <label for="bank_name">Status</label> <?php $htmlSizes = ''; $htmlSizes.='<select name="status" id="status" class="form-control">'; $htmlSizes.= '<option value="1">Active</option>'; $htmlSizes.= '<option value="0">In-Active</option>'; $htmlSizes.= '</select>'; echo $htmlSizes; ?> </div> </div> </div> <div class="modal-footer"> <button type="submit" class="btn btn-primary ThemeColorButton">Save</button> </div> </form> </div> </div> </div> <script type="text/javascript"> $(".btn_status").click(function(e){ e.preventDefault(); $("#orderStatus").modal("show"); var _id=$(this).data("id"); var href='<?=base_url()?>admin/order/order_status_form/'+_id; $("#orderStatus .modal-body").load(href); }); </script>