mirror of
https://github.com/ascribe/onion.git
synced 2025-01-11 13:33:46 +01:00
63 lines
1.8 KiB
JavaScript
63 lines
1.8 KiB
JavaScript
'use strict';
|
|
|
|
import React from 'react';
|
|
|
|
import Button from 'react-bootstrap/lib/Button';
|
|
|
|
import Form from './form';
|
|
import Property from './property';
|
|
import InputTextAreaToggable from './input_textarea_toggable';
|
|
|
|
import AppConstants from '../../constants/application_constants';
|
|
import { getLangText } from '../../utils/lang_utils.js';
|
|
|
|
|
|
let UnConsignForm = React.createClass({
|
|
propTypes: {
|
|
url: React.PropTypes.string,
|
|
id: React.PropTypes.object,
|
|
message: React.PropTypes.string,
|
|
editions: React.PropTypes.array,
|
|
handleSuccess: React.PropTypes.func
|
|
},
|
|
|
|
getFormData(){
|
|
return this.props.id;
|
|
},
|
|
|
|
render() {
|
|
|
|
return (
|
|
<Form
|
|
ref='form'
|
|
url={this.props.url}
|
|
getFormData={this.getFormData}
|
|
handleSuccess={this.props.handleSuccess}
|
|
buttonSubmit={getLangText('UNCONSIGN')}>
|
|
<Property
|
|
name='unconsign_message'
|
|
label={getLangText('Personal Message')}
|
|
editable={true}>
|
|
<InputTextAreaToggable
|
|
rows={1}
|
|
editable={true}
|
|
defaultValue={this.props.message}
|
|
placeholder={getLangText('Enter a message...')}
|
|
required="required"/>
|
|
</Property>
|
|
<Property
|
|
name='password'
|
|
label={getLangText('Password')}>
|
|
<input
|
|
type="password"
|
|
placeholder={getLangText('Enter your password')}
|
|
required/>
|
|
</Property>
|
|
<hr />
|
|
</Form>
|
|
);
|
|
}
|
|
});
|
|
|
|
export default UnConsignForm;
|