From bd691bb07fb729f0a9c943fa9352fc87435f952a Mon Sep 17 00:00:00 2001 From: knod Date: Wed, 28 Nov 2018 08:33:22 -0500 Subject: [PATCH] Switches inline handlers to members --- src/components/prompts/PredictionsWarning.js | 24 ++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/components/prompts/PredictionsWarning.js b/src/components/prompts/PredictionsWarning.js index 14470d0b..5d20e714 100644 --- a/src/components/prompts/PredictionsWarning.js +++ b/src/components/prompts/PredictionsWarning.js @@ -43,6 +43,22 @@ class PredictionsWarningComp extends Component { } }; + clickHandlerBox1 = () => { + return this.handleChange(`checkbox1`); + }; + + clickHandlerBox2 = () => { + return this.handleChange(`checkbox2`); + }; + + cancelHandler = () => { + return this.closeModal(false); + }; + + acceptHandler = () => { + return this.closeModal(true); + }; + render() { const { @@ -74,7 +90,7 @@ class PredictionsWarningComp extends Component { { return this.handleChange(`checkbox1`); } } /> + onClick = { this.clickHandlerBox1 } /> { translations.i_checkboxLabel1 } @@ -86,19 +102,19 @@ class PredictionsWarningComp extends Component { { return this.handleChange(`checkbox2`); } } /> + onClick = { this.clickHandlerBox2 } /> { translations.i_checkboxLabel2 } -