Uniform date display format for Manage Subscriptions & Subscriber new/edit

- use isWPUser instead of wp_user !== null
This commit is contained in:
Jonathan Labreuille
2016-06-30 18:08:48 +02:00
parent 7b0c130d0a
commit 5eef709af5
4 changed files with 21 additions and 11 deletions

View File

@@ -222,14 +222,13 @@ define([
}
render() {
const monthNames = window.mailpoet_month_names || [];
const dateFormats = window.mailpoet_date_formats || {};
const dateType = this.props.field.params.date_type;
const dateSelects = dateType.split('_');
const dateSelects = dateFormats[dateType][0].split('/');
const fields = dateSelects.map(type => {
switch(type) {
case 'year':
case 'yyyy':
return (<FormFieldDateYear
onValueChange={ this.onValueChange.bind(this) }
ref={ 'year' }
@@ -240,7 +239,7 @@ define([
/>);
break;
case 'month':
case 'mm':
return (<FormFieldDateMonth
onValueChange={ this.onValueChange.bind(this) }
ref={ 'month' }
@@ -252,7 +251,7 @@ define([
/>);
break;
case 'day':
case 'dd':
return (<FormFieldDateDay
onValueChange={ this.onValueChange.bind(this) }
ref={ 'day' }