$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' => 'modal-dashboard', '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' => '', ], ], [ 'block_id' => 'private', 'direct' => 1, 'block_content' => [ [ 'label' => __('Private'), 'arguments' => [ 'name' => 'private', 'id' => 'private', 'type' => 'switch', 'value' => $private, 'onclick' => 'showGroup()', ], ], ], ], [ 'block_id' => 'group', 'direct' => 1, 'hidden' => $private, 'block_content' => [ [ 'label' => __('Group'), 'arguments' => [ 'name' => 'id_group', 'id' => 'id_group', 'type' => 'select_groups', 'selected' => $arrayDashboard['id_group'], 'return' => true, ], ], ], ], [ 'label' => __('Favourite'), 'arguments' => [ 'name' => 'favourite', 'id' => 'favourite', 'type' => 'switch', 'value' => $arrayDashboard['active'], ], ], ]; $html = new HTML(); $html->printForm( [ 'form' => $form, 'inputs' => $inputs, ] );