From d2b2bdf7d572cf2f6a54afeb9024767346961621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Tue, 14 Jul 2015 21:13:15 +0200 Subject: [PATCH] add custom submit button to piece list --- .../ascribe_piece_list_toolbar/piece_list_toolbar.js | 12 ++++++++---- js/components/piece_list.js | 7 +++++-- .../whitelabel/prize/components/piece_list.js | 12 +++++++----- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/js/components/ascribe_piece_list_toolbar/piece_list_toolbar.js b/js/components/ascribe_piece_list_toolbar/piece_list_toolbar.js index a4b24722..3f9d04ab 100644 --- a/js/components/ascribe_piece_list_toolbar/piece_list_toolbar.js +++ b/js/components/ascribe_piece_list_toolbar/piece_list_toolbar.js @@ -4,16 +4,17 @@ import React from 'react'; import Input from 'react-bootstrap/lib/Input'; import Glyphicon from 'react-bootstrap/lib/Glyphicon'; -import ButtonLink from 'react-router-bootstrap/lib/ButtonLink'; -import Row from 'react-bootstrap/lib/Row'; -import Col from 'react-bootstrap/lib/Col'; import { getLangText } from '../../utils/lang_utils'; let PieceListToolbar = React.createClass({ propTypes: { className: React.PropTypes.string, - searchFor: React.PropTypes.func + searchFor: React.PropTypes.func, + children: React.PropTypes.oneOfType([ + React.PropTypes.arrayOf(React.PropTypes.element), + React.PropTypes.element + ]) }, searchFor() { @@ -29,6 +30,9 @@ let PieceListToolbar = React.createClass({
+ + {this.props.children} + + searchFor={this.searchFor}> + {this.props.customSubmitButton} + - - Submit a new artwork to the prize - - - + + Submit a new artwork to the prize + + }/>
); }