2015-06-05 11:06:36 +02:00
|
|
|
'use strict';
|
|
|
|
|
2015-05-29 01:54:56 +02:00
|
|
|
import React from 'react';
|
|
|
|
|
2015-06-16 09:59:09 +02:00
|
|
|
import AppConstants from '../../constants/application_constants';
|
2015-07-03 19:08:56 +02:00
|
|
|
import { getLangText } from '../../utils/lang_utils.js'
|
2015-06-16 09:59:09 +02:00
|
|
|
|
2015-05-29 01:54:56 +02:00
|
|
|
let ButtonSubmitOrClose = React.createClass({
|
2015-06-09 16:10:38 +02:00
|
|
|
propTypes: {
|
|
|
|
submitted: React.PropTypes.bool.isRequired,
|
|
|
|
text: React.PropTypes.string.isRequired,
|
|
|
|
onClose: React.PropTypes.func.isRequired
|
|
|
|
},
|
|
|
|
|
2015-05-29 01:54:56 +02:00
|
|
|
render() {
|
|
|
|
if (this.props.submitted){
|
2015-06-03 10:27:11 +02:00
|
|
|
return (
|
|
|
|
<div className="modal-footer">
|
2015-06-16 09:59:09 +02:00
|
|
|
<img src={AppConstants.baseUrl + 'static/img/ascribe_animated_medium.gif'} />
|
2015-06-03 10:27:11 +02:00
|
|
|
</div>
|
2015-06-09 13:29:22 +02:00
|
|
|
);
|
2015-05-29 01:54:56 +02:00
|
|
|
}
|
|
|
|
return (
|
|
|
|
<div className="modal-footer">
|
|
|
|
<button type="submit" className="btn btn-ascribe-inv">{this.props.text}</button>
|
2015-07-03 19:08:56 +02:00
|
|
|
<button className="btn btn-ascribe-inv" onClick={this.props.onClose}>{getLangText('CLOSE')}</button>
|
2015-05-29 01:54:56 +02:00
|
|
|
</div>
|
2015-06-05 11:06:36 +02:00
|
|
|
);
|
2015-05-29 01:54:56 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
export default ButtonSubmitOrClose;
|