2015-06-10 15:49:46 +02:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
import React from 'react';
|
|
|
|
|
2015-06-16 13:48:48 +02:00
|
|
|
import requests from '../../utils/requests';
|
2015-06-10 15:49:46 +02:00
|
|
|
import ApiUrls from '../../constants/api_urls';
|
|
|
|
import FormMixin from '../../mixins/form_mixin';
|
2015-07-03 19:08:56 +02:00
|
|
|
import { getLangText } from '../../utils/lang_utils';
|
2015-06-10 15:49:46 +02:00
|
|
|
|
|
|
|
let EditionDeleteForm = React.createClass({
|
|
|
|
|
|
|
|
mixins: [FormMixin],
|
|
|
|
|
|
|
|
url() {
|
2015-06-16 13:48:48 +02:00
|
|
|
return requests.prepareUrl(ApiUrls.edition_delete, {edition_id: this.getBitcoinIds().join()});
|
2015-06-10 15:49:46 +02:00
|
|
|
},
|
|
|
|
httpVerb(){
|
|
|
|
return 'delete';
|
|
|
|
},
|
|
|
|
|
|
|
|
renderForm () {
|
|
|
|
return (
|
|
|
|
<div className="modal-body">
|
2015-07-03 19:08:56 +02:00
|
|
|
<p>{getLangText('Are you sure you would like to permanently delete this edition')}?</p>
|
|
|
|
<p>{getLangText('This is an irrevocable action%s', '.')}</p>
|
2015-06-10 15:49:46 +02:00
|
|
|
<div className="modal-footer">
|
2015-08-05 18:00:44 +02:00
|
|
|
<button
|
|
|
|
type="submit"
|
|
|
|
className="btn btn-danger btn-delete btn-sm ascribe-margin-1px"
|
|
|
|
onClick={this.submit}>
|
|
|
|
{getLangText('YES, DELETE')}
|
|
|
|
</button>
|
2015-06-10 15:49:46 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
|
2015-06-16 13:48:48 +02:00
|
|
|
export default EditionDeleteForm;
|