Skip to content

Commit 5f9b2f0

Browse files
Merge pull request #23 from tutorcruncher/fix-contractor
fix contractor in forms
2 parents 11d8de4 + 1bd0313 commit 5f9b2f0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/components/contractors/ConModal.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ class ConModal extends Component {
7979

8080
<IfElse v={this.state.show_enquiry}>
8181
<EnquiryForm contractor={contractor}
82-
root={this.props.root}
83-
config={this.props.config}
84-
mode='con-modal'/>
82+
root={this.props.root}
83+
config={this.props.config}
84+
mode='con-modal'/>
8585
{/*else:*/}
8686
<ConDetails contractor={contractor}
8787
contractor_extra={contractor_extra}

src/components/shared/EnquiryForm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class EnquiryForm extends Component {
5151
data.contractor = this.props.contractor.id
5252
}
5353

54-
const r = await this.props.root.requests.post('enquiry', this.state.enquiry_data, {expected_statuses: [201, 400]})
54+
const r = await this.props.root.requests.post('enquiry', data, {expected_statuses: [201, 400]})
5555
if (r.status === 201) {
5656
this.props.root.ga_event('enquiry-form', 'submitted', this.props.mode)
5757
this.setState({submitted: true})

0 commit comments

Comments
 (0)