/* * Copyright (C) 2023 Red Hat, Inc. * SPDX-License-Identifier: LGPL-2.1-or-later */ import cockpit from 'cockpit'; import React from 'react'; import { Form, FormGroup } from "@patternfly/react-core/dist/esm/components/Form/index.js"; import { FormSelect, FormSelectOption } from "@patternfly/react-core/dist/esm/components/FormSelect/index.js"; import { has_errors } from "./dialog-utils.js"; import { show_modal_dialog, apply_modal_dialog } from "cockpit-components-dialog.jsx"; const _ = cockpit.gettext; function ShellDialogBody({ state, errors, change, shells }) { const { shell } = state; return (
); } export function account_shell_dialog(account, shells) { let dlg = null; const state = { shell: account.shell, }; let errors = { }; function change(field, value) { state[field] = value; update(); } function validate() { errors = { }; return !has_errors(errors); } function update() { const props = { id: "shell-dialog", title: _("Change shell"), body: