From a63fc6bc37a884af0fa56d66a5ce248d99d26018 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 20 Mar 2019 01:57:48 +0100 Subject: fix does/doesnt use dataset --- scraper/client/paper/paper.css | 2 +- scraper/client/paper/paper.verify.js | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'scraper/client/paper') diff --git a/scraper/client/paper/paper.css b/scraper/client/paper/paper.css index 82b95d9c..d7b977fc 100644 --- a/scraper/client/paper/paper.css +++ b/scraper/client/paper/paper.css @@ -46,7 +46,7 @@ input.notes { .param label { display: block; padding: 4px; - min-width: 140px; + min-width: 150px; } .param input[type=checkbox] { margin: 6px 0; diff --git a/scraper/client/paper/paper.verify.js b/scraper/client/paper/paper.verify.js index 570899d5..c2bf4b90 100644 --- a/scraper/client/paper/paper.verify.js +++ b/scraper/client/paper/paper.verify.js @@ -10,8 +10,8 @@ import { Loader, Autocomplete } from '../common' const initialState = { citation: null, - uses_paper: false, - doesnt_use_paper: false, + uses_dataset: false, + doesnt_use_dataset: false, verified_by: '', notes: '', pdf_index: 0, @@ -56,12 +56,12 @@ class PaperVerify extends Component { }) } else { // console.log(paper) - console.log('GOT CUSTOM CITATION STATE') + console.log('GOT CUSTOM CITATION STATE', paper) const citationState = this.getCitationState(sha256) this.setState({ ...citationState, - uses_paper: paper.uses_paper, - doesnt_use_paper: paper.doesnt_use_paper, + uses_dataset: paper.uses_dataset === "TRUE", + doesnt_use_dataset: paper.doesnt_use_dataset === "TRUE", verified_by: paper.verified_by, notes: paper.notes, }) @@ -88,8 +88,8 @@ class PaperVerify extends Component { this.props.actions.postVerification({ paper_id: this.state.citation.id, title: this.state.citation.title, - uses_paper: this.state.uses_paper, - doesnt_use_paper: this.state.doesnt_use_paper, + uses_dataset: this.state.uses_dataset, + doesnt_use_dataset: this.state.doesnt_use_dataset, verified_by: this.state.verified_by, notes: this.state.notes, }) @@ -144,22 +144,22 @@ class PaperVerify extends Component {
- + this.setState({ uses_paper: e.target.checked })} + checked={!!this.state.uses_dataset} + onChange={e => this.setState({ uses_dataset: e.target.checked })} />
- + this.setState({ doesnt_use_paper: e.target.checked })} + checked={!!this.state.doesnt_use_dataset} + onChange={e => this.setState({ doesnt_use_dataset: e.target.checked })} />
-- cgit v1.2.3-70-g09d2