diff --git a/web/package/agama-web-ui.changes b/web/package/agama-web-ui.changes index 39c3d8eec0..50e0a30519 100644 --- a/web/package/agama-web-ui.changes +++ b/web/package/agama-web-ui.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Sep 18 08:57:11 UTC 2025 - David Diaz + +- Preserve installer options values after successful submission + (bsc#1249636). + ------------------------------------------------------------------- Fri Sep 12 08:14:28 UTC 2025 - Ladislav Slezák diff --git a/web/src/components/core/InstallerOptions.tsx b/web/src/components/core/InstallerOptions.tsx index 446ed0a377..f4bb4c8b10 100644 --- a/web/src/components/core/InstallerOptions.tsx +++ b/web/src/components/core/InstallerOptions.tsx @@ -209,8 +209,8 @@ type Actions = { handleLanguageChange: (_, v: string) => void; handleKeymapChange: (_, v: string) => void; handleCopyToSystemToggle: (_, v: boolean) => void; - handleSubmitForm: (e: React.FormEvent) => void; - handleCloseDialog: () => void; + handleSubmission: (e: React.FormEvent) => void; + handleCancellation: () => void; }; /** @@ -313,7 +313,7 @@ const AllSettingsDialog = ({ state, formState, actions }: DialogProps) => { return ( -
+ @@ -324,7 +324,7 @@ const AllSettingsDialog = ({ state, formState, actions }: DialogProps) => { description={ } isChecked={formState.reuseSettings} @@ -344,7 +344,7 @@ const AllSettingsDialog = ({ state, formState, actions }: DialogProps) => { > {_("Accept")} - + ); @@ -360,7 +360,7 @@ const LanguageOnlyDialog = ({ state, formState, actions }: DialogProps) => { return ( - + @@ -370,7 +370,7 @@ const LanguageOnlyDialog = ({ state, formState, actions }: DialogProps) => { description={ } isChecked={formState.reuseSettings} @@ -390,7 +390,7 @@ const LanguageOnlyDialog = ({ state, formState, actions }: DialogProps) => { > {_("Accept")} - + ); @@ -402,7 +402,7 @@ const KeyboardOnlyDialog = ({ state, formState, actions }: DialogProps) => { {_("Cannot be changed in remote installation")} - {_("Accept")} + {_("Accept")} ); @@ -417,7 +417,7 @@ const KeyboardOnlyDialog = ({ state, formState, actions }: DialogProps) => { return ( - + @@ -427,7 +427,7 @@ const KeyboardOnlyDialog = ({ state, formState, actions }: DialogProps) => { description={ } isChecked={formState.reuseSettings} @@ -447,7 +447,7 @@ const KeyboardOnlyDialog = ({ state, formState, actions }: DialogProps) => { > {_("Accept")} - + ); @@ -595,7 +595,6 @@ export default function InstallerOptions({ }; const close = () => { - dispatch({ type: "RESET", state: initialFormState }); dispatchDialogAction({ type: "CLOSE" }); typeof onClose === "function" && onClose(); }; @@ -626,8 +625,11 @@ export default function InstallerOptions({ handleLanguageChange: (_, v) => dispatch({ type: "SET_SELECTED_LANGUAGE", language: v }), handleKeymapChange: (_, v) => dispatch({ type: "SET_SELECTED_KEYMAP", keymap: v }), handleCopyToSystemToggle: () => dispatch({ type: "TOGGLE_REUSE_SETTINGS" }), - handleSubmitForm: onSubmit, - handleCloseDialog: close, + handleSubmission: onSubmit, + handleCancellation: () => { + dispatch({ type: "RESET", state: initialFormState }); + close(); + }, }; const Toggle = toggle ?? toggles[variant];