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:
Jonathan Labreuille
2016-04-28 16:54:43 +02:00
parent 59199140bf
commit 4047b41a7f
26 changed files with 128 additions and 109 deletions

View File

@@ -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}
/>