'; $table = new stdClass(); $table->width = '100%'; $table->class = 'databox filters'; $table->style[0] = 'width: 15%'; $table->data[0][0] = __('Name:'); $table->data[0][1] = html_print_input_text('name', $name, __('Name'), 20, 30, true, false, false, '', 'w250px'); $table->data[1][0] = __('Description'); $table->data[1][1] = html_print_textarea('description', 5, 20, $description, '', true, 'w250px'); $table->data[2][0] = __('Icon'); $iconData = []; $iconData[] = html_print_select( $icons, 'icon', $icon, 'show_icon_OS();', __('None'), 0, true ); $iconData[] = html_print_div( [ 'id' => 'icon_image', 'class' => 'inverse_filter main_menu_icon', 'style' => 'margin-left: 10px', 'content' => ui_print_os_icon($idOS, false, true), ], true ); $table->data[2][1] = html_print_div( [ 'style' => 'display: flex;align-items: center;', 'content' => implode('', $iconData), ], true ); html_print_table($table); html_print_input_hidden('id_os', $idOS); html_print_input_hidden('action', $actionHidden); html_print_action_buttons( html_print_submit_button($textButton, 'update_button', false, $classButton, true), ['type' => 'form_action'] ); echo ''; function get_list_os_icons_dir() { global $config; $return = []; $items = scandir($config['homedir'].'/images/'); foreach ($items as $item) { if (strstr($item, '@os.svg')) { $return[$item] = $item; } } return $return; } ?>