1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-23 09:50:31 +01:00
onion/js/components/ascribe_forms/form_delete_edition.js

38 lines
1.2 KiB
JavaScript
Raw Normal View History

2015-06-10 15:49:46 +02:00
'use strict';
import React from 'react';
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() {
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')}&#63;</p>
<p>{getLangText('This is an irrevocable action%s', '.')}</p>
2015-06-10 15:49:46 +02:00
<div className="modal-footer">
2015-07-13 23:57:16 +02:00
<button type="submit" className="btn btn-danger btn-delete btn-sm ascribe-margin-1px" onClick={this.submit}>{getLangText('YES, DELETE')}</button>
<button className="btn btn-default btn-sm ascribe-margin-1px" style={{marginLeft: '0'}}
onClick={this.props.onRequestHide}>{getLangText('CLOSE')}</button>
2015-06-10 15:49:46 +02:00
</div>
</div>
);
}
});
export default EditionDeleteForm;