public function filter_dashboard_dates() { $data = $_POST; $dash = new Dashboard(); $resp = new ajax_response($data['action'], true); if ($data['dashboard_date_count'] != '') { $resp->set_status(true); $resp->set_data(array('dashboard_dates' => $dash->get_dashboard_data((int) $data['dashboard_date_count']))); } echo $resp->encode_response(); die; }
</div> <div class="wrapper table page-forms dashboard-form"> <div class="table-cell "> </div> <div class="table-cell "> <form data-ajax-form data-action="filter_dashboard_dates" data-target="dashboard-days"> <ul class="inline"> <li> <select name="dashboard_date_count" data-fireable-input> <option value="7" selected>Week</option> <option value="31">Month</option> <option value="93">3 Months</option> <option value="93">6 Months</option> </select> </li> </ul> </form> </div> </div> <div class="wrapper dashboard-date-data"> <ul data-updateable-content="dashboard-days"><?php echo $dash->get_dashboard_data(); ?> </ul> </div> <?php get_footer();