Updated all React components to their latest version
- updated code due to deprecated warnings (mostly router stuff & input default value) - set default sender based on settings when creating new newsletter - fixed erroneous UTC offset when displaying dates (PHP takes care of it)
This commit is contained in:
@@ -7,7 +7,10 @@ function(
|
||||
var FormFieldText = React.createClass({
|
||||
render: function() {
|
||||
var value = this.props.item[this.props.field.name];
|
||||
if(!value) { value = null; }
|
||||
if(value === undefined) {
|
||||
value = this.props.field.defaultValue || '';
|
||||
}
|
||||
|
||||
return (
|
||||
<input
|
||||
type="text"
|
||||
@@ -21,7 +24,6 @@ function(
|
||||
id={ 'field_'+this.props.field.name }
|
||||
value={ value }
|
||||
placeholder={ this.props.field.placeholder }
|
||||
defaultValue={ this.props.field.defaultValue }
|
||||
onChange={ this.props.onValueChange }
|
||||
{...this.props.field.validation}
|
||||
/>
|
||||
|
Reference in New Issue
Block a user