back to previous settings device
This commit is contained in:
parent
b3abffa5b7
commit
9430de90d0
1 changed files with 10 additions and 32 deletions
|
@ -4,21 +4,10 @@ import { connect } from "react-redux";
|
||||||
import { RemoteService } from "../../../remote";
|
import { RemoteService } from "../../../remote";
|
||||||
|
|
||||||
const DeleteModal = (props) => (
|
const DeleteModal = (props) => (
|
||||||
<Modal
|
<Modal trigger={<Button color="red">Remove</Button>} closeIcon>
|
||||||
trigger={
|
|
||||||
<Button icon labelPosition="left" inverted color="red">
|
|
||||||
<Icon name="trash alternate" />
|
|
||||||
Delete device
|
|
||||||
</Button>
|
|
||||||
}
|
|
||||||
closeIcon
|
|
||||||
>
|
|
||||||
<Header icon="archive" content="Are you sure ?" />
|
<Header icon="archive" content="Are you sure ?" />
|
||||||
<Modal.Actions>
|
<Modal.Actions>
|
||||||
<Button
|
<Button color="red">
|
||||||
color="red"
|
|
||||||
// onClick={this.closeModal}
|
|
||||||
>
|
|
||||||
<Icon name="remove" /> No
|
<Icon name="remove" /> No
|
||||||
</Button>
|
</Button>
|
||||||
<Button onClick={() => props.removeDevice()} color="green">
|
<Button onClick={() => props.removeDevice()} color="green">
|
||||||
|
@ -49,28 +38,17 @@ const SettingsForm = (props) => {
|
||||||
// {this.props.device.name}
|
// {this.props.device.name}
|
||||||
/>
|
/>
|
||||||
</Form.Field>
|
</Form.Field>
|
||||||
|
|
||||||
<Form.Field>
|
<Form.Field>
|
||||||
<DeleteModal removeDevice={() => props.removeDevice(values)} />
|
<DeleteModal removeDevice={() => props.removeDevice(values)} />
|
||||||
</Form.Field>
|
</Form.Field>
|
||||||
//{" "}
|
<Button
|
||||||
<Modal.Actions>
|
onClick={() => props.saveFunction(values)}
|
||||||
<Button
|
color="blue"
|
||||||
color="red"
|
type="submit"
|
||||||
// onClick={this.closeModal}
|
>
|
||||||
>
|
Save
|
||||||
<Icon name="remove" />
|
</Button>
|
||||||
Discard changes
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
onClick={() => props.saveFunction(values)}
|
|
||||||
color="green"
|
|
||||||
type="submit"
|
|
||||||
>
|
|
||||||
<Icon name="checkmark" />
|
|
||||||
Save changes
|
|
||||||
</Button>
|
|
||||||
//{" "}
|
|
||||||
</Modal.Actions>
|
|
||||||
</Form>
|
</Form>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue