mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 01:25:17 +01:00
Refactor InputTextAreaToggable's required property to take a bool instead
This commit is contained in:
parent
cc8e455a0e
commit
906ef7c37e
@ -65,7 +65,7 @@ let ConsignForm = React.createClass({
|
||||
rows={1}
|
||||
defaultValue={this.props.message}
|
||||
placeholder={getLangText('Enter a message...')}
|
||||
required="required"/>
|
||||
required />
|
||||
</Property>
|
||||
<Property
|
||||
name='password'
|
||||
@ -81,4 +81,4 @@ let ConsignForm = React.createClass({
|
||||
}
|
||||
});
|
||||
|
||||
export default ConsignForm;
|
||||
export default ConsignForm;
|
||||
|
@ -285,7 +285,7 @@ let LoanForm = React.createClass({
|
||||
rows={1}
|
||||
defaultValue={this.props.message}
|
||||
placeholder={getLangText('Enter a message...')}
|
||||
required={this.props.showPersonalMessage ? 'required' : ''}/>
|
||||
required={this.props.showPersonalMessage ? true : false}/>
|
||||
</Property>
|
||||
{this.getContractCheckbox()}
|
||||
{this.getAppendix()}
|
||||
@ -304,4 +304,4 @@ let LoanForm = React.createClass({
|
||||
}
|
||||
});
|
||||
|
||||
export default LoanForm;
|
||||
export default LoanForm;
|
||||
|
@ -50,7 +50,7 @@ let PieceExtraDataForm = React.createClass({
|
||||
rows={1}
|
||||
defaultValue={defaultValue}
|
||||
placeholder={getLangText('Fill in%s', ' ') + this.props.title}
|
||||
required="required"/>
|
||||
required />
|
||||
</Property>
|
||||
<hr />
|
||||
</Form>
|
||||
|
@ -71,11 +71,11 @@ let ShareForm = React.createClass({
|
||||
rows={1}
|
||||
defaultValue={this.props.message}
|
||||
placeholder={getLangText('Enter a message...')}
|
||||
required="required"/>
|
||||
required />
|
||||
</Property>
|
||||
</Form>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
export default ShareForm;
|
||||
export default ShareForm;
|
||||
|
@ -52,7 +52,7 @@ let PieceSubmitToPrizeForm = React.createClass({
|
||||
<InputTextAreaToggable
|
||||
rows={1}
|
||||
placeholder={getLangText('Enter your statement')}
|
||||
required="required"/>
|
||||
required />
|
||||
</Property>
|
||||
<Property
|
||||
name='work_description'
|
||||
@ -62,7 +62,7 @@ let PieceSubmitToPrizeForm = React.createClass({
|
||||
<InputTextAreaToggable
|
||||
rows={1}
|
||||
placeholder={getLangText('Enter the description for your work')}
|
||||
required="required"/>
|
||||
required />
|
||||
</Property>
|
||||
<Property
|
||||
name="terms"
|
||||
|
@ -72,7 +72,7 @@ let TransferForm = React.createClass({
|
||||
rows={1}
|
||||
defaultValue={this.props.message}
|
||||
placeholder={getLangText('Enter a message...')}
|
||||
required="required"/>
|
||||
required />
|
||||
</Property>
|
||||
<Property
|
||||
name='password'
|
||||
@ -93,4 +93,4 @@ let TransferForm = React.createClass({
|
||||
}
|
||||
});
|
||||
|
||||
export default TransferForm;
|
||||
export default TransferForm;
|
||||
|
@ -58,7 +58,7 @@ let UnConsignForm = React.createClass({
|
||||
rows={1}
|
||||
defaultValue={this.props.message}
|
||||
placeholder={getLangText('Enter a message...')}
|
||||
required="required"/>
|
||||
required />
|
||||
</Property>
|
||||
<Property
|
||||
name='password'
|
||||
@ -74,4 +74,4 @@ let UnConsignForm = React.createClass({
|
||||
}
|
||||
});
|
||||
|
||||
export default UnConsignForm;
|
||||
export default UnConsignForm;
|
||||
|
@ -9,8 +9,11 @@ let InputTextAreaToggable = React.createClass({
|
||||
propTypes: {
|
||||
disabled: React.PropTypes.bool,
|
||||
rows: React.PropTypes.number.isRequired,
|
||||
required: React.PropTypes.string,
|
||||
defaultValue: React.PropTypes.string
|
||||
required: React.PropTypes.bool,
|
||||
defaultValue: React.PropTypes.string,
|
||||
placeholder: React.PropTypes.string,
|
||||
onBlur: React.PropTypes.func,
|
||||
onChange: React.PropTypes.func
|
||||
},
|
||||
|
||||
getInitialState() {
|
||||
@ -66,4 +69,4 @@ let InputTextAreaToggable = React.createClass({
|
||||
});
|
||||
|
||||
|
||||
export default InputTextAreaToggable;
|
||||
export default InputTextAreaToggable;
|
||||
|
@ -49,7 +49,7 @@ let PrizeRegisterPiece = React.createClass({
|
||||
<InputTextAreaToggable
|
||||
rows={1}
|
||||
placeholder={getLangText('Enter your statement')}
|
||||
required="required"/>
|
||||
required />
|
||||
</Property>
|
||||
<Property
|
||||
name='work_description'
|
||||
@ -59,7 +59,7 @@ let PrizeRegisterPiece = React.createClass({
|
||||
<InputTextAreaToggable
|
||||
rows={1}
|
||||
placeholder={getLangText('Enter the description for your work')}
|
||||
required="required"/>
|
||||
required />
|
||||
</Property>
|
||||
<Property
|
||||
name="terms"
|
||||
|
Loading…
Reference in New Issue
Block a user