Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('if form is dirty, return a message and trigger a popup', () => {
wrapper.setState({ formInputs: { foo: 'foo' } });
expect(wrapper.instance().checkIsFormDirty(Event))
.toEqual(I18n.t('form.save_prompt',
{ defaultValue: 'Do you want to leave this page? Changes that you made may not be saved.' }));
});
export default props => (
<div>
<div>
{ I18n.t('homepage.sage_loves_carbon.learn_more') }
</div>
<img src="{">
</div>
);
)
] : ''
),
m('.w-col.w-col-4',
m('.card.u-radius', [
m('.fontsize-small.u-marginbottom-20', [
m('span.fa.fa-lightbulb-o.fa-lg'),
m.trust(` ${I18n.t('reward_know_more_cta_html', I18nScope())}`)
]),
m('.divider.u-marginbottom-20'),
m('.fontsize-smallest.w-hidden-small.w-hidden-tiny', [
I18n.t('reward_faq_intro', I18nScope()),
m('br'),
m('br'),
I18n.t('reward_faq_sub_intro', I18nScope()),
m('br'),
m('br'),
_.map(ctrl.tips,
(tip, idx) => project().mode === 'sub' && (Number(idx) === 3 || Number(idx) === 4)
? null : [
m('.fontweight-semibold', tip.title),
m.trust(tip.description),
m('br'),
m('br')
]
)
])
])
)
])
])
get characterCount() {
const value = this.props.value || '';
if (!this.props.characterLimit) { return null; }
return (
<div data-element="character-limit">
{ I18n.t('textarea.limit.prefix', { defaultValue: 'You have used ' }) }
<span>
{ I18n.toNumber(value.length, this.i18nNumberOpts) }
</span>
{ I18n.t('textarea.limit.middle', { defaultValue: ' of ' }) }
<span>
{ I18n.toNumber(this.props.characterLimit, this.i18nNumberOpts) }
</span>
{ I18n.t('textarea.limit.suffix', { defaultValue: ' characters' }) }
</div>
);
}
onChange={e => this.setState({fullTextSearch: e.target.value})}
onKeyPress={e => e.key === "Enter" ? this.doSearch(e) : false}/>
this.setState({logicalOperatorIsAnd: !this.state.logicalOperatorIsAnd})}/>
<section>
<a>Reset<i></i></a>
<a>Search<i></i></a>
<a>
{I18n.t("clipboard.copy")}<i></i>
</a>
</section>
{hasNoResults && <h2>{I18n.t("playground.no_results")}</h2>}
{showResults && <select> ({value: s, label: I18n.t(`metadata.${s}`)}))}
value={status}
className="status-select"/>}
{showResults && this.renderSearchResultsTable(searchResults, selectedType, searchAttributes, globalSearchAttributes, status, fullTextSearch)}
{showResults && this.renderSearchResultsTablePrintable(searchResults)}
);
};
</select>
setErrorMessage(errorType) {
let errorMessage;
switch (errorType) {
case "notPresent":
errorMessage = I18n.t("metadata.required", {
name: "Entity ID"
});
break;
case "notUnique":
errorMessage = I18n.t("metadata.entityIdAlreadyExists", {
entityid: this.props.value
});
break;
case "notFormatted":
errorMessage = I18n.t("metaDataFields.error", {
format: this.props.entityIdFormat
});
break;
default:
errorMessage = "";
}
this.setState({errorMessage});
return false;
}
id: 'api_key',
label: I18n.t('admin.stats.fields.api_key.label'),
description: I18n.t('admin.stats.fields.api_key.description_markdown'),
type: 'string',
operators: stringOperators,
},
{
id: 'user_email',
label: I18n.t('admin.stats.fields.user_email.label'),
description: I18n.t('admin.stats.fields.user_email.description_markdown'),
type: 'string',
operators: stringOperators,
},
{
id: 'user_id',
label: I18n.t('admin.stats.fields.user_id.label'),
description: I18n.t('admin.stats.fields.user_id.description_markdown'),
type: 'string',
operators: stringOperators,
},
{
id: 'response_status',
label: I18n.t('admin.stats.fields.response_status.label'),
description: I18n.t('admin.stats.fields.response_status.description_markdown'),
type: 'integer',
operators: numberOperators,
},
{
id: 'gatekeeper_denied_code',
label: I18n.t('admin.stats.fields.gatekeeper_denied_code.label'),
description: I18n.t('admin.stats.fields.gatekeeper_denied_code.description_markdown'),
type: 'string',
.catch(() => {
Toast.show(i18n.t('IMToastError', {
action: i18n.t('IMLoadOrganization')
}));
});
}
<dialog open="{open}">
{lang.t('terms.title')}
<li>{lang.t('terms.funds_deposit')}</li>
<li>{lang.t('terms.funds_release')}</li>
<li>{lang.t('terms.names_creation', { stateofus: <i>stateofus.eth</i> })}</li>
<li>{lang.t('terms.contract', { stateofus: <i>stateofus.eth</i> })}</li>
<li>{lang.t('terms.rule.title')}
<ol type="1">
<li>{lang.t('terms.rule.one')}</li>
<li>{lang.t('terms.rule.two')}</li>
<li>{lang.t('terms.rule.three')}</li>
<li>{lang.t('terms.rule.four', { reserved_list_link: <a href="https://github.com/status-im/ens-usernames/blob/master/config/ens-usernames/reservedNames.js">{lang.t('terms.reserved_list')}</a> })}</li>
<li>{lang.t('terms.rule.five', { eth_address: <code>Ox</code> })}</li>
</ol>
</li>
<li>{lang.t('terms.illegal_name')}</li>
<li>{lang.t('terms.contact')}</li>
<div style="{{">
<div>{lang.t('action.send_snt')}</div>
</div></dialog>
//@ts-ignore textAlign is missing in the typings of TextInput
}