diff --git a/js/components/whitelabel/wallet/components/cyland/ascribe_buttons/cyland_submit_button.js b/js/components/whitelabel/wallet/components/cyland/ascribe_buttons/cyland_submit_button.js
index a19a73c6..2bb35719 100644
--- a/js/components/whitelabel/wallet/components/cyland/ascribe_buttons/cyland_submit_button.js
+++ b/js/components/whitelabel/wallet/components/cyland/ascribe_buttons/cyland_submit_button.js
@@ -3,16 +3,42 @@
import React from 'react';
import classNames from 'classnames';
+import Moment from 'moment';
+
+import WhitelabelActions from '../../../../../../actions/whitelabel_actions';
+import WhitelabelStore from '../../../../../../stores/whitelabel_store';
+
import ModalWrapper from '../../../../../ascribe_modal/modal_wrapper';
-import CylandPieceSubmitForm from '../ascribe_forms/cyland_form_submit';
+import LoanForm from '../../../../../ascribe_forms/form_loan';
+
+import ApiUrls from '../../../../../../constants/api_urls';
import { getLangText } from '../../../../../../utils/lang_utils';
+import { getAclFormMessage } from '../../../../../../utils/form_utils';
let CylandSubmitButton = React.createClass({
propTypes: {
className: React.PropTypes.string,
handleSuccess: React.PropTypes.func,
- piece: React.PropTypes.object.isRequired
+ piece: React.PropTypes.object.isRequired,
+ username: React.PropTypes.string
+ },
+
+ getInitialState() {
+ return WhitelabelStore.getState();
+ },
+
+ componentDidMount() {
+ WhitelabelStore.listen(this.onChange);
+ WhitelabelActions.fetchWhitelabel();
+ },
+
+ componentWillUnmount() {
+ WhitelabelStore.unlisten(this.onChange);
+ },
+
+ onChange(state) {
+ this.setState(state);
},
getSubmitButton() {
@@ -25,16 +51,26 @@ let CylandSubmitButton = React.createClass({
},
render() {
+ let today = new Moment();
+ let loanEndDate = new Moment();
+ loanEndDate.add(1000, 'years');
+
return (