From 89f68abcecdbaa13cd03409519656a62935d2e64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Fri, 28 Aug 2015 12:11:29 +0200 Subject: [PATCH] add: Loan form for Ikonotv --- .../ikonotv_accordion_list_item.js | 17 ++++---- .../ascribe_buttons/ikonotv_submit_button.js | 41 +++++++++++++++++-- .../wallet/constants/wallet_api_urls.js | 4 +- .../whitelabel/wallet/wallet_routes.js | 5 ++- 4 files changed, 50 insertions(+), 17 deletions(-) diff --git a/js/components/whitelabel/wallet/components/ikonotv/ascribe_accordion_list/ikonotv_accordion_list_item.js b/js/components/whitelabel/wallet/components/ikonotv/ascribe_accordion_list/ikonotv_accordion_list_item.js index 2be45ce3..ecab34fb 100644 --- a/js/components/whitelabel/wallet/components/ikonotv/ascribe_accordion_list/ikonotv_accordion_list_item.js +++ b/js/components/whitelabel/wallet/components/ikonotv/ascribe_accordion_list/ikonotv_accordion_list_item.js @@ -14,8 +14,11 @@ import GlobalNotificationModel from '../../../../../../models/global_notificatio import GlobalNotificationActions from '../../../../../../actions/global_notification_actions'; import IkonotvSubmitButton from '../ascribe_buttons/ikonotv_submit_button'; + import AclProxy from '../../../../../acl_proxy'; +import AclButton from '../../../../../ascribe_buttons/acl_button'; + import { getLangText } from '../../../../../../utils/lang_utils'; import { mergeOptions } from '../../../../../../utils/general_utils'; @@ -61,16 +64,10 @@ let IkonotvAccordionListItem = React.createClass({ getSubmitButtons() { return ( -
- - - -
+ ); }, diff --git a/js/components/whitelabel/wallet/components/ikonotv/ascribe_buttons/ikonotv_submit_button.js b/js/components/whitelabel/wallet/components/ikonotv/ascribe_buttons/ikonotv_submit_button.js index d3f4c0e3..ae5ba094 100644 --- a/js/components/whitelabel/wallet/components/ikonotv/ascribe_buttons/ikonotv_submit_button.js +++ b/js/components/whitelabel/wallet/components/ikonotv/ascribe_buttons/ikonotv_submit_button.js @@ -1,10 +1,18 @@ 'use strict'; import React from 'react'; +import Moment from 'moment'; import classNames from 'classnames'; import ModalWrapper from '../../../../../ascribe_modal/modal_wrapper'; +import LoanForm from '../../../../../ascribe_forms/form_loan'; + +import Property from '../../../../../ascribe_forms/property'; +import InputCheckbox from '../../../../../ascribe_forms/input_checkbox'; + +import ApiUrls from '../../../../../../constants/api_urls'; + import { getLangText } from '../../../../../../utils/lang_utils'; let IkonotvSubmitButton = React.createClass({ @@ -24,16 +32,43 @@ let IkonotvSubmitButton = React.createClass({ }, render() { + + let today = new Moment(); + let enddate = new Moment(); + enddate.add(1, 'years'); + return ( - + title={getLangText('Loan to IkonoTV archive')}> + + + + + {' ' + getLangText('I agree to the Terms of Service of IkonoTV Archive') + ' '} + ( + {getLangText('read')} + ) + + + + ); } }); -export default IkonotvSubmitButton; \ No newline at end of file +export default IkonotvSubmitButton; diff --git a/js/components/whitelabel/wallet/constants/wallet_api_urls.js b/js/components/whitelabel/wallet/constants/wallet_api_urls.js index c1b101a1..22d4017e 100644 --- a/js/components/whitelabel/wallet/constants/wallet_api_urls.js +++ b/js/components/whitelabel/wallet/constants/wallet_api_urls.js @@ -13,8 +13,8 @@ function getWalletApiUrls(subdomain) { } else if (subdomain === 'ikonotv'){ return { - 'pieces_list': walletConstants.walletApiEndpoint + subdomain + '/pieces/', - 'piece': walletConstants.walletApiEndpoint + subdomain + '/pieces/${piece_id}/' + 'pieces_list': walletConstants.walletApiEndpoint + 'cyland' + '/pieces/', + 'piece': walletConstants.walletApiEndpoint + 'cyland' + '/pieces/${piece_id}/' }; } return {}; diff --git a/js/components/whitelabel/wallet/wallet_routes.js b/js/components/whitelabel/wallet/wallet_routes.js index 6836ec66..9532299c 100644 --- a/js/components/whitelabel/wallet/wallet_routes.js +++ b/js/components/whitelabel/wallet/wallet_routes.js @@ -65,12 +65,13 @@ let ROUTES = { ), 'ikonotv': ( - + + - +