1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 01:25:17 +01:00

merged all branches

fixed clear errors
This commit is contained in:
ddejongh 2015-05-29 10:58:07 +02:00
parent c177d382e4
commit 7a18c150c7
4 changed files with 22 additions and 11 deletions

View File

@ -3,11 +3,11 @@ import React from 'react';
let ButtonSubmitOrClose = React.createClass({
render() {
if (this.props.submitted){
return (
<div className="modal-footer">
Loading
</div>
)
//return (
// <div className="modal-footer">
// Loading
// </div>
//)
}
return (
<div className="modal-footer">

View File

@ -22,12 +22,16 @@ let ShareForm = React.createClass({
}
},
renderForm() {
let message = "Hi,\n" +
"\n" +
"I am sharing \"" + this.props.edition.title + "\" with you.\n" +
"\n" +
"Truly yours,\n" +
this.props.currentUser.username;
let title = this.props.edition.title;
let username = this.props.currentUser.username;
let message =
`Hi,
I am sharing \" ${title} \" with you.
Truly yours,
${username}`;
return (
<form id="share_modal_content" role="form" key="share_modal_content" onSubmit={this.submit}>
<InputText

View File

@ -10,7 +10,11 @@ let AlertMixin = {
}.bind(this)
);
this.setState({alerts: alerts, retry: this.state.retry + 1});
},
clearAlerts(){
this.setState({alerts: null});
}
};
export default AlertMixin;

View File

@ -12,6 +12,9 @@ export const FormMixin = {
},
submit(e) {
e.preventDefault();
for (var ref in this.refs){
this.refs[ref].clearAlerts();
}
this.setState({submitted: true});
fetch(this.url(), {
method: 'post',