1
0
mirror of https://github.com/ascribe/onion.git synced 2025-01-03 18:35:09 +01:00

Remove useless code

This commit is contained in:
vrde 2015-06-01 18:00:34 +02:00
parent 4ee4530029
commit 2301373cae

View File

@ -11,6 +11,7 @@ export const FormMixin = {
, status: null , status: null
} }
}, },
submit(e) { submit(e) {
e.preventDefault(); e.preventDefault();
this.setState({submitted: true}); this.setState({submitted: true});
@ -20,16 +21,7 @@ export const FormMixin = {
.catch(this.handleError); .catch(this.handleError);
}, },
handleResponse(response){
if (response.status >= 200 && response.status < 300){
this.props.onRequestHide();
}
else if (response.status >= 400 && response.status < 500) {
this.handleError(response);
}
else {
}
},
handleError(err){ handleError(err){
if (err.json) { if (err.json) {
for (var input in errors){ for (var input in errors){
@ -42,6 +34,7 @@ export const FormMixin = {
this.setState({submitted: false, status: response.status}); this.setState({submitted: false, status: response.status});
} }
}, },
render(){ render(){
let alert = null; let alert = null;
if (this.state.status >= 500){ if (this.state.status >= 500){