Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions web/package/agama-web-ui.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Nov 15 08:26:29 UTC 2024 - David Diaz <dgonzalez@suse.com>

- Stick product selection form actions to bottom
(gh#agama-project/agama#1769).

-------------------------------------------------------------------
Thu Nov 14 14:42:46 UTC 2024 - Knut Anderssen <kanderssen@suse.com>

Expand Down
69 changes: 34 additions & 35 deletions web/src/components/product/ProductSelectionPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import React, { useState } from "react";
import {
Card,
CardBody,
Flex,
Form,
Grid,
GridItem,
Expand Down Expand Up @@ -116,40 +115,40 @@ function ProductSelectionPage() {
const isSelectionDisabled = !nextProduct || nextProduct === selectedProduct;

return (
<Page.Content>
<Center>
<Form id="productSelectionForm" onSubmit={onSubmit}>
<Grid hasGutter>
<ResponsiveGridItem>
<FormGroup role="radiogroup" label={_("Select a product")}>
<List isPlain aria-label={_("Available products")}>
{products.map((product, index) => (
<Option
key={index}
product={product}
isChecked={nextProduct === product}
onChange={() => setNextProduct(product)}
/>
))}
</List>
</FormGroup>
</ResponsiveGridItem>
<ResponsiveGridItem>
<Flex justifyContent={{ default: "justifyContentFlexEnd" }}>
{selectedProduct && !isLoading && <BackLink />}
<Page.Submit
form="productSelectionForm"
isDisabled={isSelectionDisabled}
isLoading={isLoading}
>
{_("Select")}
</Page.Submit>
</Flex>
</ResponsiveGridItem>
</Grid>
</Form>
</Center>
</Page.Content>
<Page>
<Page.Content>
<Center>
<Form id="productSelectionForm" onSubmit={onSubmit}>
<Grid hasGutter>
<ResponsiveGridItem>
<FormGroup role="radiogroup" label={_("Select a product")}>
<List isPlain aria-label={_("Available products")}>
{products.map((product, index) => (
<Option
key={index}
product={product}
isChecked={nextProduct === product}
onChange={() => setNextProduct(product)}
/>
))}
</List>
</FormGroup>
</ResponsiveGridItem>
</Grid>
</Form>
</Center>
</Page.Content>
<Page.Actions>
<BackLink />
<Page.Submit
form="productSelectionForm"
isDisabled={isSelectionDisabled}
isLoading={isLoading}
>
{_("Select")}
</Page.Submit>
</Page.Actions>
</Page>
);
}

Expand Down