Show a tooltip about sending an email twice only when the Send button is dsiabled [MAILPOET-1098]

This commit is contained in:
stoletniy
2017-09-18 17:42:24 +03:00
parent 10be411b12
commit 16ff630e88

View File

@@ -285,6 +285,7 @@ define(
} }
return newField; return newField;
}); });
const sendButtonOptions = this.getSendButtonOptions();
return ( return (
<div> <div>
<h1>{MailPoet.I18n.t('finalNewsletterStep')}</h1> <h1>{MailPoet.I18n.t('finalNewsletterStep')}</h1>
@@ -313,7 +314,7 @@ define(
type="button" type="button"
onClick={ this.handleSend } onClick={ this.handleSend }
value={MailPoet.I18n.t('send')} value={MailPoet.I18n.t('send')}
{...this.getSendButtonOptions()} {...sendButtonOptions}
/> />
} }
&nbsp; &nbsp;
@@ -330,10 +331,12 @@ define(
{MailPoet.I18n.t('goBackToDesign')} {MailPoet.I18n.t('goBackToDesign')}
</a>. </a>.
</p> </p>
{ sendButtonOptions['disabled'] && sendButtonOptions['disabled'] === 'disabled' && (
<HelpTooltip <HelpTooltip
tooltip={MailPoet.I18n.t('helpTooltipSendEmail')} tooltip={MailPoet.I18n.t('helpTooltipSendEmail')}
tooltipId="helpTooltipSendEmail" tooltipId="helpTooltipSendEmail"
/> />
) }
</Form> </Form>
</div> </div>
); );