Skip to content

Commit

Permalink
Tasks edit: Fixing layout for delete confirmation dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
MangoCubes committed Jul 23, 2023
1 parent 2d4de66 commit d1d380d
Showing 1 changed file with 25 additions and 13 deletions.
38 changes: 25 additions & 13 deletions src/Tasks/TaskEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import { History } from "history";
import ColoredRadio from "../widgets/ColoredRadio";
import RRule, { RRuleOptions } from "../widgets/RRule";
import { CachedCollection } from "../Pim/helpers";
import { Checkbox, IconButton, InputAdornment, List, ListItem, ListItemSecondaryAction, ListItemText, OutlinedInput } from "@material-ui/core";
import { Checkbox, Grid, IconButton, InputAdornment, List, ListItem, ListItemSecondaryAction, ListItemText, OutlinedInput } from "@material-ui/core";
import TaskSelector from "./TaskSelector";

interface PropsType {
Expand Down Expand Up @@ -691,19 +691,31 @@ export default class TaskEdit extends React.PureComponent<PropsType> {
onOk={this.onOk}
onCancel={() => this.setState({ showDeleteDialog: false })}
>
Are you sure you would like to delete
{
this.state.deleteTarget ? ` "${this.state.deleteTarget.summary}"` : " this task"
}?
<FormControlLabel
control={
<Checkbox
checked={this.state.recursiveDelete}
onChange={(e) => this.setState({ recursiveDelete: e.target.checked })}
<Grid
container
direction="column"
alignItems="flex-start"
justify="flex-start"
>
<Grid item>
Are you sure you would like to delete
{
this.state.deleteTarget ? ` "${this.state.deleteTarget.summary}"` : " this task"
}?
</Grid>
<Grid item>
<FormControlLabel
control={
<Checkbox
checked={this.state.recursiveDelete}
onChange={(e) => this.setState({ recursiveDelete: e.target.checked })}
/>
}
label="Delete recursively"
/>
}
label="Delete recursively"
/>
</Grid>
</Grid>

</ConfirmationDialog>
<TaskSelector
entries={this.filterChildren()}
Expand Down

0 comments on commit d1d380d

Please sign in to comment.