{"id":107,"date":"2022-02-18T11:37:32","date_gmt":"2022-02-18T11:37:32","guid":{"rendered":"http:\/\/fuelfox.net\/customer\/?page_id=107"},"modified":"2022-02-18T11:38:11","modified_gmt":"2022-02-18T11:38:11","slug":"edit","status":"publish","type":"page","link":"https:\/\/fuelfox.net\/customer\/vehicles\/edit\/","title":{"rendered":"Edit Vehicle"},"content":{"rendered":"\n<style>\n    div.chip { padding: 12px 16px 4px 16px; background-color: #f1f1f1; border-radius: 16px; display: inline-block; margin-bottom: 4px; }\n<\/style>\n\n<h2><\/h2>\n<hr>\n<form method=\"post\" action=\"\/customer\/wp-json\/wp\/v2\/pages\/107\" id=\"vehicleForm\">\n    <input type=\"hidden\" name=\"_id\" value=\"\">\n    <div class=\"row\">\n        <div class=\"col-md-3\">\n            <label>Unit Number<\/label>\n            <input type=\"text\" name=\"vehicleNumber\" class=\"form-control\" value=\"\">\n        <\/div>\n        <div class=\"col-md-2\">\n            <label>Unit Type<\/label>\n            <select name=\"vehicleType\" class=\"form-control\">\n                <option value=\"\">[No Type Specified]<\/option>\n                <option >Car<\/option>\n                <option >Tractor<\/option>\n                <option >Truck<\/option>\n                <option >Trailer<\/option>\n                <option >Generator<\/option>\n                <option >Grinder<\/option>\n                <option >Can<\/option>\n                <option >Tank<\/option>\n                <option >Semi Truck<\/option>\n                <option >Semi Trailer<\/option>\n                <option >Other<\/option>\n            <\/select>\n        <\/div>\n        <div class=\"col-md-2\">\n            <label>Fuel Type<\/label>\n            <select name=\"fuelType\" class=\"form-control\">\n                <option  value=\"10\">87 Octane<\/option>\n                <option  value=\"11\">93 Octane<\/option>\n                <option  value=\"12\">Diesel<\/option>\n                <option  value=\"13\">DEF<\/option>\n                <option  value=\"14\">Dyed Diesel<\/option>\n            <\/select>\n        <\/div>\n    <\/div>\n    <div class=\"spacer\"><\/div>\n    <div class=\"row\">\n        <div class=\"col-md-6\">\n            <label>Fleet Fueling Card Number (if applicable)<\/label>\n            <input type=\"text\" name=\"cardNumber\" class=\"form-control\" value=\"\">\n        <\/div>\n        <div class=\"col-md-6\">\n            <label>Comments<\/label>\n            <textarea name=\"comments\" class=\"form-control\"><\/textarea>\n        <\/div>\n    <\/div>\n    <div class=\"spacer\"><\/div>\n    <div class=\"d-flex justify-content-center\">\n        <button type=\"submit\" class=\"btn btn-success\">Save Vehicle<\/button>\n        &nbsp;&nbsp;\n        <a class=\"btn btn-secondary\" href=\"https:\/\/fuelfox.net\/customer\/vehicles\">Close<\/a>\n        &nbsp;&nbsp;\n                &nbsp;&nbsp;\n                \n    <\/div>\n<\/form>\n\n\n<script>\n    $(document).ready(function() {\n        $('#customers').DataTable({\n            bFilter: false,\n            bPaginate: false\n        });\n        $(\"#history\").DataTable({\n            bPaginate: false,\n            order: [[ 0, 'desc' ]]\n        });\n        $(\"#customer_new\").autocomplete({\n            source: \"\/wp-content\/phpengine\/ajax\/customer.php\",\n            minLength: 3,\n            select: function(event, ui) {\n                $(\"#customer_new\").val(ui.item.value);\n                $(\"#vehicleForm\").submit();\n            }\n        });\n        $('button.delete').click(function() {\n            let vb = $(this).attr(\"data-vb\");\n            if (confirm(\"Are you sure?\")) {\n                window.location.href=\"\/vehicles\/edit\/?_id=&delete=\" + vb;\n            }\n        });\n    });\n    function deleteVehicle() {\n        if (confirm(\"Are you sure?\")) {\n            $.ajax({\n                url: 'https:\/\/fuelfox.net\/customer\/wp-content\/phpengine\/ajax\/delete.php',\n                method: 'post',\n                data: { object: 'vehicle', id: '' },\n                dataType: 'json',\n                error: function(xhr, junk, error) {\n                    alert(error);\n                },\n                success: function(data) {\n                    if (data.result == \"ok\") {\n                        window.location.href=\"https:\/\/fuelfox.net\/customer\/vehicles\";\n                    }\n                    else {\n                        alert(data.result);\n                    }\n                }\n            });\n        }\n    }\n    function restoreVehicle() {\n        if (confirm(\"Are you sure?\")) {\n            $.ajax({\n                url: 'https:\/\/fuelfox.net\/customer\/wp-content\/phpengine\/ajax\/restore.php',\n                method: 'post',\n                data: { object: 'vehicle', id: '' },\n                dataType: 'json',\n                error: function(xhr, junk, error) {\n                    alert(error);\n                },\n                success: function(data) {\n                    if (data.result == \"ok\") {\n                        window.location.href=\"https:\/\/fuelfox.net\/customer\/vehicles\";\n                    }\n                    else {\n                        alert(data.result);\n                    }\n                }\n            });\n        }\n    }\n\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":104,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-107","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/fuelfox.net\/customer\/wp-json\/wp\/v2\/pages\/107","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fuelfox.net\/customer\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/fuelfox.net\/customer\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/fuelfox.net\/customer\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fuelfox.net\/customer\/wp-json\/wp\/v2\/comments?post=107"}],"version-history":[{"count":1,"href":"https:\/\/fuelfox.net\/customer\/wp-json\/wp\/v2\/pages\/107\/revisions"}],"predecessor-version":[{"id":108,"href":"https:\/\/fuelfox.net\/customer\/wp-json\/wp\/v2\/pages\/107\/revisions\/108"}],"up":[{"embeddable":true,"href":"https:\/\/fuelfox.net\/customer\/wp-json\/wp\/v2\/pages\/104"}],"wp:attachment":[{"href":"https:\/\/fuelfox.net\/customer\/wp-json\/wp\/v2\/media?parent=107"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}