diff --git a/jsapp/js/actions.es6 b/jsapp/js/actions.es6 index 6d88030108..570e0dce5a 100644 --- a/jsapp/js/actions.es6 +++ b/jsapp/js/actions.es6 @@ -341,6 +341,9 @@ actions.resources.updateAsset.listen(function(uid, values, params={}) { }) .fail(function(resp){ actions.resources.updateAsset.failed(resp); + if (params.onFailed) { + params.onFailed(resp); + } }); }); diff --git a/jsapp/js/bem.es6 b/jsapp/js/bem.es6 index c093ae06d7..0943a9af22 100644 --- a/jsapp/js/bem.es6 +++ b/jsapp/js/bem.es6 @@ -134,7 +134,7 @@ bem.FormView__tab = bem.FormView.__('tab', ''); bem.FormView__label = bem.FormView.__('label'); bem.FormView__group = bem.FormView.__('group'); bem.FormView__item = bem.FormView.__('item'); -bem.FormView__button = bem.FormView.__('button', ' - } - - {this.props.context !== PROJECT_SETTINGS_CONTEXTS.REPLACE && - - } - - - - - - - ); - } - - renderStepChooseTemplate() { - return ( - - - - - {this.renderBackButton()} - - - {this.state.applyTemplateButton} - - - - ); - } - - renderStepUploadFile() { - return ( - - - {t('Import an XLSForm from your computer.')} - - - {!this.state.isUploadFilePending && - - - {t(' Drag and drop the XLSForm file here or click to browse')} - - } - {this.state.isUploadFilePending && -
- {this.renderLoading(t('Uploading file…'))} -
- } - - - {this.renderBackButton()} - -
- ); - } - - renderStepImportUrl() { - return ( - -
- {t('Enter a valid XLSForm URL in the field below.')}
-
- {t('Having issues? See this help article.')} - -
- - - - - - - {this.renderBackButton()} - - - {this.state.importUrlButton} - - - - ); - } - - renderStepProjectDetails() { - const sectors = session.currentAccount.available_sectors; - const countries = session.currentAccount.available_countries; - - return ( - - {this.props.context === PROJECT_SETTINGS_CONTEXTS.EXISTING && - - - {t('Save Changes')} - - - } - - - {/* form builder displays name in different place */} - {this.props.context !== PROJECT_SETTINGS_CONTEXTS.BUILDER && - - - - - } - - - - - - - - - - - - - - - - - - - - - {(this.props.context === PROJECT_SETTINGS_CONTEXTS.NEW || this.props.context === PROJECT_SETTINGS_CONTEXTS.REPLACE) && - - {/* Don't allow going back if asset already exist */} - {!this.state.formAsset && - this.renderBackButton() - } - - - {this.state.isSubmitPending && t('Please wait…')} - {!this.state.isSubmitPending && this.props.context === PROJECT_SETTINGS_CONTEXTS.NEW && t('Create project')} - {!this.state.isSubmitPending && this.props.context === PROJECT_SETTINGS_CONTEXTS.REPLACE && t('Save')} - - - } - - {this.props.context === PROJECT_SETTINGS_CONTEXTS.EXISTING && this.props.iframeUrl && - -