$dashboardId]; $url = ui_get_full_url( 'index.php?sec=reporting&sec2=operation/dashboard/dashboard' ); $url .= '&'.http_build_query($dataQuery); $form = [ 'id' => 'form-update-dashboard', 'action' => $url, 'onsubmit' => 'return false;', 'class' => 'filter-list-adv', 'enctype' => 'multipart/form-data', 'method' => 'POST', ]; $inputs = [ [ 'arguments' => [ 'type' => 'hidden', 'name' => 'dashboardId', 'value' => $dashboardId, ], ], [ 'label' => __('Name'), 'arguments' => [ 'type' => 'text', 'name' => 'name', 'value' => $arrayDashboard['name'], 'size' => '', 'maxlength' => 35, ], ], [ 'block_id' => 'group_form', 'direct' => 1, 'hidden' => $private, 'block_content' => [ [ 'label' => __('Group'), 'arguments' => [ 'name' => 'id_group', 'id' => 'id_group', 'type' => 'select_groups', 'returnAllGroup' => $return_all_group, 'selected' => $arrayDashboard['id_group'], 'return' => true, 'required' => true, ], ], ], ], [ 'label' => __('Date range'), 'arguments' => [ 'name' => 'date_range', 'id' => 'date_range', 'type' => 'switch', 'value' => $arrayDashboard['date_range'], 'onchange' => 'handle_date_range(this)', ], ], [ 'label' => __('Select range'), 'style' => 'display: none;', 'class' => 'row_date_range', 'arguments' => [ 'name' => 'range', 'id' => 'range', 'selected' => ($arrayDashboard['date_from'] === '0' && $arrayDashboard['date_to'] === '0') ? 300 : 'chose_range', 'type' => 'date_range', 'date_init' => date('Y/m/d', $arrayDashboard['date_from']), 'time_init' => date('H:i:s', $arrayDashboard['date_from']), 'date_end' => date('Y/m/d', $arrayDashboard['date_to']), 'time_end' => date('H:i:s', $arrayDashboard['date_to']), ], ], [ 'block_id' => 'private', 'direct' => 1, 'block_content' => [ [ 'label' => __('Private'), 'arguments' => [ 'name' => 'private', 'id' => 'private', 'type' => 'switch', 'value' => $private, 'onclick' => 'showGroup()', ], ], ], ], [ 'label' => __('Favourite'), 'arguments' => [ 'name' => 'favourite', 'id' => 'favourite', 'type' => 'switch', 'value' => $arrayDashboard['active'], ], ], ]; HTML::printForm( [ 'form' => $form, 'inputs' => $inputs, ] ); ?>