diff --git a/js/app.js b/js/app.js
index 5ad36d28..bd9e79be 100644
--- a/js/app.js
+++ b/js/app.js
@@ -46,7 +46,6 @@ requests.defaults({
class AppGateway {
-
start() {
let settings;
let subdomain = window.location.host.split('.')[0];
diff --git a/js/components/ascribe_forms/form.js b/js/components/ascribe_forms/form.js
index 47703ded..f7b1f76f 100644
--- a/js/components/ascribe_forms/form.js
+++ b/js/components/ascribe_forms/form.js
@@ -65,12 +65,12 @@ let Form = React.createClass({
reset() {
// If onReset prop is defined from outside,
// notify component that a form reset is happening.
- if(this.props.onReset && typeof this.props.onReset === 'function') {
+ if(typeof this.props.onReset === 'function') {
this.props.onReset();
}
for(let ref in this.refs) {
- if (this.refs[ref].reset && typeof this.refs[ref].reset === 'function'){
+ if(typeof this.refs[ref].reset === 'function') {
this.refs[ref].reset();
}
}
@@ -123,11 +123,12 @@ let Form = React.createClass({
getFormData() {
let data = {};
- for(let ref in this.refs){
+
+ for(let ref in this.refs) {
data[this.refs[ref].props.name] = this.refs[ref].state.value;
}
- if (this.props.getFormData && typeof this.props.getFormData === 'function'){
+ if(typeof this.props.getFormData === 'function') {
data = mergeOptionsWithDuplicates(data, this.props.getFormData());
}
@@ -135,16 +136,16 @@ let Form = React.createClass({
},
handleChangeChild(){
- this.setState({edited: true});
+ this.setState({ edited: true });
},
handleSuccess(response){
- if(this.props.handleSuccess && typeof this.props.handleSuccess === 'function') {
+ if(typeof this.props.handleSuccess === 'function') {
this.props.handleSuccess(response);
}
for(let ref in this.refs) {
- if(this.refs[ref] && this.refs[ref].handleSuccess && typeof this.refs[ref].handleSuccess === 'function'){
+ if(this.refs[ref] && typeof this.refs[ref].handleSuccess === 'function'){
this.refs[ref].handleSuccess();
}
}
@@ -163,8 +164,7 @@ let Form = React.createClass({
this.setState({errors: this.state.errors.concat(err.json.errors[input])});
}
}
- }
- else {
+ } else {
let formData = this.getFormData();
// sentry shouldn't post the user's password
@@ -187,7 +187,7 @@ let Form = React.createClass({
clearErrors(){
for(let ref in this.refs){
- if (this.refs[ref] && this.refs[ref].clearErrors && typeof this.refs[ref].clearErrors === 'function'){
+ if (this.refs[ref] && typeof this.refs[ref].clearErrors === 'function'){
this.refs[ref].clearErrors();
}
}
diff --git a/js/components/ascribe_forms/form_register_piece.js b/js/components/ascribe_forms/form_register_piece.js
index 8f2666c0..fbbc330a 100644
--- a/js/components/ascribe_forms/form_register_piece.js
+++ b/js/components/ascribe_forms/form_register_piece.js
@@ -13,7 +13,7 @@ import ApiUrls from '../../constants/api_urls';
import { getLangText } from '../../utils/lang_utils';
import { mergeOptions } from '../../utils/general_utils';
-import { isReadyForFormSubmission } from '../ascribe_uploader/react_s3_fine_uploader_utils';
+import { formSubmissionValidation } from '../ascribe_uploader/react_s3_fine_uploader_utils';
let RegisterPieceForm = React.createClass({
@@ -100,7 +100,7 @@ let RegisterPieceForm = React.createClass({
ignoreFocus={true}>
You can leave this page and check back on the status later.
{getLangText('Computing hash(es)... This may take a few minutes.')}
-- {Math.ceil(this.props.hashingProgress)}% - {getLangText('Cancel hashing')} -
-{getLangText('Computing hash(es)... This may take a few minutes.')}
++ {getLangText('Cancel hashing')} +
+{getLangText('Would you rather')}
- +{getLangText('Drag files here')}
{getLangText('or')}
{getLangText('choose files to upload')} - +{getLangText('Drag a file here')}
{getLangText('or')}
{dialog} - +localBlankPagePath
property of the iframeSupport
option since this browser does not support the File API!localBlankPagePath
property of the iframeSupport
option since this browser does not support the File API!